about summary refs log tree commit diff stats
path: root/src/ui/notifier.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/ui/notifier.c')
-rw-r--r--src/ui/notifier.c46
1 files changed, 30 insertions, 16 deletions
diff --git a/src/ui/notifier.c b/src/ui/notifier.c
index 403c215e..ebc61e0d 100644
--- a/src/ui/notifier.c
+++ b/src/ui/notifier.c
@@ -39,16 +39,16 @@
 static void _notify(const char * const message, int timeout,
     const char * const category);
 
-void
-notifier_init(void)
+static void
+_notifier_init(void)
 {
 #ifdef HAVE_LIBNOTIFY
     notify_init("Profanity");
 #endif
 }
 
-void
-notifier_uninit(void)
+static void
+_notifier_uninit(void)
 {
 #ifdef HAVE_LIBNOTIFY
     if (notify_is_initted()) {
@@ -57,8 +57,8 @@ notifier_uninit(void)
 #endif
 }
 
-void
-notify_typing(const char * const handle)
+static void
+_notify_typing(const char * const handle)
 {
     char message[strlen(handle) + 1 + 11];
     sprintf(message, "%s: typing...", handle);
@@ -66,8 +66,8 @@ notify_typing(const char * const handle)
     _notify(message, 10000, "Incoming message");
 }
 
-void
-notify_invite(const char * const from, const char * const room,
+static void
+_notify_invite(const char * const from, const char * const room,
     const char * const reason)
 {
     GString *message = g_string_new("Room invite\nfrom: ");
@@ -83,8 +83,8 @@ notify_invite(const char * const from, const char * const room,
     g_string_free(message, TRUE);
 }
 
-void
-notify_message(const char * const handle, int win)
+static void
+_notify_message(const char * const handle, int win)
 {
     char message[strlen(handle) + 1 + 14];
     sprintf(message, "%s: message (%d).", handle, win);
@@ -92,8 +92,8 @@ notify_message(const char * const handle, int win)
     _notify(message, 10000, "incoming message");
 }
 
-void
-notify_room_message(const char * const handle, const char * const room, int win)
+static void
+_notify_room_message(const char * const handle, const char * const room, int win)
 {
     GString *text = g_string_new("");
 
@@ -105,8 +105,8 @@ notify_room_message(const char * const handle, const char * const room, int win)
     g_string_free(text, TRUE);
 }
 
-void
-notify_subscription(const char * const from)
+static void
+_notify_subscription(const char * const from)
 {
     GString *message = g_string_new("Subscription request: \n");
     g_string_append(message, from);
@@ -114,8 +114,8 @@ notify_subscription(const char * const from)
     g_string_free(message, TRUE);
 }
 
-void
-notify_remind(void)
+static void
+_notify_remind(void)
 {
     gint unread = ui_unread();
     gint open = muc_invite_count();
@@ -206,3 +206,17 @@ _notify(const char * const message, int timeout,
     Shell_NotifyIcon(NIM_MODIFY, &nid);
 #endif
 }
+
+void
+notifier_init_module(void)
+{
+    notifier_init = _notifier_init;
+    notifier_uninit = _notifier_uninit;
+    notify_typing = _notify_typing;
+    notify_invite = _notify_invite;
+    notify_message = _notify_message;
+    notify_room_message =  _notify_room_message;
+    notify_subscription = _notify_subscription;
+    notify_remind = _notify_remind;
+}
+