mirror of
https://gitee.com/acl-dev/acl.git
synced 2024-12-14 08:50:53 +08:00
69 lines
1.2 KiB
C++
69 lines
1.2 KiB
C++
|
#pragma once
|
|||
|
#include "acl_cpp/acl_cpp_define.hpp"
|
|||
|
#include "acl_cpp/master/master_conf.hpp"
|
|||
|
|
|||
|
namespace acl
|
|||
|
{
|
|||
|
|
|||
|
class ACL_CPP_API master_base
|
|||
|
{
|
|||
|
public:
|
|||
|
/**
|
|||
|
* <EFBFBD><EFBFBD><EFBFBD><EFBFBD> bool <EFBFBD><EFBFBD><EFBFBD>͵<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
* @param table {master_bool_tbl*}
|
|||
|
*/
|
|||
|
void set_cfg_bool(master_bool_tbl* table);
|
|||
|
|
|||
|
/**
|
|||
|
* <EFBFBD><EFBFBD><EFBFBD><EFBFBD> int <EFBFBD><EFBFBD><EFBFBD>͵<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
* @param table {master_int_tbl*}
|
|||
|
*/
|
|||
|
void set_cfg_int(master_int_tbl* table);
|
|||
|
|
|||
|
/**
|
|||
|
* <EFBFBD><EFBFBD><EFBFBD><EFBFBD> int64 <EFBFBD><EFBFBD><EFBFBD>͵<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
* @param table {master_int64_tbl*}
|
|||
|
*/
|
|||
|
void set_cfg_int64(master_int64_tbl* table);
|
|||
|
|
|||
|
/**
|
|||
|
* <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD>ַ<EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD>͵<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
* @param table {master_str_tbl*}
|
|||
|
*/
|
|||
|
void set_cfg_str(master_str_tbl* table);
|
|||
|
|
|||
|
/**
|
|||
|
* <EFBFBD>ж<EFBFBD><EFBFBD>Ƿ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> acl_master <EFBFBD><EFBFBD><EFBFBD>Ƶ<EFBFBD> daemon ģʽ
|
|||
|
* @return {bool}
|
|||
|
*/
|
|||
|
bool daemon_mode(void) const;
|
|||
|
protected:
|
|||
|
bool daemon_mode_;
|
|||
|
bool proc_inited_;
|
|||
|
|
|||
|
master_base();
|
|||
|
virtual ~master_base();
|
|||
|
|
|||
|
/**
|
|||
|
* <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>л<EFBFBD><EFBFBD>û<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ǰ<EFBFBD><EFBFBD><EFBFBD>õĻص<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ڴ˺<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>һЩ
|
|||
|
* <EFBFBD>û<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϊ root <EFBFBD><EFBFBD>Ȩ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
*/
|
|||
|
virtual void proc_pre_jail() {}
|
|||
|
|
|||
|
/**
|
|||
|
* <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>л<EFBFBD><EFBFBD>û<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ݺ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>õĻص<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˺<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʱ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
* <EFBFBD><EFBFBD>Ȩ<EFBFBD><EFBFBD>Ϊ<EFBFBD><EFBFBD>ͨ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
*/
|
|||
|
virtual void proc_on_init() {}
|
|||
|
|
|||
|
/**
|
|||
|
* <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˳<EFBFBD>ǰ<EFBFBD><EFBFBD><EFBFBD>õĻص<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
*/
|
|||
|
virtual void proc_on_exit() {}
|
|||
|
|
|||
|
// <20><><EFBFBD>ö<EFBFBD><C3B6><EFBFBD>
|
|||
|
master_conf conf_;
|
|||
|
};
|
|||
|
|
|||
|
} // namespace acl
|