00001
00011 #ifndef __MAIN_H
00012 #define __MAIN_H
00013 #include "timeio.h"
00014 #include "jsoc.h"
00015 #include "timer.h"
00016 #include "xassert.h"
00017 #include "drms_types.h"
00018 #include "cmdparams.h"
00019 #include "drms_env.h"
00020 #include "drms_series.h"
00021 #include "drms_keyword.h"
00022 #include "drms_link.h"
00023 #include "drms_record.h"
00024 #include "drms_segment.h"
00025 #include "drms_array.h"
00026 #include "drms_protocol.h"
00027 #include "drms_statuscodes.h"
00028 #include "drms_parser.h"
00029 #include "drms_network.h"
00030 #include "drms_names.h"
00031 #include "util.h"
00032 #include "drms_dsdsapi.h"
00033 #include "drms_defs.h"
00034
00035 #define kARCHIVEARG "DRMS_ARCHIVE"
00036 #define kRETENTIONARG "DRMS_RETENTION"
00037 #define kQUERYMEMARG "DRMS_QUERY_MEM"
00038 #define kSERVERWAITARG "DRMS_SERVER_WAIT"
00039 #define kLoopConn "loopconn"
00040 #define kDBTimeOut "DRMS_DBTIMEOUT"
00041 #define kNewSuRetention "DRMS_NEWSURETENTION"
00042 #define kCreateShadows "DRMS_SHADOW"
00043 #define kDBUtf8ClientEncoding "DRMS_DBUTF8CLIENTENCODING"
00044
00045 extern CmdParams_t cmdparams;
00046
00047 extern DRMS_Env_t *drms_env;
00048
00049
00053
00249 extern ModuleArgs_t module_args[];
00253 extern ModuleArgs_t *gModArgs;
00257 extern char *module_name;
00258
00259
00260
00261
00262
00263 extern int DoIt (void);
00264
00265 CmdParams_t *GetGlobalCmdParams(void);
00266
00267 int RegisterDoItCleaner(DRMS_Env_t *env, pFn_Cleaner_t cb, void *data);
00268
00269 int JSOCMAIN_Main(int argc, char **argv, const char *module_name, int (*CallDoIt)(void));
00270 int JSOCMAIN_Init(int argc,
00271 char **argv,
00272 const char *module_name,
00273 int *dolog,
00274 int *verbose,
00275 pid_t *drms_server_pid,
00276 pid_t *tee_pid,
00277 int *cont);
00278 int JSOCMAIN_Term(int dolog, int verbose, pid_t drms_server_pid, pid_t tee_pid, int abort_flag);
00279
00280 #ifdef FLIB
00281 void f_cmdparams_get_handle(pFHandleCmdParams handle);
00282 char *f_cmdparams_gethandle2();
00283 #endif
00284
00285 #endif