mirror of
https://github.com/profanity-im/profanity.git
synced 2024-11-03 19:37:16 -05:00
Move uuid functions
This commit is contained in:
parent
d1c71e98f4
commit
31b0f0b0c8
@ -3465,9 +3465,9 @@ cmd_join(ProfWin *window, const char *const command, gchar **args)
|
|||||||
ProfAccount *account = accounts_get_account(account_name);
|
ProfAccount *account = accounts_get_account(account_name);
|
||||||
|
|
||||||
GString *room_str = g_string_new("");
|
GString *room_str = g_string_new("");
|
||||||
char *uuid = session_create_uuid();
|
char *uuid = connection_create_uuid();
|
||||||
g_string_append_printf(room_str, "private-chat-%s@%s", uuid, account->muc_service);
|
g_string_append_printf(room_str, "private-chat-%s@%s", uuid, account->muc_service);
|
||||||
session_free_uuid(uuid);
|
connection_free_uuid(uuid);
|
||||||
|
|
||||||
presence_join_room(room_str->str, account->muc_nick, NULL);
|
presence_join_room(room_str->str, account->muc_nick, NULL);
|
||||||
muc_join(room_str->str, account->muc_nick, NULL, FALSE);
|
muc_join(room_str->str, account->muc_nick, NULL, FALSE);
|
||||||
|
@ -176,6 +176,20 @@ connection_get_fulljid(void)
|
|||||||
return xmpp_conn_get_jid(conn.conn);
|
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 *
|
char *
|
||||||
connection_get_domain(void)
|
connection_get_domain(void)
|
||||||
{
|
{
|
||||||
|
@ -317,20 +317,6 @@ session_get_account_name(void)
|
|||||||
return saved_account.name;
|
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
|
void
|
||||||
session_add_available_resource(Resource *resource)
|
session_add_available_resource(Resource *resource)
|
||||||
{
|
{
|
||||||
|
@ -119,8 +119,6 @@ void session_shutdown(void);
|
|||||||
void session_process_events(int millis);
|
void session_process_events(int millis);
|
||||||
char* session_get_account_name(void);
|
char* session_get_account_name(void);
|
||||||
GList* session_get_available_resources(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);
|
gboolean session_send_stanza(const char *const stanza);
|
||||||
|
|
||||||
#ifdef HAVE_LIBMESODE
|
#ifdef HAVE_LIBMESODE
|
||||||
@ -133,6 +131,8 @@ gboolean session_service_supports(const char *const feature);
|
|||||||
jabber_conn_status_t connection_get_status(void);
|
jabber_conn_status_t connection_get_status(void);
|
||||||
char *connection_get_presence_msg(void);
|
char *connection_get_presence_msg(void);
|
||||||
const char* connection_get_fulljid(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(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);
|
char* message_send_chat_otr(const char *const barejid, const char *const msg);
|
||||||
|
@ -49,12 +49,12 @@ session_get_tls_peer_cert(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
char* session_create_uuid(void)
|
char* connection_create_uuid(void)
|
||||||
{
|
{
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
void session_free_uuid(char * uuid) {}
|
void connection_free_uuid(char * uuid) {}
|
||||||
|
|
||||||
jabber_conn_status_t connection_get_status(void)
|
jabber_conn_status_t connection_get_status(void)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user