]> git.cworth.org Git - loudgame/blobdiff - loudgame.h
lg-set: Add a broadcast whenever a user finds a set.
[loudgame] / loudgame.h
index a65f5dd6aa38fce3dc546bd3d3af0e6710edf355..c899727eb0a5220a29145f1613b827695b02a346 100644 (file)
@@ -20,6 +20,7 @@
 #ifndef __LOUDGAME_H__
 #define __LOUDGAME_H__
 
+#include <stdarg.h>
 #include <loudmouth/loudmouth.h>
 
 typedef struct _loudgame loudgame_t;
@@ -33,7 +34,10 @@ struct _loudgame {
     gchar              *name;
     gchar              *passwd;
     LmConnection       *connection;
+
     GMainLoop          *main_loop;
+    GHashTable         *players;
+
     int                         return_value;
 
     /* Callbacks */
@@ -51,6 +55,32 @@ loudgame_send (loudgame_t    *lg,
               const char       *peer,
               const char       *message);
 
+void
+loudgame_sendf (loudgame_t     *lg,
+               const char      *peer,
+               const char      *format,
+               ...);
+
+void
+loudgame_vsendf (loudgame_t    *lg,
+                const char     *peer,
+                const char     *format,
+                va_list         va);
+
+void
+loudgame_broadcast (loudgame_t *lg,
+                   const char *message);
+
+void
+loudgame_vbroadcastf (loudgame_t *lg,
+                     const char *format,
+                     va_list     va);
+
+void
+loudgame_broadcastf (loudgame_t        *lg,
+                    const char *format,
+                    ...);
+
 void
 loudgame_quit (loudgame_t *lg, int return_value);