mirror of
https://gitee.com/acl-dev/acl.git
synced 2024-12-01 11:27:40 +08:00
25 lines
620 B
C++
25 lines
620 B
C++
#pragma once
|
|
|
|
class host_status;
|
|
class ping_callback;
|
|
class ping_store : public acl::rpc_request
|
|
{
|
|
public:
|
|
ping_store(std::vector<host_status*>* host_list,
|
|
ping_callback* callback);
|
|
~ping_store();
|
|
protected:
|
|
// 基类虚函数:子线程处理函数
|
|
virtual void rpc_run();
|
|
|
|
// 基类虚函数:主线程处理过程,收到子线程任务完成的消息
|
|
virtual void rpc_onover();
|
|
private:
|
|
std::vector<host_status*>* host_list_;
|
|
|
|
acl::string dbpath_;
|
|
ping_callback* callback_;
|
|
bool create_tbl(acl::db_handle& db);
|
|
void insert_tbl(acl::db_handle& db);
|
|
void insert_one(acl::db_handle& db, const host_status* status);
|
|
}; |