about summary refs log tree commit diff stats
path: root/src
diff options
context:
space:
mode:
authorJames Booth <boothj5@gmail.com>2014-01-05 21:11:09 +0000
committerJames Booth <boothj5@gmail.com>2014-01-05 21:11:09 +0000
commit460a42c7c979d1eaed3eeb7210ff1178e04417d8 (patch)
tree8f903e1d2cdd9759ad32ce5d9165827138d90e5e /src
parent42fd1fb13e6273050226204a125919acfa92be4f (diff)
downloadprofani-tty-460a42c7c979d1eaed3eeb7210ff1178e04417d8.tar.gz
Moved handle_software_version_result to server_events
Diffstat (limited to 'src')
-rw-r--r--src/profanity.c8
-rw-r--r--src/profanity.h3
-rw-r--r--src/server_events.c7
-rw-r--r--src/server_events.h2
-rw-r--r--src/xmpp/iq.c3
5 files changed, 11 insertions, 12 deletions
diff --git a/src/profanity.c b/src/profanity.c
index 23beb1e1..a532254d 100644
--- a/src/profanity.c
+++ b/src/profanity.c
@@ -460,14 +460,6 @@ prof_handle_activity(void)
 }
 
 void
-prof_handle_version_result(const char * const jid, const char * const  presence,
-    const char * const name, const char * const version, const char * const os)
-{
-    cons_show_software_version(jid, presence, name, version, os);
-    ui_current_page_off();
-}
-
-void
 prof_handle_room_list(GSList *rooms, const char *conference_node)
 {
     cons_show_room_list(rooms, conference_node);
diff --git a/src/profanity.h b/src/profanity.h
index 7db0171d..8c5410b8 100644
--- a/src/profanity.h
+++ b/src/profanity.h
@@ -67,9 +67,6 @@ void prof_handle_room_invite(jabber_invite_t invite_type,
     const char * const reason);
 void prof_handle_idle(void);
 void prof_handle_activity(void);
-void prof_handle_version_result(const char * const jid,
-    const char * const presence, const char * const name,
-    const char * const version, const char * const os);
 void prof_handle_room_list(GSList *rooms, const char *conference_node);
 void prof_handle_disco_items(GSList *items, const char *jid);
 void prof_handle_disco_info(const char *from, GSList *identities,
diff --git a/src/server_events.c b/src/server_events.c
index 5bf605c3..565e4bcc 100644
--- a/src/server_events.c
+++ b/src/server_events.c
@@ -76,3 +76,10 @@ handle_failed_login(void)
     ui_current_page_off();
 }
 
+void
+handle_software_version_result(const char * const jid, const char * const  presence,
+    const char * const name, const char * const version, const char * const os)
+{
+    cons_show_software_version(jid, presence, name, version, os);
+    ui_current_page_off();
+}
diff --git a/src/server_events.h b/src/server_events.h
index 4a61a6a0..9f5dfabc 100644
--- a/src/server_events.h
+++ b/src/server_events.h
@@ -27,5 +27,7 @@ void handle_error_message(const char *from, const char *err_msg);
 void handle_login_account_success(char *account_name);
 void handle_lost_connection(void);
 void handle_failed_login(void);
+void handle_software_version_result(const char * const jid, const char * const  presence,
+    const char * const name, const char * const version, const char * const os);
 
 #endif
diff --git a/src/xmpp/iq.c b/src/xmpp/iq.c
index 369d7f7e..d3388cdd 100644
--- a/src/xmpp/iq.c
+++ b/src/xmpp/iq.c
@@ -35,6 +35,7 @@
 #include "log.h"
 #include "muc.h"
 #include "profanity.h"
+#include "server_events.h"
 #include "xmpp/capabilities.h"
 #include "xmpp/connection.h"
 #include "xmpp/stanza.h"
@@ -173,7 +174,7 @@ _iq_handle_version_result(xmpp_conn_t * const conn, xmpp_stanza_t * const stanza
 
     Resource *resource = p_contact_get_resource(contact, jidp->resourcepart);
     const char *presence = string_from_resource_presence(resource->presence);
-    prof_handle_version_result(jid, presence, name_str, version_str, os_str);
+    handle_software_version_result(jid, presence, name_str, version_str, os_str);
 
     jid_destroy(jidp);