1
0
mirror of https://github.com/profanity-im/profanity.git synced 2024-11-03 19:37:16 -05:00

Bind capabilities functions in main.c

This commit is contained in:
James Booth 2013-12-22 23:16:19 +00:00
parent c001f0e7cb
commit e818a6772b
3 changed files with 9 additions and 2 deletions

View File

@ -41,6 +41,7 @@ _init_modules(void)
{
jabber_init_module();
bookmark_init_module();
capabilities_init_module();
}
int

View File

@ -112,7 +112,6 @@ _caps_get(const char * const caps_str)
{
return g_hash_table_lookup(capabilities, caps_str);
}
Capabilities * (*caps_get)(const char * const) = _caps_get;
char *
caps_create_sha1_str(xmpp_stanza_t * const query)
@ -309,7 +308,6 @@ _caps_close(void)
{
g_hash_table_destroy(capabilities);
}
void (*caps_close)(void) = _caps_close;
static void
_caps_destroy(Capabilities *caps)
@ -328,3 +326,10 @@ _caps_destroy(Capabilities *caps)
free(caps);
}
}
void
capabilities_init_module(void)
{
caps_get = _caps_get;
caps_close = _caps_close;
}

View File

@ -76,6 +76,7 @@ typedef struct disco_identity_t {
void jabber_init_module(void);
void bookmark_init_module(void);
void capabilities_init_module(void);
// connection functions
void (*jabber_init)(const int disable_tls);