pep.c
changeset 18 fbe6977b37cc
parent 17 4a7cf0f5e85c
child 19 9ce7690c4dab
--- a/pep.c	Mon Feb 15 18:52:58 2010 +0200
+++ b/pep.c	Thu Mar 04 19:53:29 2010 +0200
@@ -20,15 +20,25 @@
  */
 
 #include <glib.h>
-#include <gmodule.h>
 #include <loudmouth/loudmouth.h>
 #include <string.h>
 
 #include <mcabber/xmpp.h>
 #include <mcabber/hooks.h>
+#include <mcabber/modules.h>
 
 #include "pep.h"
 
+static void pep_init   (void);
+static void pep_uninit (void);
+
+module_info_t info_pep = {
+	.mcabber_version = "0.10.0",
+	.requires        = NULL,
+	.init            = pep_init,
+	.uninit          = pep_uninit,
+};
+
 typedef struct pep_handler_struct pep_handler_t;
 
 struct pep_handler_struct {
@@ -167,7 +177,7 @@
 		pep_unregister_handlers ();
 }
 
-const gchar *g_module_check_init (GModule *module)
+static void pep_init (void)
 {
 	// create handlers
 	pep_message_handler = lm_message_handler_new (pep_message_event_handler, NULL, NULL);
@@ -178,11 +188,9 @@
 
 	// register handlers to connection
 	pep_register_handlers ();
-
-	return NULL;
 }
 
-void g_module_unload (GModule *module)
+static void pep_uninit (void)
 {
 	// release handlers
 	pep_unregister_handlers ();