#include <curl.h>
Definition at line 15 of file curl.h.
◆ curl()
int curl::curl |
( |
const char * |
cmd | ) |
|
Add and execute the given curl command line.
- Parameters
-
- Returns
- id >= 0 is successed, -1 is failed.
Must call curl.freecmd() for free memory.
◆ addcmd()
◆ break()
void curl::break |
( |
int |
id | ) |
|
◆ clear()
Clear, free and kill thread in all commands.
◆ execmd()
bool curl::execmd |
( |
int |
id | ) |
|
Execute curl command by id.
- Parameters
-
- Returns
- true is successed, false is failed.
◆ execmdthread()
bool curl::execmdthread |
( |
int |
id | ) |
|
Execute curl command by id in another thread.
- Parameters
-
- Returns
- true is successed, false is failed.
◆ freecmd()
bool curl::freecmd |
( |
int |
id | ) |
|
Free all memory, remove command, break and kill thread in this command by id from curl manager.
- Parameters
-
- Returns
- true is successed, false is failed.
◆ getcmd()
const char* curl::getcmd |
( |
int |
id | ) |
|
Get a command line in this id. Thread safe.
- Parameters
-
- Returns
- result command line.
◆ getcount()
Query have number of command line in curl manager. Thread safe.
- Returns
- command line count
◆ getdownloadpercent()
int curl::getdownloadpercent |
( |
int |
id | ) |
|
Get percent of download file.
- Parameters
-
- Returns
- percent (0-100).
◆ getresult()
const char* curl::getresult |
( |
int |
id | ) |
|
Get string result from curl execute after. !!!NOT a thread safe!!! MUST call after isEnd() return true or state is CURL_STATE_END
- See also
- curl.getState()
-
curl.isEnd()
- Parameters
-
- Returns
- result as string.
◆ getresultsize()
int curl::getresultsize |
( |
int |
id | ) |
|
Get size of string result from curl execute after. Thread safe.
- Parameters
-
- Returns
- size of string (kilobyte).
◆ getreturn()
◆ getstate()
Get state of curl process. Thread safe.
- Parameters
-
- Returns
- id of process
0 = CURL_STATE_SPAWN
1 = CURL_STATE_STARTED
2 = CURL_STATE_END
◆ getuploadpercent()
int curl::getuploadpercent |
( |
int |
id | ) |
|
Get percent of upload file.
- Parameters
-
- Returns
- percent (0-100).
◆ isempty()
Query have a command line in curl manager. Thread safe.
- Returns
- true is empty, false have commands.
◆ isend()
Query this id is stopped process. Thread safe.
- Parameters
-
- Returns
- -1 = invalid id, 2 = end first, 3 = end forever, otherwise is still work in progress.
◆ isidok()
bool curl::isidok |
( |
int |
id | ) |
|
Query this id is ok. Thread safe.
- Parameters
-
- Returns
- true is id ok, false is failed.
◆ killthread()
bool curl::killthread |
( |
int |
id | ) |
|
Kill curl thread call. (!!!thread supported only!!!, same curl.break())
- Parameters
-
- Returns
- true is successed, false is failed.
- See also
- curl.break()
◆ log()
const char* curl::log |
( |
int |
id | ) |
|
Log curl command all details to string buffer.
- Parameters
-
- Returns
- log result as string.
◆ thread()
int curl::thread |
( |
const char * |
cmd | ) |
|
Add and execute the given curl command line in another thread.
- Parameters
-
- Returns
- id >= 0 is successed, -1 is failed.
Must call curl.freecmd() for free memory.
The documentation for this class was generated from the following file: