#ifndef __LOUDGAME_H__
#define __LOUDGAME_H__
+#include <stdarg.h>
#include <loudmouth/loudmouth.h>
typedef struct _loudgame loudgame_t;
gchar *name;
gchar *passwd;
LmConnection *connection;
+
GMainLoop *main_loop;
+ GHashTable *players;
+
int return_value;
/* Callbacks */
handle_message_cb handle_message;
};
+#define LOUDGAME_HELP \
+"\tsay message \t\tSay 'message' to everyone in the current game\n" \
+"\twhisper user message\tSay 'message' to 'user' only\n"
+
int
loudgame_init (loudgame_t *lg, int argc, char **argv);
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);