Files correlati : xvturl Commento : Inizio implementazione xvturl con primordiale gestione chiamate post http git-svn-id: svn://10.65.10.50/branches/R_10_00@24200 c028cbd2-c16b-5b4b-a496-9718f37d4682
73 lines
2.8 KiB
C
73 lines
2.8 KiB
C
#ifndef __XVTURL_H
|
|
#define __XVTURL_H
|
|
#pragma once
|
|
|
|
#define URLDLL __declspec(dllexport)
|
|
// CURL -> void *
|
|
typedef void * XVT_HANDLE;
|
|
|
|
|
|
/**********************************************************************
|
|
* xvturl_global *
|
|
* In this category you can find two kinds of functions: *
|
|
* - Normal functions that anyone can call (like xvturl_version()) *
|
|
* - Private functions that are the same for every type of object *
|
|
* you can create using cURL (only in *.cpp). *
|
|
**********************************************************************/
|
|
|
|
// xvturl_global episode I: THE PHANTOM FUNCTIONS
|
|
XVT_HANDLE xvturl_get_handle();
|
|
bool xvturl_exec(XVT_HANDLE handle, int& err);
|
|
const char* xvturl_get_error_string(int err);
|
|
void xvturl_cleanup(XVT_HANDLE handle);
|
|
void xvturl_global_setup(bool on);
|
|
|
|
// xvturl_global episode II: ATTACK OF THE LINKER
|
|
// Get the current cURL Version
|
|
URLDLL const char* xvturl_version();
|
|
// Initialize all the stuff cURL needs
|
|
URLDLL void xvturl_global_init();
|
|
// Clean all the stuff initialized
|
|
URLDLL void xvturl_global_cleanup();
|
|
|
|
/**********************************************************************
|
|
* xvt_email_manager *
|
|
**********************************************************************/
|
|
/*
|
|
URLDLL enum XVT_SSL_STATUS
|
|
{
|
|
off, // Do not attempt to use SSL
|
|
alwaysTry, // Try using SSL, proceed anyway otherwise
|
|
onlyControl, // SSL for the control connection or fail
|
|
alwaysAll, // SSL for all communication or fail
|
|
alwaysOff // Not an option, never use
|
|
};
|
|
|
|
URLDLL XVT_HANDLE xvt_email_get_handle();
|
|
URLDLL int xvt_email_init(XVT_HANDLE handle, const char* address, int port, const char* usr, const char* psw, XVT_SSL_STATUS ssl = off);
|
|
//bool xvt_email_add_message(const char* from, const char* to, const char* cc, const char* ccn, const char* message);
|
|
*/
|
|
/**********************************************************************
|
|
* xvt_http_manager *
|
|
**********************************************************************/
|
|
// Get the handle
|
|
URLDLL XVT_HANDLE xvt_http_get_handle();
|
|
// Set the website address
|
|
URLDLL void xvt_http_set_address(XVT_HANDLE handle, const char* address);
|
|
// Set the data to send
|
|
URLDLL void xvt_http_set_data(XVT_HANDLE handle, const char* data);
|
|
// Send the post request
|
|
URLDLL int xvt_http_exec(XVT_HANDLE handle, int& errorCode);
|
|
// Return a string describing the error code
|
|
URLDLL const char * xvt_http_error_string(int errorCode);
|
|
// Clean the handle, ACTUNG!!! YOU MUST CALL THIS FUNCTION EVERY TIME
|
|
URLDLL void xvt_http_clean(XVT_HANDLE handle);
|
|
|
|
/**********************************************************************
|
|
* xvt_ftp_manager *
|
|
**********************************************************************/
|
|
|
|
|
|
|
|
|
|
#endif |