ObjXMPP  Check-in [e701117140]

Overview
Comment:Documentation improvements.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: e701117140e9ef7450e80eda1422fd40b897ddab15607b4594823420b92e68c5
User & Date: js on 2012-02-03 15:12:04
Other Links: manifest | tags
Context
2012-02-03
15:20
More documentation improvements. check-in: cdb78d79ac user: js tags: trunk
15:12
Documentation improvements. check-in: e701117140 user: js tags: trunk
15:00
Add missing import check-in: 6a978bc7bf user: florob@babelmonkeys.de tags: trunk
Changes

Modified src/XMPPAuthenticator.h from [0cd7759ddf] to [0fe63041be].

31
32
33
34
35
36
37
38

39
40

41
42

43
44
45
46
47
48


49
50
51
52
53
54
55
56
57
58
59


60
61
62
63
64
65
66
67
68
69
70


71

72
73
74
75


76
77
78
79
80
81
82
83
84
85
86
87
31
32
33
34
35
36
37

38
39

40
41

42
43
44
45
46


47
48
49
50
51
52
53
54
55
56
57


58
59
60
61
62
63
64
65
66
67
68
69
70
71
72

73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91







-
+

-
+

-
+




-
-
+
+









-
-
+
+











+
+
-
+




+
+












	OFString *authzid;
	OFString *authcid;
	OFString *password;
/// \endcond
}

#ifdef OF_HAVE_PROPERTIES
/// The authzid to get authorization for
/// \brief The authzid to get authorization for
@property (copy) OFString *authzid;
/// The authcid to authenticate with
/// \brief The authcid to authenticate with
@property (copy) OFString *authcid;
/// The password to authenticate with
/// \brief The password to authenticate with
@property (copy) OFString *password;
#endif

/**
 * Initializes an already allocated XMPPAuthenticator with an authcid
 * and password.
 * \brief Initializes an already allocated XMPPAuthenticator with an authcid
 *	  and password.
 *
 * \param authcid The authcid to authenticate with
 * \param password The password to authenticate with
 * \return A initialized XMPPAuthenticator
 */
- initWithAuthcid: (OFString*)authcid
	 password: (OFString*)password;

/**
 * Initializes an already allocated XMPPSCRAMAuthenticator with an authzid,
 * authcid and password.
 * \brief Initializes an already allocated XMPPSCRAMAuthenticator with an
 *	  authzid, authcid and password.
 *
 * \param authzid The authzid to get authorization for
 * \param authcid The authcid to authenticate with
 * \param password The password to authenticate with
 * \return A initialized XMPPAuthenticator
 */
- initWithAuthzid: (OFString*)authzid
	  authcid: (OFString*)authcid
	 password: (OFString*)password;

/**
 * \brief Returns an OFDataArray containing the initial authentication message.
 *
 * \return A OFDataAray containing the initial authentication message
 * \return An OFDataAray containing the initial authentication message
 */
- (OFDataArray*)initialMessage;

/**
 * \brief Continue authentication with the specified data.
 *
 * \param data The continuation data send by the server
 * \return The appropriate response if the data was a challenge, nil otherwise
 */
- (OFDataArray*)continueWithData: (OFDataArray*)data;

- (void)setAuthzid: (OFString*)authzid;
- (OFString*)authzid;
- (void)setAuthcid: (OFString*)authcid;
- (OFString*)authcid;
- (void)setPassword: (OFString*)password;
- (OFString*)password;
@end

Modified src/XMPPConnection.h from [958c307992] to [52a0a49cc3].

166
167
168
169
170
171
172


173
174
175
176
177
178

179
180
181
182
183
184
185

186
187
188
189
190
191
192

193
194
195
196
197

198
199
200
201
202
203



204
205
206
207
208

209
210
211
212
213

214
215
216
217
218
219
220
221
222
223
224


225
226
227
228
229


230
231
232
233
234
235

236
237
238
239
240
241


242
243
244
245
246
247

248
249
250
251
252
253
254

255
256
257
258
259
260
261
262
263
264
265
266

267
268
269
270
271
272
273
274
275

276
277
278
279
280
281
282
166
167
168
169
170
171
172
173
174
175
176
177
178
179

180
181
182
183
184
185
186

187
188
189
190
191
192
193

194
195
196
197
198

199
200
201
202
203


204
205
206
207
208
209
210

211
212
213
214
215

216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241

242
243
244
245
246
247
248
249
250
251
252
253
254
255

256
257
258
259
260
261
262

263
264
265
266
267
268
269
270
271
272
273
274

275
276
277
278
279
280
281
282
283

284
285
286
287
288
289
290
291







+
+





-
+






-
+






-
+




-
+




-
-
+
+
+




-
+




-
+











+
+





+
+





-
+






+
+





-
+






-
+











-
+








-
+







@property (readonly, retain, getter=socket) OFTCPSocket *sock;
@property BOOL encryptionRequired;
/// \brief Whether the connection is encrypted
@property (readonly) BOOL encrypted;
#endif

/**
 * \brief Creates a new autoreleased XMPPConnection.
 *
 * \return A new autoreleased XMPPConnection
 */
+ connection;

/**
 * Adds the specified delegate.
 * \brief Adds the specified delegate.
 *
 * \param delegate The delegate to add
 */
- (void)addDelegate: (id <XMPPConnectionDelegate>)delegate;

/**
 * Removes the specified delegate.
 * \brief Removes the specified delegate.
 *
 * \param delegate The delegate to remove
 */
- (void)removeDelegate: (id <XMPPConnectionDelegate>)delegate;

/**
 * Connects to the XMPP service.
 * \brief Connects to the XMPP service.
 */
- (void)connect;

/**
 * Closes the stream to the XMPP service
 * \brief Closes the stream to the XMPP service
 */
- (void)close;

/**
 * Checks the certificate presented by the server.
 * Throws SSLInvalidCertificateException on failure.
 * \brief Checks the certificate presented by the server.
 *
 * \throw SSLInvalidCertificateException Thrown if the certificate is invalid
 */
- (void)checkCertificate;

/**
 * Starts a loop handling incomming data.
 * \brief Starts a loop handling incomming data.
 */
- (void)handleConnection;

/**
 * Parses the specified buffer.
 * \brief Parses the specified buffer.
 *
 * This is useful for handling multiple connections at once.
 *
 * \param buffer The buffer to parse
 * \param length The length of the buffer. If length is 0, it is assumed that
 *		 the connection was closed.
 */
- (void)parseBuffer: (const char*)buffer
	 withLength: (size_t)length;

/**
 * \brief Returns the socket used by the XMPPConnection.
 *
 * \return The socket used by the XMPPConnection
 */
- (OFTCPSocket*)socket;

/**
 * \brief Returns whether encryption is encrypted.
 *
 * \return Whether encryption is encrypted
 */
- (BOOL)encryptionRequired;

/**
 * Sets whether encryption is required.
 * \brief Sets whether encryption is required.
 *
 * \param required Whether encryption is required
 */
- (void)setEncryptionRequired: (BOOL)required;

/**
 * \brief Returns whether the connection is encrypted.
 *
 * \return Whether the connection is encrypted
 */
- (BOOL)encrypted;

/**
 * Sends an OFXMLElement, usually an XMPPStanza.
 * \brief Sends an OFXMLElement, usually an XMPPStanza.
 *
 * \param element The element to send
 */
- (void)sendStanza: (OFXMLElement*)element;

/**
 * Sends an XMPPIQ, registering a callback method
 * \brief Sends an XMPPIQ, registering a callback method.
 *
 * \param object The object that contains the callback method
 * \param selector The selector of the callback method,
 *		   must take exactly one parameter of type XMPPIQ*
 */
-	(void)sendIQ: (XMPPIQ*)iq
  withCallbackObject: (id)object
	    selector: (SEL)selector;

#ifdef OF_HAVE_BLOCKS
/**
 * Sends an XMPPIQ, registering a callback block
 * \brief Sends an XMPPIQ, registering a callback block.
 *
 * \param callback The callback block
 */
-      (void)sendIQ: (XMPPIQ*)iq
  withCallbackBlock: (void(^)(XMPPIQ*))block;
#endif

/**
 * Generates a new, unique stanza ID.
 * \brief Generates a new, unique stanza ID.
 *
 * \return A new, generated, unique stanza ID.
 */
- (OFString*)generateStanzaID;

- (void)setUsername: (OFString*)username;
- (OFString*)username;

Modified src/XMPPEXTERNALAuth.h from [f8ca977188] to [9e692e1add].

24
25
26
27
28
29
30
31

32
33
34
35
36
37
38

39
40
41
42
43
44
24
25
26
27
28
29
30

31
32
33
34
35
36
37

38
39
40
41
42
43
44







-
+






-
+






#import "XMPPAuthenticator.h"

/**
 * \brief A class to authenticate using SASL EXTERNAL
 */
@interface XMPPEXTERNALAuth: XMPPAuthenticator
/**
 * Creates a new autoreleased XMPPEXTERNALAuth.
 * \brief Creates a new autoreleased XMPPEXTERNALAuth.
 *
 * \return A new autoreleased XMPPEXTERNALAuth
 */
+ EXTERNALAuth;

/**
 * Creates a new autoreleased XMPPEXTERNALAuth with an authzid.
 * \brief Creates a new autoreleased XMPPEXTERNALAuth with an authzid.
 *
 * \param authzid The authzid to get authorization for
 * \return A new autoreleased XMPPEXTERNALAuth
 */
+ EXTERNALAuthWithAuthzid: (OFString*)authzid;
@end

Modified src/XMPPExceptions.h from [f066866cc9] to [3a47c0db95].

32
33
34
35
36
37
38
39

40
41
42
43
44

45
46
47
48
49
50
51
52
53
54
55

56
57
58
59
60
61
62
32
33
34
35
36
37
38

39
40
41
42
43

44
45
46
47
48
49
50
51
52
53
54

55
56
57
58
59
60
61
62







-
+




-
+










-
+







{
/// \cond internal
	XMPPConnection *connection;
/// \end
}

#ifdef OF_HAVE_PROPERTIES
/// The connection the exception relates to
/// \brief The connection the exception relates to
@property (readonly, assign) XMPPConnection *connection;
#endif

/**
 * Creates a new XMPPException
 * \brief Creates a new XMPPException.
 *
 * \param class_ The class of the object which caused the exception
 * \param connection The connection that received the data responsible
 *	  for this exception
 * \return A new XMPPException
 */
+ exceptionWithClass: (Class)class_
	  connection: (XMPPConnection*)connection;

/**
 * Initializes an already allocated XMPPException
 * \brief Initializes an already allocated XMPPException.
 *
 * \param class_ The class of the object which caused the exception
 * \param connection The connection that received the data responsible
 *	  for this exception
 * \return An initialized XMPPException
 */
- initWithClass: (Class)class_
73
74
75
76
77
78
79
80

81
82

83
84
85
86
87

88
89
90
91
92
93
94
95
96
97
98
99
100
101

102
103
104
105
106
107
108
73
74
75
76
77
78
79

80
81

82
83
84
85
86

87
88
89
90
91
92
93
94
95
96
97
98
99
100

101
102
103
104
105
106
107
108







-
+

-
+




-
+













-
+







/// \cond internal
	OFString *condition;
	OFString *reason;
/// \endcond
}

#ifdef OF_HAVE_PROPERTIES
/// The defined error condition specified by the stream error
/// \brief The defined error condition specified by the stream error
@property (readonly, assign) OFString *condition;
/// The descriptive free-form text specified by the stream error
/// \brief The descriptive free-form text specified by the stream error
@property (readonly, assign) OFString *reason;
#endif

/**
 * Creates a new XMPPStreamErrorException
 * \brief Creates a new XMPPStreamErrorException.
 *
 * \param class_ The class of the object which caused the exception
 * \param connection The connection that received the stream error
 * \param condition The defined error condition specified by the stream error
 * \param reason The descriptive free-form text specified by the stream error
 * \return A new XMPPStreamErrorException
 */
+ exceptionWithClass: (Class)class_
	  connection: (XMPPConnection*)connection
	   condition: (OFString*)condition
	      reason: (OFString*)reason;

/**
 * Initializes an already allocated XMPPStreamErrorException
 * \brief Initializes an already allocated XMPPStreamErrorException.
 *
 * \param class_ The class of the object which caused the exception
 * \param connection The connection that received the stream error
 * \param condition The defined error condition specified by the stream error
 * \param reason The descriptive free-form text specified by the stream error
 * \return An initialized XMPPStreamErrorException
 */
124
125
126
127
128
129
130
131

132
133

134
135
136
137
138

139
140
141
142
143
144
145
146
147
148
149
150
151
152

153
154
155
156
157
158
159
124
125
126
127
128
129
130

131
132

133
134
135
136
137

138
139
140
141
142
143
144
145
146
147
148
149
150
151

152
153
154
155
156
157
158
159







-
+

-
+




-
+













-
+







/// \cond internal
	OFString *profile;
	OFString *string;
/// \endcond
}

#ifdef OF_HAVE_PROPERTIES
/// The name of the stringprep profile that did not apply
/// \brief The name of the stringprep profile that did not apply
@property (readonly, assign) OFString *profile;
/// The string that failed the stringprep profile
/// \brief The string that failed the stringprep profile
@property (readonly, assign) OFString *string;
#endif

/**
 * Creates a new XMPPStringPrepFailedException
 * \brief Creates a new XMPPStringPrepFailedException.
 *
 * \param class_ The class of the object which caused the exception
 * \param connection The connection the string relates to
 * \param profile The name of the stringprep profile that did not apply
 * \param string The string that failed the stringprep profile
 * \return A new XMPPStringPrepFailedException
 */
+ exceptionWithClass: (Class)class_
	  connection: (XMPPConnection*)connection
	     profile: (OFString*)profile
	      string: (OFString*)string;

/**
 *  Initializes an already allocated XMPPStringPrepFailedException
 * \brief Initializes an already allocated XMPPStringPrepFailedException.
 *
 * \param class_ The class of the object which caused the exception
 * \param connection The connection the string relates to
 * \param profile The name of the stringprep profile that did not apply
 * \param string The string that failed the stringprep profile
 * \return An initialized XMPPStringPrepFailedException
 */
174
175
176
177
178
179
180
181

182
183

184
185
186
187
188

189
190
191
192
193
194
195
196
197
198
199
200
201
202

203
204
205
206
207
208
209
174
175
176
177
178
179
180

181
182

183
184
185
186
187

188
189
190
191
192
193
194
195
196
197
198
199
200
201

202
203
204
205
206
207
208
209







-
+

-
+




-
+













-
+







/// \cond internal
	OFString *operation;
	OFString *string;
/// \endcond
}

#ifdef OF_HAVE_PROPERTIES
/// The IDNA translation operation which failed
/// \brief The IDNA translation operation which failed
@property (readonly, assign) OFString *operation;
/// The string that could not be translated
/// \brief The string that could not be translated
@property (readonly, assign) OFString *string;
#endif

/**
 * Creates a new XMPPIDNATranslationFailedException
 * \brief Creates a new XMPPIDNATranslationFailedException.
 *
 * \param class_ The class of the object which caused the exception
 * \param connection The connection the string relates to
 * \param operation The name of the stringprep profile that did not apply
 * \param string The string that could not be translated
 * \return A new XMPPIDNATranslationFailedException
 */
+ exceptionWithClass: (Class)class_
	  connection: (XMPPConnection*)connection
	   operation: (OFString*)operation
	      string: (OFString*)string;

/**
 * Initializes an already allocated XMPPIDNATranslationFailedException
 * \brief Initializes an already allocated XMPPIDNATranslationFailedException.
 *
 * \param class_ The class of the object which caused the exception
 * \param connection The connection the string relates to
 * \param operation The name of the stringprep profile that did not apply
 * \param string The string that could not be translated
 * \return An initialized XMPPIDNATranslationFailedException
 */
223
224
225
226
227
228
229
230

231
232
233
234
235

236
237
238
239
240
241
242
243
244
245
246
247

248
249
250
251
252
253
254
255
256
257
258
259
223
224
225
226
227
228
229

230
231
232
233
234

235
236
237
238
239
240
241
242
243
244
245
246

247
248
249
250
251
252
253
254
255
256
257
258
259







-
+




-
+











-
+












{
/// \cond internal
	OFString *reason;
/// \endcond
}

#ifdef OF_HAVE_PROPERTIES
/// The reason the authentication failed
/// \brief The reason the authentication failed
@property (readonly, assign) OFString *reason;
#endif

/**
 * Creates a new XMPPAuthFailedException
 * \brief Creates a new XMPPAuthFailedException.
 *
 * \param class_ The class of the object which caused the exception
 * \param connection The connection that could not be authenticated
 * \param reason The reason the authentication failed
 * \return A new XMPPAuthFailedException
 */
+ exceptionWithClass: (Class)class_
	  connection: (XMPPConnection*)connection
	      reason: (OFString*)reason;

/**
 * Initializes an already allocated XMPPAuthFailedException
 * \brief Initializes an already allocated XMPPAuthFailedException.
 *
 * \param class_ The class of the object which caused the exception
 * \param connection The connection that could not be authenticated
 * \param reason The reason the authentication failed
 * \return An initialized XMPPAuthFailedException
 */
- initWithClass: (Class)class_
     connection: (XMPPConnection*)connection
	 reason: (OFString*)reason;

- (OFString*)reason;
@end

Modified src/XMPPIQ.h from [7810d97c14] to [66d8f3bede].

24
25
26
27
28
29
30
31

32
33
34
35
36
37
38
39
40
41


42
43
44
45
46
47
48
49
50
51

52
53
54
55
56
57
58

59
60
61


62
63
64
65
66
67
68
69
70

71
72

73
74
75
76
77
78
24
25
26
27
28
29
30

31
32
33
34
35
36
37
38
39
40

41
42
43
44
45
46
47
48
49
50
51

52
53
54
55
56
57
58

59
60


61
62
63
64
65
66
67
68
69
70

71
72

73
74
75
76
77
78
79







-
+









-
+
+









-
+






-
+

-
-
+
+








-
+

-
+






#import "XMPPStanza.h"

/**
 * \brief A class describing an IQ stanza.
 */
@interface XMPPIQ: XMPPStanza
/**
 * Creates a new XMPPIQ with the specified type and id.
 * \brief Creates a new XMPPIQ with the specified type and ID.
 *
 * \param type The value for the stanza's type attribute
 * \param ID The value for the stanza's id attribute
 * \return A new autoreleased XMPPIQ
 */
+ IQWithType: (OFString*)type
	  ID: (OFString*)ID;

/**
 * Initializes an already allocated XMPPIQ with the specified type and id
 * \brief Initializes an already allocated XMPPIQ with the specified type and
 *	  ID.
 *
 * \param type The value for the stanza's type attribute
 * \param ID The value for the stanza's id attribute
 * \return An initialized XMPPIQ
 */
- initWithType: (OFString*)type
	    ID: (OFString*)ID;

/**
 * Generates a result IQ for the receiving object
 * \brief Generates a result IQ for the receiving object.
 *
 * \return A new autoreleased XMPPIQ
 */
- (XMPPIQ*)resultIQ;

/**
 * Generates a error IQ for the receiving object
 * \brief Generates an error IQ for the receiving object.
 *
 * \param type A error type as defined by RFC 6120
 * \param condition A error condition as defined by RFC 6120
 * \param type An error type as defined by RFC 6120
 * \param condition An error condition as defined by RFC 6120
 * \param text A descriptive text
 * \return A new autoreleased XMPPIQ
 */
- (XMPPIQ*)errorIQWithType: (OFString*)type
		 condition: (OFString*)condition
		      text: (OFString*)text;

/**
 * Generates a error IQ for the receiving object
 * \brief Generates an error IQ for the receiving object.
 *
 * \param type A error type as defined by RFC 6120
 * \param type An error type as defined by RFC 6120
 * \param condition A defined conditions from RFC 6120
 * \return A new autoreleased XMPPIQ
 */
- (XMPPIQ*)errorIQWithType: (OFString*)type
		 condition: (OFString*)condition;
@end

Modified src/XMPPJID.h from [9a904b032f] to [190df7c77d].

32
33
34
35
36
37
38
39

40
41

42
43

44
45
46
47
48

49
50
51
52
53
54
55

56
57
58
59
60
61
62
63

64
65
66
67
68
69
70


71
72
73
74
75


76
77
78
79
80
81
82
83
84
85
86
32
33
34
35
36
37
38

39
40

41
42

43
44
45
46
47

48
49
50
51
52
53
54

55
56
57
58
59
60
61
62

63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90







-
+

-
+

-
+




-
+






-
+







-
+







+
+





+
+











	OFString *node;
	OFString *domain;
	OFString *resource;
/// \endcond
}

#ifdef OF_HAVE_PROPERTIES
/// The JID's localpart
/// \brief The JID's localpart
@property (copy) OFString *node;
/// The JID's domainpart
/// \brief The JID's domainpart
@property (copy) OFString *domain;
/// The JID's resourcepart
/// \brief The JID's resourcepart
@property (copy) OFString *resource;
#endif

/**
 * Creates a new autoreleased XMPPJID.
 * \brief Creates a new autoreleased XMPPJID.
 *
 * \return A new autoreleased XMPPJID
 */
+ JID;

/**
 * Creates a new autoreleased XMPPJID from a string.
 * \brief Creates a new autoreleased XMPPJID from a string.
 *
 * \param str The string to parse into a JID object
 * \return A new autoreleased XMPPJID
 */
+ JIDWithString: (OFString*)str;

/**
 * Initializes an already allocated XMPPJID with a string.
 * \brief Initializes an already allocated XMPPJID with a string.
 *
 * \param str The string to parse into a JID object
 * \return A initialized XMPPJID
 */
- initWithString: (OFString*)str;

/**
 * \brief Returns the bare JID.
 *
 * \return An OFString containing the bare JID
 */
- (OFString*)bareJID;

/**
 * \brief Returns the full JID.
 *
 * \return An OFString containing the full JID
 */
- (OFString*)fullJID;

- (void)setNode: (OFString*)node;
- (OFString*)node;
- (void)setDomain: (OFString*)domain;
- (OFString*)domain;
- (void)setResource: (OFString*)resource;
- (OFString*)resource;
@end

Modified src/XMPPMessage.h from [e60bd2862b] to [51a4c22e67].

24
25
26
27
28
29
30

31
32
33
34
35

36
37
38
39
40
41
42

43
44
45
46
47
48
49
50

51
52
53
54
55
56
57
58

59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75

76
77
78
79
80
81
82
83

84
85
86
87
88
89
90
91


92
93
94
95
96
97
98
99
100
101

102
103
104
105
106
107
108

109
110
111
112
113
24
25
26
27
28
29
30
31
32
33
34
35

36
37
38
39
40
41
42

43
44
45
46
47
48
49
50

51
52
53
54
55
56
57
58

59
60
61
62
63
64
65
66
67
68








69
70
71
72
73
74
75
76

77
78
79
80
81
82
83
84

85
86
87
88
89
90
91
92
93
94
95

96
97
98
99
100
101
102

103
104
105
106
107
108







+




-
+






-
+







-
+







-
+









-
-
-
-
-
-
-
-
+







-
+







-
+
+









-
+






-
+





#import "XMPPStanza.h"

/**
 * \brief A class describing a message stanza.
 */
@interface XMPPMessage: XMPPStanza
#ifdef OF_HAVE_PROPERTIES
/// \brief The text content of the body of the message
@property (copy) OFString *body;
#endif

/**
 * Creates a new autoreleased XMPPMessage.
 * \brief Creates a new autoreleased XMPPMessage.
 *
 * \return A new autoreleased XMPPMessage
 */
+ message;

/**
 * Creates a new autoreleased XMPPMessage with the specified id.
 * \brief Creates a new autoreleased XMPPMessage with the specified ID.
 *
 * \param ID The value for the stanza's id attribute
 * \return A new autoreleased XMPPMessage
 */
+ messageWithID: (OFString*)ID;

/**
 * Creates a new autoreleased XMPPMessage with the specified type.
 * \brief Creates a new autoreleased XMPPMessage with the specified type.
 *
 * \param type The value for the stanza's type attribute
 * \return A new autoreleased XMPPMessage
 */
+ messageWithType: (OFString*)type;

/**
 * Creates a new autoreleased XMPPMessage with the specified type and id.
 * \brief Creates a new autoreleased XMPPMessage with the specified type and ID.
 *
 * \param type The value for the stanza's type attribute
 * \param ID The value for the stanza's id attribute
 * \return A new autoreleased XMPPMessage
 */
+ messageWithType: (OFString*)type
	       ID: (OFString*)ID;

/**
 * Initializes an already allocated XMPPMessage.
 *
 * \return A initialized XMPPMessage
 */
- init;

/**
 * Initializes an already allocated XMPPMessage with the specified id.
 * \brief Initializes an already allocated XMPPMessage with the specified ID.
 *
 * \param ID The value for the stanza's id attribute
 * \return A initialized XMPPMessage
 */
- initWithID: (OFString*)ID;

/**
 * Initializes an already allocated XMPPMessage with the specified type.
 * \brief Initializes an already allocated XMPPMessage with the specified type.
 *
 * \param type The value for the stanza's type attribute
 * \return A initialized XMPPMessage
 */
- initWithType: (OFString*)type;

/**
 * Initializes an already allocated XMPPMessage with the specified type and id.
 * \brief Initializes an already allocated XMPPMessage with the specified type
 *	  and ID.
 *
 * \param type The value for the stanza's type attribute
 * \param ID The value for the stanza's id attribute
 * \return A initialized XMPPMessage
 */
- initWithType: (OFString*)type
	    ID: (OFString*)ID;

/**
 * Sets the text content of the body of the XMPPMessage.
 * \brief Sets the text content of the body of the XMPPMessage.
 *
 * \param body The text content of the body element or nil to remove the body
 */
- (void)setBody: (OFString*)body;

/**
 * Returns the text content of the body element of the XMPPMessage.
 * \brief Returns the text content of the body element of the XMPPMessage.
 *
 * \return The text content of the body element of the XMPPMessage.
 */
- (OFString*)body;
@end

Modified src/XMPPMulticastDelegate.h from [e8290add4f] to [437cf7b9b4].

31
32
33
34
35
36
37
38

39
40
41
42
43
44
45

46
47
48
49
50
51
52

53
54
55
56
57
58
59
60
61

62
63
64
65
66
67
68
69
70
31
32
33
34
35
36
37

38
39
40
41
42
43
44

45
46
47
48
49
50
51

52
53
54
55
56
57
58
59
60

61
62
63
64
65
66
67
68
69
70







-
+






-
+






-
+








-
+









{
/// \cond internal
	OFDataArray *delegates;
/// \endcond
}

/**
 * Adds a delegate to the set of managed delegates
 * \brief Adds a delegate which should receive the broadcasts.
 *
 * \param delegate The delegate to add
 */
- (void)addDelegate: (id)delegate;

/**
 * Removes a delegate from the set of managed delegates
 * \brief Removes a delegate so it does not receive the broadcasts anymore.
 *
 * \param delegate The delegate to remove
 */
- (void)removeDelegate: (id)delegate;

/**
 * Broadcasts a selector with one object to all managed delegates
 * \brief Broadcasts a selector with an object to all registered delegates.
 *
 * \param selector The selector to broadcast
 * \param object The object to broadcast
 */
- (BOOL)broadcastSelector: (SEL)selector
	       withObject: (id)object;

/**
 * Broadcasts a selector with two objects to all managed delegates
 * \brief Broadcasts a selector with two objects to all registered delegates.
 *
 * \param selector The selector to broadcast
 * \param object1 The first object to broadcast
 * \param object2 The second object to broadcast
 */
- (BOOL)broadcastSelector: (SEL)selector
	       withObject: (id)object1
	       withObject: (id)object2;
@end

Modified src/XMPPPLAINAuth.h from [838ab06906] to [c63de3602e].

24
25
26
27
28
29
30
31

32
33
34
35
36
37
38
39
40
41
42


43
44
45
46
47
48
49
50
51
52
24
25
26
27
28
29
30

31
32
33
34
35
36
37
38
39
40


41
42
43
44
45
46
47
48
49
50
51
52







-
+









-
-
+
+










#import "XMPPAuthenticator.h"

/**
 * \brief A class to authenticate using SASL PLAIN
 */
@interface XMPPPLAINAuth: XMPPAuthenticator
/**
 * Creates a new autoreleased XMPPPLAINAuth with an authcid and password.
 * \brief Creates a new autoreleased XMPPPLAINAuth with an authcid and password.
 *
 * \param authcid The authcid to authenticate with
 * \param password The password to authenticate with
 * \return A new autoreleased XMPPPLAINAuth
 */
+ PLAINAuthWithAuthcid: (OFString*)authcid
	      password: (OFString*)password;

/**
 * Creates a new autoreleased XMPPPLAINAuth with an authzid,
 * authcid and password.
 * \brief Creates a new autoreleased XMPPPLAINAuth with an authzid, authcid and
 *	  password.
 *
 * \param authzid The authzid to get authorization for
 * \param authcid The authcid to authenticate with
 * \param password The password to authenticate with
 * \return A new autoreleased XMPPPLAINAuth
 */
+ PLAINAuthWithAuthzid: (OFString*)authzid
	       authcid: (OFString*)authcid
	      password: (OFString*)password;
@end

Modified src/XMPPPresence.h from [6579dcabcb] to [db99e5889b].

24
25
26
27
28
29
30
31

32
33
34
35
36
37
38

39
40
41
42
43
44
45
46

47
48
49
50
51
52
53
54


55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71

72
73
74
75
76
77
78
79

80
81
82
83
84
85
86
87


88
89
90
91
92
93
94
95
96
97

98
99
100
101
102
103
104

105
106
107
108
109
110
111

112
113
114
115
116
24
25
26
27
28
29
30

31
32
33
34
35
36
37

38
39
40
41
42
43
44
45

46
47
48
49
50
51
52
53

54
55
56
57
58
59
60
61
62
63
64








65
66
67
68
69
70
71
72

73
74
75
76
77
78
79
80

81
82
83
84
85
86
87
88
89
90
91

92
93
94
95
96
97
98

99
100
101
102
103
104
105

106
107
108
109
110
111







-
+






-
+







-
+







-
+
+









-
-
-
-
-
-
-
-
+







-
+







-
+
+









-
+






-
+






-
+





#import "XMPPStanza.h"

/**
 * \brief A class describing a presence stanza.
 */
@interface XMPPPresence: XMPPStanza
/**
 * Creates a new autoreleased XMPPPresence.
 * \brief Creates a new autoreleased XMPPPresence.
 *
 * \return A new autoreleased XMPPPresence
 */
+ presence;

/**
 * Creates a new autoreleased XMPPPresence with the specified id.
 * \brief Creates a new autoreleased XMPPPresence with the specified ID.
 *
 * \param ID The value for the stanza's id attribute
 * \return A new autoreleased XMPPPresence
 */
+ presenceWithID: (OFString*)ID;

/**
 * Creates a new autoreleased XMPPPresence with the specified type.
 * \brief Creates a new autoreleased XMPPPresence with the specified type.
 *
 * \param type The value for the stanza's type attribute
 * \return A new autoreleased XMPPPresence
 */
+ presenceWithType: (OFString*)type;

/**
 * Creates a new autoreleased XMPPPresence with the specified type and id.
 * \brief Creates a new autoreleased XMPPPresence with the specified type and
 *	  ID.
 *
 * \param type The value for the stanza's type attribute
 * \param ID The value for the stanza's id attribute
 * \return A new autoreleased XMPPPresence
 */
+ presenceWithType: (OFString*)type
		ID: (OFString*)ID;

/**
 * Initializes an already allocated XMPPPresence.
 *
 * \return A initialized XMPPPresence
 */
- init;

/**
 * Initializes an already allocated XMPPPresence with the specified id.
 * \brief Initializes an already allocated XMPPPresence with the specified ID.
 *
 * \param ID The value for the stanza's id attribute
 * \return A initialized XMPPPresence
 */
- initWithID: (OFString*)ID;

/**
 * Initializes an already allocated XMPPPresence with the specified type.
 * \brief Initializes an already allocated XMPPPresence with the specified type.
 *
 * \param type The value for the stanza's type attribute
 * \return A initialized XMPPPresence
 */
- initWithType: (OFString*)type;

/**
 * Initializes an already allocated XMPPPresence with the specified type and id.
 * \brief Initializes an already allocated XMPPPresence with the specified type
 *	  and ID.
 *
 * \param type The value for the stanza's type attribute
 * \param ID The value for the stanza's id attribute
 * \return A initialized XMPPPresence
 */
- initWithType: (OFString*)type
	    ID: (OFString*)ID;

/**
 * Adds a show element to the presence stanza.
 * \brief Adds a show element to the presence stanza.
 *
 * \param show The text content of the show element
 */
- (void)addShow: (OFString*)show;

/**
 * Adds a status element to the presence stanza.
 * \brief Adds a status element to the presence stanza.
 *
 * \param status The text content of the status element
 */
- (void)addStatus: (OFString*)status;

/**
 * Adds a priority element to the presence stanza.
 * \brief Adds a priority element to the presence stanza.
 *
 * \param priority The text content of the priority element
 */
- (void)addPriority: (int8_t)priority;
@end

Modified src/XMPPRoster.h from [0285d089da] to [d2f88013f2].

38
39
40
41
42
43
44
45
46


47
48
49
50
51
52
53

54
55
56
57
58
59
60
61
62
63

64
65
66
67
68
69
70
71
72
73
74
75
76
77
78

79
80
81
82
83
84
85
86
87


88
89
90
91
92
93
94

95
96
97
98
99

100
101
102
103
104
105
106

107
108
109
110
111
112
113

114
115
116
117
118
119
120

121
122
123
124
125
126
127

128
129
130
131
132
133
134
38
39
40
41
42
43
44


45
46
47
48
49
50
51
52

53
54
55
56
57
58
59
60
61
62

63
64
65
66
67
68
69
70
71
72
73
74
75
76
77

78
79
80
81
82
83
84
85
86

87
88
89
90
91
92
93
94

95
96
97
98
99

100
101
102
103
104
105
106

107
108
109
110
111
112
113

114
115
116
117
118
119
120

121
122
123
124
125
126
127

128
129
130
131
132
133
134
135







-
-
+
+






-
+









-
+














-
+








-
+
+






-
+




-
+






-
+






-
+






-
+






-
+







#ifndef XMPP_ROSTER_M
    <OFObject>
#endif
#ifdef OF_HAVE_OPTIONAL_PROTOCOLS
@optional
#endif
/**
 * This callback is called after the roster was received (as a result of
 * calling -requestRoster.
 * \brief This callback is called after the roster was received (as a result of
 *	  calling -requestRoster).
 *
 * \param roster The roster that was received
 */
- (void)rosterWasReceived: (XMPPRoster*)roster;

/**
 * This callback is called whenever a roster push was received.
 * \brief This callback is called whenever a roster push was received.
 *
 * \param roster The roster that was updated by the roster push
 * \param rosterItem The roster item received in the push
 */
-         (void)roster: (XMPPRoster*)roster
  didReceiveRosterItem: (XMPPRosterItem*)rosterItem;
@end

/**
 * \brief A class implementing roster related functionality
 * \brief A class implementing roster related functionality.
 */
@interface XMPPRoster: OFObject
#ifdef OF_HAVE_OPTIONAL_PROTOCOLS
    <XMPPConnectionDelegate>
#endif
{
/// \cond internal
	XMPPConnection *connection;
	OFMutableDictionary *rosterItems;
	XMPPMulticastDelegate *delegates;
/// \endcond
}

/**
 * Initializes an already allocated XMPPRoster
 * \brief Initializes an already allocated XMPPRoster.
 *
 * \param connection The connection roster related stanzas
 *	  are send and received over
 * \return An initialized XMPPRoster
 */
- initWithConnection: (XMPPConnection*)connection;

/**
 * Returns the list of contacts as a OFDictionary with the bare JID as key
 * \brief Returns the list of contacts as an OFDictionary with the bare JID as
 *	  a string as key.
 *
 * \return An autoreleased copy of the dictionary containing the roster items
 */
- (OFDictionary*)rosterItems;

/**
 * Requests the roster from the server
 * \brief Requests the roster from the server.
 */
- (void)requestRoster;

/**
 * Adds a new contact to the roster
 * \brief Adds a new contact to the roster.
 *
 * \param rosterItem The roster item to add to the roster
 */
- (void)addRosterItem: (XMPPRosterItem*)rosterItem;

/**
 * Updates an already existing contact in the roster
 * \brief Updates an already existing contact in the roster.
 *
 * \param rosterItem The roster item to update
 */
- (void)updateRosterItem: (XMPPRosterItem*)rosterItem;

/**
 * Delete a contact from the roster
 * \brief Delete a contact from the roster.
 *
 * \param rosterItem The roster item to delete
 */
- (void)deleteRosterItem: (XMPPRosterItem*)rosterItem;

/**
 * Adds the specified delegate
 * \brief Adds the specified delegate.
 *
 * \param delegate The delegate to add
 */
- (void)addDelegate: (id <XMPPRosterDelegate>)delegate;

/**
 * Removes the specified delegate
 * \brief Removes the specified delegate.
 *
 * \param delegate The delegate to remove
 */
- (void)removeDelegate: (id <XMPPRosterDelegate>)delegate;

/// \cond internal
- (void)XMPP_addRosterItem: (XMPPRosterItem*)rosterItem;

Modified src/XMPPRosterItem.h from [109ad297e3] to [00eaee168b].

1
2

3
4
5
6
7
8
9
1

2
3
4
5
6
7
8
9

-
+







/*
 * Copyright (c) 2011, Jonathan Schleifer <js@webkeks.org>
 * Copyright (c) 2011, 2012, Jonathan Schleifer <js@webkeks.org>
 *
 * https://webkeks.org/hg/objxmpp/
 *
 * Permission to use, copy, modify, and/or distribute this software for any
 * purpose with or without fee is hereby granted, provided that the above
 * copyright notice and this permission notice is present in all copies.
 *
34
35
36
37
38
39
40

41

42

43

44
45
46





47

48
49
50
51
52
53
54
55
56
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66







+

+

+

+



+
+
+
+
+

+









	OFString *name;
	OFString *subscription;
	OFArray *groups;
/// \endcond
}

#ifdef OF_HAVE_PROPERTIES
/// \brief The JID of the roster item
@property (copy) XMPPJID *JID;
/// \brief The name of the roster item to show to the user
@property (copy) OFString *name;
/// \brief The subscription for the roster item
@property (copy) OFString *subscription;
/// \brief An array of groups in which the roster item is
@property (copy) OFArray *groups;
#endif

/**
 * \brief Creates a new autoreleased roster item.
 *
 * \return A new autoreleased roster item.
 */
+ rosterItem;

- (void)setJID: (XMPPJID*)JID;
- (XMPPJID*)JID;
- (void)setName: (OFString*)name;
- (OFString*)name;
- (void)setSubscription: (OFString*)subscription;
- (OFString*)subscription;
- (void)setGroups: (OFArray*)groups;
- (OFArray*)groups;
@end

Modified src/XMPPSCRAMAuth.h from [f6a39a6afe] to [deda90ec9d].

38
39
40
41
42
43
44
45

46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62


63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80


81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97


98
99
100
101
102
103
104
38
39
40
41
42
43
44

45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60


61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79

80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96


97
98
99
100
101
102
103
104
105







-
+















-
-
+
+

















-
+
+















-
-
+
+







	XMPPConnection *connection;
	BOOL plusAvailable;
	BOOL authenticated;
/// \endcond
}

/**
 * Creates a new autoreleased XMPPSCRAMAuth with an authcid and password.
 * \brief Creates a new autoreleased XMPPSCRAMAuth with an authcid and password.
 *
 * \param authcid The authcid to authenticate with
 * \param password The password to authenticate with
 * \param connection The connection over which authentication is done
 * \param hash The class to use for calulating hashes
 * \param plusAvailable Whether the PLUS variant was offered
 * \return A new autoreleased XMPPSCRAMAuth
 */
+ SCRAMAuthWithAuthcid: (OFString*)authcid
	      password: (OFString*)password
	    connection: (XMPPConnection*)connection
		  hash: (Class)hash
	 plusAvailable: (BOOL)plusAvailable;

/**
 * Creates a new autoreleased XMPPSCRAMAuth with an authzid,
 * authcid and password.
 * \brief Creates a new autoreleased XMPPSCRAMAuth with an authzid, authcid and
 *	  password.
 *
 * \param authzid The authzid to get authorization for
 * \param authcid The authcid to authenticate with
 * \param password The password to authenticate with
 * \param connection The connection over which authentication is done
 * \param hash The class to use for calulating hashes
 * \param plusAvailable Whether the PLUS variant was offered
 * \return A new autoreleased XMPPSCRAMAuth
 */
+ SCRAMAuthWithAuthzid: (OFString*)authzid
	       authcid: (OFString*)authcid
	      password: (OFString*)password
	    connection: (XMPPConnection*)connection
		  hash: (Class)hash
	 plusAvailable: (BOOL)plusAvailable;

/**
 * Initializes an already allocated XMPPSCRAMAuth with an authcid and password.
 * \brief Initializes an already allocated XMPPSCRAMAuth with an authcid and
 *	  password.
 *
 * \param authcid The authcid to authenticate with
 * \param password The password to authenticate with
 * \param connection The connection over which authentication is done
 * \param hash The class to use for calulating hashes
 * \param plusAvailable Whether the PLUS variant was offered
 * \return A initialized XMPPSCRAMAuth
 */
- initWithAuthcid: (OFString*)authcid
	 password: (OFString*)password
       connection: (XMPPConnection*)connection
	     hash: (Class)hash
    plusAvailable: (BOOL)plusAvailable;

/**
 * Initializes an already allocated XMPPSCRAMAuth with a authzid,
 * authcid and password.
 * \brief Initializes an already allocated XMPPSCRAMAuth with a authzid,
 *	  authcid and password.
 *
 * \param authzid The authzid to get authorization for
 * \param authcid The authcid to authenticate with
 * \param password The password to authenticate with
 * \param connection The connection over which authentication is done
 * \param hash The class to use for calulating hashes
 * \param plusAvailable Whether the PLUS variant was offered

Modified src/XMPPStanza.h from [ecb78e970b] to [b1e074823d].

35
36
37
38
39
40
41
42

43
44

45
46

47
48

49
50
51
52
53

54
55
56
57
58
59
60
61


62
63
64
65
66
67
68
69
70
71

72
73
74
75
76
77
78
79
80
81


82
83
84
85
86
87
88
89
90
91
92
93

94
95
96
97
98
99
100
101

102
103
104
105
106
107
108
109


110
111
112
113
114
115
116
117
118
119


120
121
122
123
124
125
126
127
128
129
130


131
132
133
134
135
136
137
138
139
140
141
142

143
144
145
146
147
148
149
35
36
37
38
39
40
41

42
43

44
45

46
47

48
49
50
51
52

53
54
55
56
57
58
59
60

61
62
63
64
65
66
67
68
69
70
71

72
73
74
75
76
77
78
79
80
81

82
83
84
85
86
87
88
89
90
91
92
93
94

95
96
97
98
99
100
101
102

103
104
105
106
107
108
109
110

111
112
113
114
115
116
117
118
119
120
121

122
123
124
125
126
127
128
129
130
131
132


133
134
135
136
137
138
139
140
141
142
143
144
145

146
147
148
149
150
151
152
153







-
+

-
+

-
+

-
+




-
+







-
+
+









-
+









-
+
+











-
+







-
+







-
+
+









-
+
+









-
-
+
+











-
+







	XMPPJID *to;
	OFString *type;
	OFString *ID;
/// \endcond
}

#ifdef OF_HAVE_PROPERTIES
/// The value of the stanza's from attribute
/// \brief The value of the stanza's from attribute
@property (copy) XMPPJID *from;
/// The value of the stanza's to attribute
/// \brief The value of the stanza's to attribute
@property (copy) XMPPJID *to;
/// The value of the stanza's type attribute
/// \brief The value of the stanza's type attribute
@property (copy) OFString *type;
/// The value of the stanza's id attribute
/// \brief The value of the stanza's id attribute
@property (copy) OFString *ID;
#endif

/**
 * Creates a new autoreleased XMPPStanza with the specified name.
 * \brief Creates a new autoreleased XMPPStanza with the specified name.
 *
 * \param name The stanza's name (one of iq, message or presence)
 * \return A new autoreleased XMPPStanza
 */
+ stanzaWithName: (OFString*)name;

/**
 * Creates a new autoreleased XMPPStanza with the specified name and type.
 * \brief Creates a new autoreleased XMPPStanza with the specified name and
 *	  type.
 *
 * \param name The stanza's name (one of iq, message or presence)
 * \param type The value for the stanza's type attribute
 * \return A new autoreleased XMPPStanza
 */
+ stanzaWithName: (OFString*)name
	    type: (OFString*)type;

/**
 * Creates a new autoreleased XMPPStanza with the specified name and id.
 * \brief Creates a new autoreleased XMPPStanza with the specified name and ID.
 *
 * \param name The stanza's name (one of iq, message or presence)
 * \param ID The value for the stanza's id attribute
 * \return A new autoreleased XMPPStanza
 */
+ stanzaWithName: (OFString*)name
	      ID: (OFString*)ID;

/**
 * Creates a new autoreleased XMPPStanza with the specified name, type and id.
 * \brief Creates a new autoreleased XMPPStanza with the specified name, type
 *	  and ID.
 *
 * \param name The stanza's name (one of iq, message or presence)
 * \param type The value for the stanza's type attribute
 * \param ID The value for the stanza's id attribute
 * \return A new autoreleased XMPPStanza
 */
+ stanzaWithName: (OFString*)name
	    type: (OFString*)type
	      ID: (OFString*)ID;

/**
 * Creates a new autoreleased XMPPStanza from an OFXMLElement.
 * \brief Creates a new autoreleased XMPPStanza from an OFXMLElement.
 *
 * \param element The element to base the XMPPStanza on
 * \return A new autoreleased XMPPStanza
 */
+ stanzaWithElement: (OFXMLElement*)element;

/**
 * Initializes an already allocated XMPPStanza with the specified name.
 * \brief Initializes an already allocated XMPPStanza with the specified name.
 *
 * \param name The stanza's name (one of iq, message or presence)
 * \return A initialized XMPPStanza
 */
- initWithName: (OFString*)name;

/**
 * Initializes an already allocated XMPPStanza with the specified name and type.
 * \brief Initializes an already allocated XMPPStanza with the specified name
 *	  and type.
 *
 * \param name The stanza's name (one of iq, message or presence)
 * \param type The value for the stanza's type attribute
 * \return A initialized XMPPStanza
 */
- initWithName: (OFString*)name
	  type: (OFString*)type;

/**
 * Initializes an already allocated XMPPStanza with the specified name and id.
 * \brief Initializes an already allocated XMPPStanza with the specified name
 *	  and ID.
 *
 * \param name The stanza's name (one of iq, message or presence)
 * \param ID The value for the stanza's id attribute
 * \return A initialized XMPPStanza
 */
- initWithName: (OFString*)name
	    ID: (OFString*)ID;

/**
 * Initializes an already allocated XMPPStanza with the specified name, type
 * and id.
 * \brief Initializes an already allocated XMPPStanza with the specified name,
 *	  type and ID.
 *
 * \param name The stanza's name (one of iq, message or presence)
 * \param type The value for the stanza's type attribute
 * \param ID The value for the stanza's id attribute
 * \return A initialized XMPPStanza
 */
- initWithName: (OFString*)name
	  type: (OFString*)type
	    ID: (OFString*)ID;

/**
 * Initializes an already allocated XMPPStanza based on a OFXMLElement
 * \brief Initializes an already allocated XMPPStanza based on a OFXMLElement.
 *
 * \param element The element to base the XMPPStanza on
 * \return A initialized XMPPStanza
 */
- initWithElement: (OFXMLElement*)element;

- (void)setFrom: (XMPPJID*)from;