ObjXMPP  Diff

Differences From Artifact [a02f686076]:

To Artifact [357151968c]:


27
28
29
30
31
32
33

34
35
36
37
38
39
40
#include <assert.h>

#import "XMPPRoster.h"
#import "XMPPRosterItem.h"
#import "XMPPConnection.h"
#import "XMPPIQ.h"
#import "XMPPJID.h"

#import "namespaces.h"

@implementation XMPPRoster
- initWithConnection: (XMPPConnection*)conn
{
	self = [super init];








>







27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#include <assert.h>

#import "XMPPRoster.h"
#import "XMPPRosterItem.h"
#import "XMPPConnection.h"
#import "XMPPIQ.h"
#import "XMPPJID.h"
#import "XMPPMulticastDelegate.h"
#import "namespaces.h"

@implementation XMPPRoster
- initWithConnection: (XMPPConnection*)conn
{
	self = [super init];

153
154
155
156
157
158
159
160
161



162
163

164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
			[rosterItem setGroups: groups];

		if ([subscription isEqual: @"remove"])
			[self XMPP_deleteRosterItem: rosterItem];
		else
			[self XMPP_addRosterItem: rosterItem];

		if (isPush && [[connection delegate] respondsToSelector:
		    @selector(connection:didReceiveRosterItem:)])



			[[connection delegate] connection: connection
				     didReceiveRosterItem: rosterItem];

	}

	if (isPush) {
		[connection sendStanza: [iq resultIQ]];
	} else {
		if ([[connection delegate] respondsToSelector:
		     @selector(connectionDidReceiveRoster:)])
			[[connection delegate]
			    connectionDidReceiveRoster: connection];

		[rosterID release];
		rosterID = nil;
	}

	return YES;
}







|
|
>
>
>
|
|
>





|
|
<
|







154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175

176
177
178
179
180
181
182
183
			[rosterItem setGroups: groups];

		if ([subscription isEqual: @"remove"])
			[self XMPP_deleteRosterItem: rosterItem];
		else
			[self XMPP_addRosterItem: rosterItem];

		if (isPush) {
			SEL sel = @selector(connection:didReceiveRosterItem:);

			[[connection XMPP_delegates]
			    broadcastSelector: sel
				forConnection: connection
				   withObject: rosterItem];
		}
	}

	if (isPush) {
		[connection sendStanza: [iq resultIQ]];
	} else {
		[[connection XMPP_delegates]
		    broadcastSelector: @selector(connectionDidReceiveRoster:)

			forConnection: connection];

		[rosterID release];
		rosterID = nil;
	}

	return YES;
}