]> code.citadel.org Git - citadel.git/blobdiff - citadel/modules/jabber/serv_xmpp.c
Define an XMPP queue...
[citadel.git] / citadel / modules / jabber / serv_xmpp.c
index 31c0142bc98a6da8bc140434bcd43e15c5981135..66a32097ca740fd982df1bccda496ef3fda9aa52 100644 (file)
@@ -51,6 +51,7 @@
 #include <expat.h>
 #include "serv_xmpp.h"
 
+struct xmpp_event *xmpp_queue = NULL;
 
 /* We have just received a <stream> tag from the client, so send them ours */
 
@@ -365,6 +366,19 @@ void xmpp_async_loop(void) {
 }
 
 
+/*
+ * Login hook for XMPP sessions
+ */
+void xmpp_login_hook(void) {
+
+       // we need to somehow alert all xmpp sessions that we are here
+       // and do a roster push followed by a presence push
+
+       lprintf(CTDL_DEBUG, "LOGIN HOOOOOOOOOOOOOKK!!!\n");
+
+}
+
+
 const char *CitadelServiceXMPP="XMPP";
 
 #endif /* HAVE_EXPAT */
@@ -380,6 +394,8 @@ CTDL_MODULE_INIT(jabber)
                                        xmpp_async_loop,
                                        CitadelServiceXMPP);
                CtdlRegisterSessionHook(xmpp_cleanup_function, EVT_STOP);
+                CtdlRegisterSessionHook(xmpp_login_hook, EVT_LOGIN);
+
        #else
                lprintf(CTDL_INFO, "This server is missing the Expat XML parser.  Jabber service will be disabled.\n");
 #endif