acl/app/net_tools/ping/ping_store.h

25 lines
620 B
C
Raw Normal View History

#pragma once
2014-11-19 00:25:21 +08:00
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:
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><E9BAAF><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>̴߳<DFB3><CCB4><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
2014-11-19 00:25:21 +08:00
virtual void rpc_run();
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><E9BAAF><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>̴߳<DFB3><CCB4><EFBFBD><EFBFBD><EFBFBD><EFBFBD>̣<EFBFBD><CCA3>յ<EFBFBD><D5B5><EFBFBD><EFBFBD>߳<EFBFBD><DFB3><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɵ<EFBFBD><C9B5><EFBFBD>Ϣ
2014-11-19 00:25:21 +08:00
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);
};