56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
|
}
- initWithTarget: (id)target_
selector: (SEL)selector_
{
self = [super init];
target = [target_ retain];
selector = selector_;
return self;
}
- (void)dealloc
{
[target release];
#ifdef OF_HAVE_BLOCKS
[block release];
#endif
[super dealloc];
}
- (void)runWithIQ: (XMPPIQ*)iq
connection: (XMPPConnection*)connection
{
#ifdef OF_HAVE_BLOCKS
if (block != NULL)
block(connection, iq);
else
#endif
[target performSelector: selector
withObject: connection
withObject: iq];
}
@end
|
|
|
|
|
|
|
|
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
|
}
- initWithTarget: (id)target_
selector: (SEL)selector_
{
self = [super init];
_target = [target_ retain];
_selector = selector_;
return self;
}
- (void)dealloc
{
[_target release];
#ifdef OF_HAVE_BLOCKS
[block release];
#endif
[super dealloc];
}
- (void)runWithIQ: (XMPPIQ*)iq
connection: (XMPPConnection*)connection
{
#ifdef OF_HAVE_BLOCKS
if (block != NULL)
block(connection, iq);
else
#endif
[_target performSelector: _selector
withObject: connection
withObject: iq];
}
@end
|