C# Class DrutNET.Curl

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

Private Properties

Свойство 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

Méthodes publiques

Méthode 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

Méthode 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 méthode

Constructor, init curl service.
public Curl ( string serverURL ) : System
serverURL string
Résultat System

DownloadFile() public méthode

public DownloadFile ( string httpPath, string savePath ) : bool
httpPath string
savePath string
Résultat bool

FileUpload() public méthode

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

FileUpload() public méthode

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
Résultat int

Login() public méthode

public Login ( string user, string password ) : bool
user string
password string
Résultat bool

Logout() public méthode

public Logout ( ) : bool
Résultat bool

ReLogin() public méthode

public ReLogin ( ) : bool
Résultat bool