ObjXMPP  Diff

Differences From Artifact [e7183d6d5f]:

To Artifact [40b148c42d]:


18
19
20
21
22
23
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
 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 * POSSIBILITY OF SUCH DAMAGE.
 */

#import <ObjFW/ObjFW.h>


@class XMPPIQ;

#ifdef OF_HAVE_BLOCKS
typedef void(^xmpp_callback_block_t)(XMPPIQ*);
#endif

@interface XMPPCallback: OFObject
{
	id object;
	SEL selector;
}

#ifdef OF_HAVE_BLOCKS
+ callbackWithCallbackBlock: (xmpp_callback_block_t)callback;
- initWithCallbackBlock: (xmpp_callback_block_t)callback;
#endif

+ callbackWithCallbackObject: (id)object
		    selector: (SEL)selector;
- initWithCallbackObject: (id)object
		selector: (SEL)selector;

- (void)runWithIQ: (XMPPIQ*)iq;

@end







>



|


















|
>

18
19
20
21
22
23
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
 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 * POSSIBILITY OF SUCH DAMAGE.
 */

#import <ObjFW/ObjFW.h>

@class XMPPConnection;
@class XMPPIQ;

#ifdef OF_HAVE_BLOCKS
typedef void(^xmpp_callback_block_t)(XMPPConnection*, XMPPIQ*);
#endif

@interface XMPPCallback: OFObject
{
	id object;
	SEL selector;
}

#ifdef OF_HAVE_BLOCKS
+ callbackWithCallbackBlock: (xmpp_callback_block_t)callback;
- initWithCallbackBlock: (xmpp_callback_block_t)callback;
#endif

+ callbackWithCallbackObject: (id)object
		    selector: (SEL)selector;
- initWithCallbackObject: (id)object
		selector: (SEL)selector;

- (void)runWithIQ: (XMPPIQ*)iq
       connection: (XMPPConnection*)connection;
@end