75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
|
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
|
-
+
+
|
iq = [XMPPIQ IQWithType: @"get"
ID: [connection generateStanzaID]];
[iq addChild: [OFXMLElement elementWithName: @"query"
namespace: XMPP_NS_ROSTER]];
[connection sendIQ: iq
withCallbackObject: self
selector: @selector(XMPP_handleInitialRoster:)];
selector: @selector(XMPP_handleInitialRosterForConnection:
withIQ:)];
}
- (BOOL)connection: (XMPPConnection*)connection_
didReceiveIQ: (XMPPIQ*)iq
{
OFXMLElement *rosterElement;
OFXMLElement *element;
|
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
|
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
|
-
+
+
|
if ([groups count] > 0)
[rosterItem setGroups: groups];
return rosterItem;
}
- (void)XMPP_handleInitialRoster: (XMPPIQ*)iq
- (void)XMPP_handleInitialRosterForConnection: (XMPPConnection*)connection
withIQ: (XMPPIQ*)iq
{
OFXMLElement *rosterElement;
OFEnumerator *enumerator;
OFXMLElement *element;
XMPPRosterItem *rosterItem = nil;
rosterElement = [iq elementForName: @"query"
|