acl/lib_acl/samples/master/master_threads/service_main.h

52 lines
1.3 KiB
C
Raw Normal View History


2014-11-19 00:25:21 +08:00
#ifndef __SERVICE_MAIN_INCLUDE_H__
#define __SERVICE_MAIN_INCLUDE_H__
#include "lib_acl.h"
#ifdef __cplusplus
extern "C" {
#endif
/* 配置文件项 */
2014-11-19 00:25:21 +08:00
/* in service_main.c */
extern char *var_cfg_mysql_dbaddr;
extern char *var_cfg_mysql_dbuser;
extern char *var_cfg_mysql_dbpass;
extern char *var_cfg_mysql_dbname;
extern int var_cfg_mysql_dbmax;
extern int var_cfg_mysql_auto_commit;
extern int var_cfg_mysql_dbping;
extern int var_cfg_mysql_dbtimeout;
extern int var_cfg_debug_mem;
extern ACL_CONFIG_BOOL_TABLE service_conf_bool_tab[];
extern ACL_CONFIG_INT_TABLE service_conf_int_tab[];
extern ACL_CONFIG_STR_TABLE service_conf_str_tab[];
/**
*
* @param init_ctx {void*}
2014-11-19 00:25:21 +08:00
*/
extern void service_init(void *init_ctx);
/**
* 退
* @param exist_ctx {void*}
2014-11-19 00:25:21 +08:00
*/
extern void service_exit(void *exit_ctx);
/**
*
* @param run_ctx {void*}
* @param stream {ACL_VSTREAM*}
2014-11-19 00:25:21 +08:00
*/
2017-07-05 00:01:22 +08:00
extern int service_main(void *run_ctx, ACL_VSTREAM *stream);
2014-11-19 00:25:21 +08:00
#ifdef __cplusplus
}
#endif
#endif