ObjXMPP  Diff

Differences From Artifact [bd94402de0]:

To Artifact [443ba32ad2]:


90
91
92
93
94
95
96
97

98
99
100
101
102

103
104
105
106
107

108
109
110
111
112

113
114
115
116
117

118
119
120
121
122

123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141

142
143
144
145
146
147
148
149
150
151
152
153

154
155
156
157
158
159
160
90
91
92
93
94
95
96

97
98
99
100
101

102
103
104
105
106

107
108
109
110
111

112
113
114
115
116

117
118
119
120
121

122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140

141
142
143
144
145
146
147
148
149
150
151
152

153
154
155
156
157
158
159
160







-
+




-
+




-
+




-
+




-
+




-
+


















-
+











-
+







	[_childNodes release];

	[super dealloc];
}

- (XMPPJID*)JID
{
	OF_GETTER(_JID, YES);
	OF_GETTER(_JID, true)
}

- (OFString*)node
{
	OF_GETTER(_node, YES);
	OF_GETTER(_node, true)
}

- (OFString*)name
{
	OF_GETTER(_name, YES);
	OF_GETTER(_name, true)
}

- (OFSortedList*)identities
{
	OF_GETTER(_identities, YES);
	OF_GETTER(_identities, true)
}

- (OFSortedList*)features
{
	OF_GETTER(_features, YES);
	OF_GETTER(_features, true)
}

- (OFDictionary*)childNodes
{
	OF_GETTER(_childNodes, YES);
	OF_GETTER(_childNodes, true)
}

- (void)addIdentity: (XMPPDiscoIdentity*)identity
{
	[_identities insertObject: identity];
}

- (void)addFeature: (OFString*)feature
{
	[_features insertObject: feature];
}

- (void)addChildNode: (XMPPDiscoNode*)node
{
	[_childNodes setObject: node
			forKey: [node node]];
}

- (BOOL)XMPP_handleItemsIQ: (XMPPIQ*)IQ
- (bool)XMPP_handleItemsIQ: (XMPPIQ*)IQ
		connection: (XMPPConnection*)connection
{
	XMPPIQ *resultIQ;
	OFXMLElement *response;
	XMPPDiscoNode *child;
	OFEnumerator *enumerator;
	OFXMLElement *query = [IQ elementForName: @"query"
				       namespace: XMPP_NS_DISCO_ITEMS];
	OFString *node = [[query attributeForName: @"node"] stringValue];

	if (!(node == _node) && ![node isEqual: _node])
		return NO;
		return false;

	resultIQ = [IQ resultIQ];
	response = [OFXMLElement elementWithName: @"query"
				       namespace: XMPP_NS_DISCO_ITEMS];
	[resultIQ addChild: response];

	enumerator = [_childNodes objectEnumerator];
173
174
175
176
177
178
179
180

181
182
183

184
185
186
187
188
189
190
173
174
175
176
177
178
179

180
181
182

183
184
185
186
187
188
189
190







-
+


-
+







				       stringValue: [child name]];

		[response addChild: item];
	}

	[connection sendStanza: resultIQ];

	return YES;
	return true;
}

- (BOOL)XMPP_handleInfoIQ: (XMPPIQ*)IQ
- (bool)XMPP_handleInfoIQ: (XMPPIQ*)IQ
	       connection: (XMPPConnection*)connection
{
	XMPPIQ *resultIQ;
	OFXMLElement *response;
	OFEnumerator *enumerator;
	OFString *feature;
	XMPPDiscoIdentity *identity;
219
220
221
222
223
224
225
226

227
228
219
220
221
222
223
224
225

226
227
228







-
+


		[featureElement addAttributeWithName: @"var"
					 stringValue: feature];
		[response addChild: featureElement];
	}

	[connection sendStanza: resultIQ];

	return YES;
	return true;
}
@end