Dynamically bind xmpp module api

This commit is contained in:
James Booth
2013-12-18 20:16:55 +00:00
parent f47bd58a1c
commit 81909ef000
8 changed files with 192 additions and 141 deletions

View File

@@ -107,11 +107,12 @@ caps_contains(const char * const caps_str)
return (g_hash_table_lookup(capabilities, caps_str) != NULL);
}
Capabilities *
caps_get(const char * const caps_str)
static Capabilities *
_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)
@@ -303,11 +304,12 @@ caps_create_query_response_stanza(xmpp_ctx_t * const ctx)
return query;
}
void
caps_close(void)
static void
_caps_close(void)
{
g_hash_table_destroy(capabilities);
}
void (*caps_close)(void) = _caps_close;
static void
_caps_destroy(Capabilities *caps)