-
Notifications
You must be signed in to change notification settings - Fork 12
/
Curl.h
executable file
·52 lines (39 loc) · 1012 Bytes
/
Curl.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
#ifndef CURLMUNACPP
#define CURLMUNACPP
class Curl
{
private:
void* curl;
string username;
string password;
string host;
unsigned short port;
enum EXEC_TYPE
{
GETWORK,
GETWORK_LP,
TESTWORK,
};
string Execute(Curl::EXEC_TYPE type, string work, string path, uint timeout);
public:
string proxy;
Curl() { curl = NULL; }
~Curl() {}
static void GlobalInit();
void Init();
void Quit();
string GetWork_LP(string path="", uint timeout = 60);
string GetWork(string path="", uint timeout = 5);
string TestWork(string work);
void SetUsername(string username_) { username = username_; }
void SetPassword(string password_) { password = password_; }
void SetHost(string host_) { host = host_; }
void SetPort(string port_);
string GetUsername() { return username; }
string GetPassword() { return password; }
string GetHost() { return host; }
string GetPort();
static string longpoll_url;
static bool longpoll_active;
};
#endif