Improve documentation.

This commit is contained in:
Jonathan Schleifer 2013-02-15 15:32:44 +01:00
parent 7aa05c48bc
commit f186c4f302
16 changed files with 47 additions and 72 deletions

View file

@ -564,43 +564,43 @@
[_socket writeString: [element XMLString]];
}
- (void)sendIQ: (XMPPIQ*)iq
- (void)sendIQ: (XMPPIQ*)IQ
callbackTarget: (id)target
selector: (SEL)selector
{
OFAutoreleasePool *pool;
XMPPCallback *callback;
if (![iq ID])
[iq setID: [self generateStanzaID]];
if (![IQ ID])
[IQ setID: [self generateStanzaID]];
pool = [[OFAutoreleasePool alloc] init];
callback = [XMPPCallback callbackWithTarget: target
selector: selector];
[_callbacks setObject: callback
forKey: [iq ID]];
forKey: [IQ ID]];
[pool release];
[self sendStanza: iq];
[self sendStanza: IQ];
}
#ifdef OF_HAVE_BLOCKS
- (void)sendIQ: (XMPPIQ*)iq
- (void)sendIQ: (XMPPIQ*)IQ
callbackBlock: (xmpp_callback_block_t)block
{
OFAutoreleasePool *pool;
XMPPCallback *callback;
if (![iq ID])
[iq setID: [self generateStanzaID]];
if (![IQ ID])
[IQ setID: [self generateStanzaID]];
pool = [[OFAutoreleasePool alloc] init];
callback = [XMPPCallback callbackWithBlock: block];
[_callbacks setObject: callback
forKey: [iq ID]];
forKey: [IQ ID]];
[pool release];
[self sendStanza: iq];
[self sendStanza: IQ];
}
#endif