-
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
705afd4
commit e34ef12
Showing
4 changed files
with
24 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
!** libcurl for Clarion v1.16 | ||
!** 28.06.2017 | ||
!** libcurl for Clarion v1.17 | ||
!** 12.07.2017 | ||
!** [email protected] | ||
|
||
|
||
|
@@ -205,7 +205,7 @@ cs CSTRING(LEN(s) + LEN(prefix) + 1) | |
|
||
curl::GetFileContents PROCEDURE(STRING pFile) | ||
OS_INVALID_HANDLE_VALUE EQUATE(-1) | ||
szFile CSTRING(256) | ||
szFile CSTRING(LEN(pFile) + 1) | ||
sData &STRING | ||
hFile HANDLE | ||
dwFileSize LONG | ||
|
@@ -704,7 +704,7 @@ TCurlClass.SetOpt PROCEDURE(CURLoption option, TCurlSList plist) | |
RETURN curl_easy_setopt(SELF.curl, option, plist.GetList()) | ||
|
||
TCurlClass.SetUrl PROCEDURE(STRING pUrl) | ||
url CSTRING(256) | ||
url CSTRING(LEN(pUrl) + 1) | ||
CODE | ||
url = CLIP(pUrl) | ||
RETURN SELF.SetOpt(CURLOPT_URL, ADDRESS(url)) | ||
|
@@ -728,7 +728,7 @@ TCurlClass.StrError PROCEDURE(CURLcode errcode) | |
RETURN curl_easy_strerror(errcode) | ||
|
||
TCurlClass.SetUserPwd PROCEDURE(STRING pUser, STRING pPwd) | ||
userpwd CSTRING(256) | ||
userpwd CSTRING(LEN(pUser) + LEN(pPwd) + 1 + 1) | ||
CODE | ||
IF pUser AND pPwd | ||
userpwd = CLIP(pUser) &':'& CLIP(pPwd) | ||
|
@@ -1117,7 +1117,7 @@ TCurlClass.SetSSLVerifyPeer PROCEDURE(BOOL pValue) | |
RETURN SELF.SetOpt(CURLOPT_SSL_VERIFYPEER, pValue) | ||
|
||
TCurlClass.SetCAInfo PROCEDURE(STRING pCert) | ||
szcert CSTRING(256) | ||
szcert CSTRING(LEN(pCert) + 1) | ||
CODE | ||
szcert = CLIP(pCert) | ||
RETURN SELF.SetOpt(CURLOPT_CAINFO, ADDRESS(szcert)) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
!** libcurl for Clarion v1.16 | ||
!** 29.06.2017 | ||
!** libcurl for Clarion v1.17 | ||
!** 12.07.2017 | ||
!** [email protected] | ||
|
||
INCLUDE('DynStr.inc'), ONCE | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
!** libcurl for Clarion v1.14 | ||
!** 11.01.2017 | ||
!** libcurl for Clarion v1.17 | ||
!** 12.07.2017 | ||
!** [email protected] | ||
|
||
MEMBER | ||
|
@@ -55,7 +55,7 @@ TCurlDropboxClass.AccessToken PROCEDURE() | |
|
||
TCurlDropboxClass.Authorize PROCEDURE(STRING pAppKey) | ||
szAction CSTRING('open') | ||
szUrl CSTRING(256) | ||
szUrl CSTRING(512) | ||
CODE | ||
szUrl = 'https://www.dropbox.com/oauth2/authorize?response_type=code&client_id='& CLIP(pAppKey) | ||
winapi::ShellExecute(0, szAction, szUrl, , , SW_SHOWNORMAL) | ||
|
@@ -202,7 +202,7 @@ rc CURLcode, AUTO | |
|
||
TCurlDropboxClass.Copy PROCEDURE(STRING pFromPath, STRING pToPath) | ||
func STRING('copy') | ||
args CSTRING(256) | ||
args CSTRING(1024) | ||
CODE | ||
args = '{{"from_path": "'& CLIP(pFromPath) &'","to_path": "'& CLIP(pToPath) &'"}' | ||
SELF._lastCurlCode = SELF.SetRPCEndpoint(args) | ||
|
@@ -219,7 +219,7 @@ args CSTRING(256) | |
|
||
TCurlDropboxClass.Move PROCEDURE(STRING pFromPath, STRING pToPath) | ||
func STRING('move') | ||
args CSTRING(256) | ||
args CSTRING(1024) | ||
CODE | ||
args = '{{"from_path": "'& CLIP(pFromPath) &'","to_path": "'& CLIP(pToPath) &'"}' | ||
SELF._lastCurlCode = SELF.SetRPCEndpoint(args) | ||
|
@@ -236,7 +236,7 @@ args CSTRING(256) | |
|
||
TCurlDropboxClass.CreateFolder PROCEDURE(STRING pPath) | ||
func STRING('create_folder') | ||
args CSTRING(256) | ||
args CSTRING(512) | ||
CODE | ||
args = '{{"path": "'& CLIP(pPath) &'"}' | ||
SELF._lastCurlCode = SELF.SetRPCEndpoint(args) | ||
|
@@ -253,7 +253,7 @@ args CSTRING(256) | |
|
||
TCurlDropboxClass.Delete PROCEDURE(STRING pPath) | ||
func STRING('delete') | ||
args CSTRING(256) | ||
args CSTRING(512) | ||
CODE | ||
args = '{{"path": "'& CLIP(pPath) &'"}' | ||
SELF._lastCurlCode = SELF.SetRPCEndpoint(args) | ||
|
@@ -270,7 +270,7 @@ args CSTRING(256) | |
|
||
TCurlDropboxClass.Download PROCEDURE(STRING pRemotePath, STRING pLocalPath) | ||
func STRING('download') | ||
args CSTRING(256) | ||
args CSTRING(512) | ||
fs TCurlFileStruct | ||
dwBytes LONG, AUTO | ||
CODE | ||
|
@@ -337,7 +337,7 @@ fileContent &STRING | |
|
||
TCurlDropboxClass.ListFolder PROCEDURE(STRING pPath, BOOL pRecursive = FALSE) | ||
func STRING('list_folder') | ||
args CSTRING(256) | ||
args CSTRING(512) | ||
CODE | ||
args = '{{"path": "'& CLIP(pPath) &'"' | ||
IF pRecursive | ||
|
@@ -359,7 +359,7 @@ args CSTRING(256) | |
|
||
TCurlDropboxClass.Get_Copy_Reference PROCEDURE(STRING pPath) | ||
func STRING('copy_reference/get') | ||
args CSTRING(256) | ||
args CSTRING(512) | ||
CODE | ||
args = '{{"path": "'& CLIP(pPath) &'"}' | ||
SELF._lastCurlCode = SELF.SetRPCEndpoint(args) | ||
|
@@ -393,7 +393,7 @@ args CSTRING(512) | |
|
||
TCurlDropboxClass.Preview PROCEDURE(STRING pPath, *STRING pTmpFile) | ||
func STRING('get_preview') | ||
args CSTRING(256) | ||
args CSTRING(512) | ||
htmlDocTypeStr STRING('<<!DOCTYPE html>') | ||
pdfDocTypeStr STRING('%PDF') | ||
fs TCurlFileStruct | ||
|
@@ -431,7 +431,7 @@ rc BOOL(FALSE) | |
|
||
TCurlDropboxClass.Thumbnail PROCEDURE(STRING pPath, TDbxThumbnailFormat pFormat, TDbxThumbnailSize pSize, *STRING pTmpFile) | ||
func STRING('get_thumbnail') | ||
args CSTRING(256) | ||
args CSTRING(1024) | ||
fs TCurlFileStruct | ||
dwBytes LONG, AUTO | ||
rc BOOL(FALSE) | ||
|