diff options
author | James Booth <boothj5@gmail.com> | 2016-05-06 01:16:13 +0100 |
---|---|---|
committer | James Booth <boothj5@gmail.com> | 2016-05-06 01:16:13 +0100 |
commit | 31b0f0b0c889f6b54ac4315130f7d6a5abca6668 (patch) | |
tree | d72dfddeda8582f0f52fa38d69700ddc253320db /src/xmpp | |
parent | d1c71e98f4f6b5271e97bc2a5274c92491bfdbd3 (diff) | |
download | profani-tty-31b0f0b0c889f6b54ac4315130f7d6a5abca6668.tar.gz |
Move uuid functions
Diffstat (limited to 'src/xmpp')
-rw-r--r-- | src/xmpp/connection.c | 14 | ||||
-rw-r--r-- | src/xmpp/session.c | 14 | ||||
-rw-r--r-- | src/xmpp/xmpp.h | 4 |
3 files changed, 16 insertions, 16 deletions
diff --git a/src/xmpp/connection.c b/src/xmpp/connection.c index 313d056c..90bbd951 100644 --- a/src/xmpp/connection.c +++ b/src/xmpp/connection.c @@ -176,6 +176,20 @@ connection_get_fulljid(void) return xmpp_conn_get_jid(conn.conn); } +char* +connection_create_uuid(void) +{ + return xmpp_uuid_gen(conn.ctx); +} + +void +connection_free_uuid(char *uuid) +{ + if (uuid) { + xmpp_free(conn.ctx, uuid); + } +} + char * connection_get_domain(void) { diff --git a/src/xmpp/session.c b/src/xmpp/session.c index 809e77ee..1dd10ee4 100644 --- a/src/xmpp/session.c +++ b/src/xmpp/session.c @@ -317,20 +317,6 @@ session_get_account_name(void) return saved_account.name; } -char* -session_create_uuid(void) -{ - return xmpp_uuid_gen(connection_get_ctx()); -} - -void -session_free_uuid(char *uuid) -{ - if (uuid) { - xmpp_free(connection_get_ctx(), uuid); - } -} - void session_add_available_resource(Resource *resource) { diff --git a/src/xmpp/xmpp.h b/src/xmpp/xmpp.h index 9651f7d9..ddee4bfa 100644 --- a/src/xmpp/xmpp.h +++ b/src/xmpp/xmpp.h @@ -119,8 +119,6 @@ void session_shutdown(void); void session_process_events(int millis); char* session_get_account_name(void); GList* session_get_available_resources(void); -char* session_create_uuid(void); -void session_free_uuid(char *uuid); gboolean session_send_stanza(const char *const stanza); #ifdef HAVE_LIBMESODE @@ -133,6 +131,8 @@ gboolean session_service_supports(const char *const feature); jabber_conn_status_t connection_get_status(void); char *connection_get_presence_msg(void); const char* connection_get_fulljid(void); +char* connection_create_uuid(void); +void connection_free_uuid(char *uuid); char* message_send_chat(const char *const barejid, const char *const msg, const char *const oob_url); char* message_send_chat_otr(const char *const barejid, const char *const msg); |