Skip to content
This repository was archived by the owner on Oct 29, 2021. It is now read-only.

Commit 9015df8

Browse files
committed
Merge remote-tracking branch 'upstream/master'
Conflicts: configure.ac
2 parents 6bb3507 + 5e0330f commit 9015df8

File tree

8 files changed

+1455
-929
lines changed

8 files changed

+1455
-929
lines changed

ChangeLog

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@
33
- Legacy SSL support
44
- Initial Android support
55
- Resolver returns all SRV records instead of one. Lookup is performed
6-
according to RFC2052.
6+
according to RFC2052
77
- xmpp_connect_raw() provides access to a xmpp_conn object just after
88
establishing TCP connection. This allows to implement in-band
9-
registration, authentication mechanisms or serverless messaging.
9+
registration, authentication mechanisms or serverless messaging
1010
- xmpp_conn_t object is reusable now and can be reconnected with saving
11-
all handlers, flags, jid and password.
11+
all handlers, flags, jid and password
1212
- New API:
1313
- xmpp_uuid_gen()
1414
- xmpp_connect_raw()

Doxyfile

Lines changed: 1418 additions & 919 deletions
Large diffs are not rendered by default.

build-android.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,19 @@ DIR=`dirname $0`
44
EXPAT_PATH="$DIR/expat"
55
EXPAT_FILE='lib/expat.h'
66

7+
echo
8+
echo Attention: libstrophe will be built without TLS support. To enable TLS
9+
echo you need to replace \'src/tls_dummy.c\' with \'src/tls_opnessl.c\' in
10+
echo \'jni/Android.mk\', add path to the openssl headers and link your program
11+
echo with libssl and libcrypto.
12+
echo
13+
714
if [ ! -d $EXPAT_PATH ]; then
815
mkdir $EXPAT_PATH
916
fi
1017

1118
# TODO Accept expat tarball as argument and extract it to the right place.
19+
# Or download sources from sf.net.
1220

1321
if [ ! -d $EXPAT_PATH/lib -o ! -f "$EXPAT_PATH/$EXPAT_FILE" ]; then
1422
cat <<EOT

src/conn.c

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -533,17 +533,19 @@ int xmpp_connect_component(xmpp_conn_t * const conn, const char * const server,
533533

534534
/** Initiate a raw connection to the XMPP server.
535535
* Arguments and behaviour of the function are similar to
536-
* xmpp_connect_client(), but it skips authentication process. Instead,
537-
* the user's callback is called with event XMPP_CONN_RAW_CONNECT as soon
538-
* as tcp connection is established.
536+
* xmpp_connect_client(), but it skips authentication process. In opposite to
537+
* xmpp_connect_client() during connection process two events are generated
538+
* instead of one. User's callback is called with event XMPP_CONN_RAW_CONNECT
539+
* when the TCP connection with the server is established. At this point user
540+
* might want to open an XMPP stream with xmpp_conn_open_stream() or establish
541+
* TLS session with xmpp_conn_tls_start(). Event XMPP_CONN_CONNECT is generated
542+
* when the XMPP stream is opened successfully and user may send stanzas over
543+
* the connection.
539544
*
540545
* This function doesn't use password nor node part of a jid. Therefore,
541546
* the only required configuration is a domain (or full jid) passed via
542547
* xmpp_conn_set_jid().
543548
*
544-
* Next step should be xmpp_conn_open_stream(). In case of legacy SSL,
545-
* user might want to call xmpp_conn_tls_start() before opening the stream.
546-
*
547549
* @see xmpp_connect_client()
548550
*
549551
* @return XMPP_EOK (0) on success a number less than 0 on failure

src/rand.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,15 @@
2222
typedef struct _xmpp_rand_t xmpp_rand_t;
2323

2424
/** Create new xmpp_rand_t object.
25+
*
26+
* @param ctx A Strophe context object
2527
*
2628
* @ingroup Random
2729
*/
2830
xmpp_rand_t *xmpp_rand_new(xmpp_ctx_t *ctx);
2931
/** Destroy an xmpp_rand_t object.
32+
*
33+
* @param ctx A Strophe context object
3034
*
3135
* @ingroup Random
3236
*/
@@ -47,7 +51,10 @@ int xmpp_rand(xmpp_rand_t *rand);
4751
void xmpp_rand_bytes(xmpp_rand_t *rand, unsigned char *output, size_t len);
4852

4953
/** Generate a nonce that is printable randomized string.
54+
* This function doesn't allocate memory and doesn't fail.
5055
*
56+
* @param output A buffer where a NULL-terminated string will be placed.
57+
* The string will contain len-1 printable symbols.
5158
* @param len Number of bytes reserved for the output string, including
5259
* end of line '\0'.
5360
*

src/resolver.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ typedef struct resolver_srv_rr_struc {
3636
/** Perform lookup for RFC1035 message format.
3737
* This function allocates all elements.
3838
*
39+
* @param ctx a Strophe context object
3940
* @param buf message in RFC1035 format
4041
* @param len length of the message
4142
* @param srv_rr_list is the result
@@ -46,6 +47,7 @@ int resolver_srv_lookup_buf(xmpp_ctx_t *ctx, const unsigned char *buf,
4647
size_t len, resolver_srv_rr_t **srv_rr_list);
4748
/** Resolve SRV record.
4849
*
50+
* @param ctx a Strophe context object
4951
* @param service service of the SRV record
5052
* @param proto protocol of the SRV record
5153
* @param domain resolving domain
@@ -59,7 +61,8 @@ int resolver_srv_lookup(xmpp_ctx_t *ctx, const char *service, const char *proto,
5961
/** Release a list returned by resolver_srv_lookup() or
6062
* resolver_srv_lookup_buf().
6163
*
64+
* @param ctx a Strophe context object
6265
* @param srv_rr_list a list allocated by lookup functions
6366
*/
6467
void resolver_srv_free(xmpp_ctx_t *ctx, resolver_srv_rr_t *srv_rr_list);
65-
#endif /* __LIBSTROPHE_RESOLVER_H__ */
68+
#endif /* __LIBMESODE_RESOLVER_H__ */

src/stanza.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1101,6 +1101,7 @@ _stanza_new_with_attrs(xmpp_ctx_t *ctx, const char * const name,
11011101
/** Create a <message/> stanza object with given attributes.
11021102
* Attributes are optional and may be NULL.
11031103
*
1104+
* @param ctx a Strophe context object
11041105
* @param type attribute 'type'
11051106
* @param to attribute 'to'
11061107
* @param id attribute 'id'
@@ -1187,6 +1188,7 @@ int xmpp_message_set_body(xmpp_stanza_t *msg, const char * const text)
11871188
/** Create an <iq/> stanza object with given attributes.
11881189
* Attributes are optional and may be NULL.
11891190
*
1191+
* @param ctx a Strophe context object
11901192
* @param type attribute 'type'
11911193
* @param id attribute 'id'
11921194
*
@@ -1201,6 +1203,8 @@ xmpp_stanza_t *xmpp_iq_new(xmpp_ctx_t *ctx, const char * const type,
12011203
}
12021204

12031205
/** Create a <presence/> stanza object.
1206+
*
1207+
* @param ctx a Strophe context object
12041208
*
12051209
* @return a new Strophe stanza object
12061210
*

src/uuid.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424

2525
/** Generate UUID version 4 in pre-allocated buffer.
2626
*
27+
* @param ctx a Strophe context object
2728
* @param uuid pre-allocated buffer of size (XMPP_UUID_LEN + 1)
2829
*/
2930
static void crypto_uuid_gen(xmpp_ctx_t *ctx, char *uuid)
@@ -56,6 +57,8 @@ static void crypto_uuid_gen(xmpp_ctx_t *ctx, char *uuid)
5657
* This function allocates memory for the resulting string and must be freed
5758
* with xmpp_free().
5859
*
60+
* @param ctx a Strophe context object
61+
*
5962
* @return ASCIIZ string
6063
*/
6164
char *xmpp_uuid_gen(xmpp_ctx_t *ctx)

0 commit comments

Comments
 (0)