
#ifndef	__SERVICE_MAIN_INCLUDE_H__
#define	__SERVICE_MAIN_INCLUDE_H__

#include "lib_acl.h"

#ifdef	__cplusplus
extern "C" {
#endif

/* ļ */
/* 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*} ûԶָ
 */
extern void service_init(void *init_ctx);

/**
 * ˳ʱĻص
 * @param exist_ctx {void*} ûԶָ
 */
extern void service_exit(void *exit_ctx);

/**
 * Э鴦
 * @param run_ctx {void*} ûԶָ
 * @param stream {ACL_VSTREAM*} ͻ
 */
extern int service_main(void *run_ctx, ACL_VSTREAM *stream);

#ifdef	__cplusplus
}
#endif

#endif
