Merge XMPP*Callback into a single class

This commit is contained in:
Florian Zeitz 2012-01-06 20:18:33 +01:00
parent b94a321cfa
commit a433727bd5
4 changed files with 33 additions and 37 deletions

View file

@ -147,6 +147,17 @@ OF_APPLICATION_DELEGATE(AppDelegate)
[pres addStatus: @"ObjXMPP test is working!"];
[conn sendStanza: pres];
#ifdef OF_HAVE_BLOCKS
XMPPIQ *iq = [XMPPIQ IQWithType: @"get"
ID: [conn generateStanzaID]];
[iq addChild: [OFXMLElement elementWithName: @"ping"
namespace: @"urn:xmpp:ping"]];
[conn sendIQ: iq
withCallbackBlock: ^(XMPPIQ* resp) {
of_log(@"Ping response: %@", resp);
}];
#endif
}
- (void)connectionDidUpgradeToTLS: (XMPPConnection*)conn