Merge XMPP*Callback into a single class
This commit is contained in:
parent
b94a321cfa
commit
a433727bd5
4 changed files with 33 additions and 37 deletions
11
tests/test.m
11
tests/test.m
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue