1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68
|
/*
* ion/mod_mgmtmode/main.c
*
* Copyright (c) Tuomo Valkonen 2004-2007.
*
* See the included file LICENSE for details.
*/
#include <libextl/readconfig.h>
#include <ioncore/saveload.h>
#include <ioncore/bindmaps.h>
#include "exports.h"
/*{{{ Module information */
#include "../version.h"
char mod_mgmtmode_ion_api_version[]=ION_API_VERSION;
/*}}}*/
/*{{{ Bindmaps */
WBindmap *mod_mgmtmode_bindmap=NULL;
/*}}}*/
/*{{{ Init & deinit */
void mod_mgmtmode_deinit()
{
if(mod_mgmtmode_bindmap!=NULL){
ioncore_free_bindmap("WMgmtMode", mod_mgmtmode_bindmap);
mod_mgmtmode_bindmap=NULL;
}
mod_mgmtmode_unregister_exports();
}
bool mod_mgmtmode_init()
{
mod_mgmtmode_bindmap=ioncore_alloc_bindmap("WMgmtMode", NULL);
if(mod_mgmtmode_bindmap==NULL)
return FALSE;
if(!mod_mgmtmode_register_exports()){
mod_mgmtmode_deinit();
return FALSE;
}
extl_read_config("cfg_mgmtmode", NULL, TRUE);
return TRUE;
}
/*}}}*/
|