conn: added new API xmpp_conn_set_flags()

xmpp_conn_set_flags() and xmpp_conn_get_flags() unify interface of
connection configuration.
This interface allows compile-time check of supported features or even
run-time check. Therefore, applications can be built with older
libstrophe which doesn't support some optional flags.
This commit is contained in:
Dmitry Podgorny
2015-10-14 23:19:10 +03:00
parent e41b7a06e4
commit 182803926b
7 changed files with 105 additions and 27 deletions

View File

@@ -137,7 +137,7 @@ struct _xmpp_handlist_t {
enum {
XMPP_PORT_CLIENT = 5222,
XMPP_PORT_CLIENT_OLD_SSL = 5223,
XMPP_PORT_CLIENT_LEGACY_SSL = 5223,
XMPP_PORT_COMPONENT = 5347,
};
@@ -157,7 +157,8 @@ struct _xmpp_conn_t {
int tls_support;
int tls_disabled;
int tls_is_old_ssl;
int tls_mandatory;
int tls_legacy_ssl;
int tls_failed; /* set when tls fails, so we don't try again */
int sasl_support; /* if true, field is a bitfield of supported
mechanisms */