00001 /*************************************************************************** 00002 begin : Tue Jan 15 2002 00003 copyright : (C) 2002 by Christian Hoenig & Gunter Ohrner 00004 email : pdepp@CustomCDROM.de 00005 ***************************************************************************/ 00006 00007 /*************************************************************************** 00008 * * 00009 * This program is free software; you can redistribute it and/or modify * 00010 * it under the terms of the GNU General Public License as published by * 00011 * the Free Software Foundation; either version 2 of the License, or * 00012 * (at your option) any later version. * 00013 * * 00014 ***************************************************************************/ 00015 00021 #ifndef MODULE_PREINIT_H_FLAG 00022 #define MODULE_PREINIT_H_FLAG 00023 00024 #include "common.h" 00025 00026 #include "conftable.h" 00027 #include "http.h" 00028 #include "logger.h" 00029 #include "mime.h" 00030 #include "reqhandler_file.h" 00031 00042 static int preinitAll() 00043 { 00044 if (logfilesInit()) 00045 { 00046 // logerr(PDEPP_CORE, CRITICAL, errno, "initServer: could not open logfile"); 00047 return -1; 00048 } 00049 00050 mimeInit(getEntryDefl(CONFENTRY_KEY_MIMETYPES, STD_CONFENTRY_VAL_MIMETYPES)); 00051 00052 chModulePreInit(); 00053 htModulePreInit(); 00054 rhfModulePreInit(); 00055 00056 return 0; 00057 } 00058 00059 00069 static int terminateAll() 00070 { 00071 rhfModuleTerminate(); 00072 htModuleTerminate(); 00073 chModuleTerminate(); 00074 00075 mimeTerminate(); 00076 terminateConftable(); 00077 logfilesTerminate(); 00078 00079 return 0; 00080 } 00081 00082 00083 #endif