mirror of
https://github.com/profanity-im/profanity.git
synced 2024-12-04 14:46:46 -05:00
Bind capabilities functions in main.c
This commit is contained in:
parent
c001f0e7cb
commit
e818a6772b
@ -41,6 +41,7 @@ _init_modules(void)
|
||||
{
|
||||
jabber_init_module();
|
||||
bookmark_init_module();
|
||||
capabilities_init_module();
|
||||
}
|
||||
|
||||
int
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user