diff options
author | James Booth <boothj5@gmail.com> | 2015-10-12 23:37:11 +0100 |
---|---|---|
committer | James Booth <boothj5@gmail.com> | 2015-10-12 23:37:11 +0100 |
commit | 6e28df66e89943e42243d0a36734b7b7b5310c2f (patch) | |
tree | 356e84cb7f2745f54deae03f62756131b4b1bf66 /src/xmpp | |
parent | de15d47be4bb43f039a27bbd39dc41fd7e10ad59 (diff) | |
download | profani-tty-6e28df66e89943e42243d0a36734b7b7b5310c2f.tar.gz |
Use libstrophe/libmesode uuid generator
Diffstat (limited to 'src/xmpp')
-rw-r--r-- | src/xmpp/connection.c | 14 | ||||
-rw-r--r-- | src/xmpp/xmpp.h | 2 |
2 files changed, 16 insertions, 0 deletions
diff --git a/src/xmpp/connection.c b/src/xmpp/connection.c index abc08732..5ad5e108 100644 --- a/src/xmpp/connection.c +++ b/src/xmpp/connection.c @@ -310,6 +310,20 @@ jabber_get_account_name(void) return saved_account.name; } +char* +jabber_create_uuid(void) +{ + return xmpp_uuid_gen(jabber_conn.ctx); +} + +void +jabber_free_uuid(char *uuid) +{ + if (uuid) { + xmpp_free(jabber_conn.ctx, uuid); + } +} + void connection_set_presence_message(const char * const message) { diff --git a/src/xmpp/xmpp.h b/src/xmpp/xmpp.h index 2a8cbb59..839df9a7 100644 --- a/src/xmpp/xmpp.h +++ b/src/xmpp/xmpp.h @@ -150,6 +150,8 @@ jabber_conn_status_t jabber_get_connection_status(void); char * jabber_get_presence_message(void); char* jabber_get_account_name(void); GList * jabber_get_available_resources(void); +char* jabber_create_uuid(void); +void jabber_free_uuid(char *uuid); // message functions char* message_send_chat(const char * const barejid, const char * const msg); |