00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011 #ifndef _KLONE_CONTEXT_H_
00012 #define _KLONE_CONTEXT_H_
00013
00014 #include "klone_conf.h"
00015 #include <u/libu.h>
00016 #include <klone/server.h>
00017 #include <klone/backend.h>
00018 #include <klone/os.h>
00019 #include <klone/hook.h>
00020
00021 #ifdef __cplusplus
00022 extern "C" {
00023 #endif
00024
00025
00026 typedef struct context_s
00027 {
00028 server_t *server;
00029 u_config_t *config;
00030 backend_t *backend;
00031 hook_t *hook;
00032 char *ext_config;
00033 char *pid_file;
00034 int debug;
00035 int daemon;
00036 char **arg;
00037 size_t narg;
00038 int pipc;
00039 int cgi;
00040
00041 #ifdef OS_WIN
00042 SERVICE_STATUS_HANDLE hServiceStatus;
00043 SERVICE_STATUS status;
00044 enum { SERV_NOP, SERV_INSTALL, SERV_REMOVE } serv_op;
00045
00046 #endif
00047 } context_t;
00048
00049
00050 extern context_t *ctx;
00051
00052 #ifdef __cplusplus
00053 }
00054 #endif
00055
00056 #endif