2022-09-11 16:18:55 +08:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
struct response_t;
|
|
|
|
|
2022-09-18 11:15:37 +08:00
|
|
|
class user_status {
|
2022-09-11 16:18:55 +08:00
|
|
|
public:
|
2022-09-18 11:15:37 +08:00
|
|
|
user_status(const char* addr, acl::sslbase_conf& ssl_conf,
|
|
|
|
const char* stok);
|
|
|
|
~user_status(void);
|
2022-09-11 16:18:55 +08:00
|
|
|
|
|
|
|
bool start(void);
|
|
|
|
|
|
|
|
private:
|
|
|
|
acl::string addr_;
|
|
|
|
acl::sslbase_conf& ssl_conf_;
|
2022-09-18 11:15:37 +08:00
|
|
|
acl::string stok_;
|
2022-09-11 16:18:55 +08:00
|
|
|
|
|
|
|
bool get_status(const char* stok);
|
|
|
|
void build_request(acl::string& buf);
|
|
|
|
bool parse_response(const acl::string& data, response_t& res);
|
|
|
|
void show_status(const response_t& res);
|
|
|
|
};
|