# HG changeset patch # User Myhailo Danylenko # Date 1267725056 -7200 # Node ID 0539bca09f116c87e652596a447ccbad048e7d46 # Parent 91987ea19f24fd21c7be02d2dfca55bdf5785406 New module loading scheme diff -r 91987ea19f24 -r 0539bca09f11 CMakeLists.txt --- a/CMakeLists.txt Mon Feb 15 17:51:21 2010 +0200 +++ b/CMakeLists.txt Thu Mar 04 19:50:56 2010 +0200 @@ -22,7 +22,6 @@ ## Check for build dependencies find_package(PkgConfig REQUIRED) pkg_check_modules(GLIB REQUIRED glib-2.0) -pkg_check_modules(GMODULE REQUIRED gmodule-2.0) pkg_check_modules(LM REQUIRED loudmouth-1.0) pkg_check_modules(MCABBER REQUIRED mcabber) include(CheckSymbolExists) @@ -31,7 +30,6 @@ set(CMAKE_REQUIRED_FLAGS ${LM_LDFLAGS} ${LM_CFLAGS}) check_symbol_exists(lm_connection_unregister_reply_handler loudmouth/loudmouth.h HAVE_LM_CONNECTION_UNREGISTER_REPLY_HANDLER) link_directories(${GLIB_LIBRARY_DIRS} - ${GMODULE_LIBRARY_DIRS} ${LM_LIBRARY_DIRS} ${MCABBER_LIBRARY_DIRS}) @@ -41,11 +39,9 @@ ## Compiler setup configure_file(config.h.in config.h) include_directories(SYSTEM ${GLIB_INCLUDE_DIRS} - ${GMODULE_INCLUDE_DIRS} ${LM_INCLUDE_DIRS} ${MCABBER_INCLUDE_DIRS}) target_link_libraries(disco ${GLIB_LIBRARIES} - ${GMODULE_LIBRARIES} ${LM_LIBRARIES} ${MCABBER_LIBRARIES}) include_directories(${disco_SOURCE_DIR} diff -r 91987ea19f24 -r 0539bca09f11 disco.c --- a/disco.c Mon Feb 15 17:51:21 2010 +0200 +++ b/disco.c Thu Mar 04 19:50:56 2010 +0200 @@ -19,7 +19,6 @@ * along with this program. If not, see . */ #include -#include #include #include @@ -32,12 +31,27 @@ #include #include #include +#include #include "disco.h" #include "config.h" // +// module description +// + +static void disco_init (void); +static void disco_uninit (void); + +module_info_t info_disco = { + .mcabber_version = "0.10.0", + .requires = NULL, + .init = disco_init, + .uninit = disco_uninit, +}; + +// // private types // @@ -598,7 +612,7 @@ return; } -const gchar *g_module_check_init(GModule *module) +static void disco_init (void) { // completion disco_cid = compl_new_category (); @@ -613,10 +627,10 @@ // command cmd_add ("disco", "", disco_cid, COMPL_JID, do_disco, NULL); - return NULL; + return; } -void g_module_unload(GModule *module) +static void disco_uninit (void) { // command cmd_del ("disco"); diff -r 91987ea19f24 -r 0539bca09f11 disco.rc --- a/disco.rc Mon Feb 15 17:51:21 2010 +0200 +++ b/disco.rc Thu Mar 04 19:50:56 2010 +0200 @@ -1,3 +1,3 @@ -load disco +module load disco