Introduce generic xmpp_conn_set_*() API

Instead of having a multitude of setter API functions for configuration
options, provide generic ones for the different types we have.

Signed-off-by: Steffen Jaeckel <jaeckel-floss@eyet-services.de>
This commit is contained in:
Steffen Jaeckel
2024-01-29 12:01:34 +01:00
committed by Steffen Jaeckel
parent 5690c4ed89
commit 06f2ba19b4
12 changed files with 500 additions and 229 deletions

View File

@@ -269,8 +269,8 @@ int main(int argc, char **argv)
log = xmpp_get_default_logger(XMPP_LEVEL_INFO);
ctx = xmpp_ctx_new(NULL, log);
conn = xmpp_conn_new(ctx);
xmpp_conn_set_jid(conn, jid);
xmpp_conn_set_pass(conn, pass);
xmpp_conn_set_string(conn, XMPP_SETTING_JID, jid);
xmpp_conn_set_string(conn, XMPP_SETTING_PASS, pass);
vcard.ctx = ctx;
xmpp_connect_client(conn, NULL, 0, conn_handler, &vcard);
xmpp_run(ctx);