227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
|
}
- (bool)isEqual: (id)object
{
XMPPJID *JID;
if (object == self)
return YES;
if (![object isKindOfClass: [XMPPJID class]])
return NO;
JID = object;
// Node and resource may be nil
if ((_node == JID->_node || [_node isEqual: JID->_node]) &&
[_domain isEqual: JID->_domain] &&
(_resource == JID->_resource || [_resource isEqual: JID->_resource])
)
return YES;
return NO;
}
- (uint32_t) hash
{
uint32_t hash;
OF_HASH_INIT(hash);
OF_HASH_ADD_HASH(hash, [_node hash]);
OF_HASH_ADD_HASH(hash, [_domain hash]);
|
|
|
|
|
<
|
|
|
|
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
|
}
- (bool)isEqual: (id)object
{
XMPPJID *JID;
if (object == self)
return true;
if (![object isKindOfClass: [XMPPJID class]])
return false;
JID = object;
// Node and resource may be nil
if ((_node == JID->_node || [_node isEqual: JID->_node]) &&
[_domain isEqual: JID->_domain] && (_resource == JID->_resource ||
[_resource isEqual: JID->_resource]))
return true;
return false;
}
- (uint32_t)hash
{
uint32_t hash;
OF_HASH_INIT(hash);
OF_HASH_ADD_HASH(hash, [_node hash]);
OF_HASH_ADD_HASH(hash, [_domain hash]);
|