C# Class DrutNET.Curl

enable to connect to drupal using cURL -- Single Tone --
Inheritance: DrutNETBase, IConnection
Mostra file Open project: bricel/DrutNet Class Usage Examples

Private Properties

Property Type Description
AddFormField SeasideResearch.LibCurlNet.CURLFORMcode
AddFormFile bool
AddFormFile bool
CleanupCurl void
ClearDataIn void
DrupCurlPerform SeasideResearch.LibCurlNet.CURLcode
OnDebug void
OnProgress System.Int32
OnWriteData System.Int32
errorMessage void
getToken string

Public Methods

Method Description
Curl ( string serverURL ) : System

Constructor, init curl service.

DownloadFile ( string httpPath, string savePath ) : bool
FileUpload ( string localPath ) : int

Upload a file to Drupal using the form-file module and CURL

FileUpload ( string localPath, string serverDirectory ) : int

Upload a file to Drupal using the form-file module and CURL

Login ( string user, string password ) : bool
Logout ( ) : bool
ReLogin ( ) : bool

Private Methods

Method Description
AddFormField ( SeasideResearch.LibCurlNet mf, object fieldName, object Value ) : SeasideResearch.LibCurlNet.CURLFORMcode
AddFormFile ( SeasideResearch.LibCurlNet mf, string fileName, Enums field ) : bool
AddFormFile ( SeasideResearch.LibCurlNet mf, string fileName, string field ) : bool

add information to upload a file, also perform check of file size and file existing

CleanupCurl ( ) : void
ClearDataIn ( ) : void
DrupCurlPerform ( ) : SeasideResearch.LibCurlNet.CURLcode
OnDebug ( SeasideResearch.LibCurlNet infoType, String msg, Object extraData ) : void
OnProgress ( Object extraData, Double dlTotal, Double dlNow, Double ulTotal, Double ulNow ) : Int32
OnWriteData ( Byte buf, Int32 size, Int32 nmemb, Object extraData ) : Int32
errorMessage ( string msg ) : void
getToken ( string url, string formId ) : string

Method Details

Curl() public method

Constructor, init curl service.
public Curl ( string serverURL ) : System
serverURL string
return System

DownloadFile() public method

public DownloadFile ( string httpPath, string savePath ) : bool
httpPath string
savePath string
return bool

FileUpload() public method

Upload a file to Drupal using the form-file module and CURL
public FileUpload ( string localPath ) : int
localPath string Local file location
return int

FileUpload() public method

Upload a file to Drupal using the form-file module and CURL
public FileUpload ( string localPath, string serverDirectory ) : int
localPath string Local file location
serverDirectory string Save to a specific directory in drupal
return int

Login() public method

public Login ( string user, string password ) : bool
user string
password string
return bool

Logout() public method

public Logout ( ) : bool
return bool

ReLogin() public method

public ReLogin ( ) : bool
return bool