conn: xmpp_conn_open_stream() sends user-supplied tag

Default opening tag doesn't allow to implement XEP-0174. In this case
client needs to send specific attributes. As solution user passes
attributes that are sent inside opening tag. Previous variant of this
function is renamed to xmpp_conn_open_stream_default().

The way to pass attributes is not the best one, but it's used to conform
existent interface of xmpp_stanza_get_attributes().

Remove "raw" suffix from functions that work with a raw connection.
This commit is contained in:
Dmitry Podgorny
2016-09-06 22:06:29 +03:00
parent dd7aeff5d2
commit 229215b49c
4 changed files with 163 additions and 40 deletions

View File

@@ -244,8 +244,10 @@ int xmpp_connect_raw(xmpp_conn_t * const conn,
unsigned short altport,
xmpp_conn_handler callback,
void * const userdata);
int xmpp_conn_raw_open_stream(xmpp_conn_t * const conn);
int xmpp_conn_raw_tls_start(xmpp_conn_t * const conn);
int xmpp_conn_open_stream_default(xmpp_conn_t * const conn);
int xmpp_conn_open_stream(xmpp_conn_t * const conn, char **attributes,
size_t attributes_len);
int xmpp_conn_tls_start(xmpp_conn_t * const conn);
void xmpp_disconnect(xmpp_conn_t * const conn);