ObjXMPP  Diff

Differences From Artifact [16fe7db118]:

To Artifact [0b7603d5d7]:


87
88
89
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
	[_type release];

	[super dealloc];
}

- (OFString*)category
{
	OF_GETTER(_category, YES);
}

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

- (OFString*)type
{
	OF_GETTER(_type, YES);
}

- (bool)isEqual: (id)object
{
	XMPPDiscoIdentity *identity;

	if (object == self)
		return YES;

	if (![object isKindOfClass: [XMPPDiscoIdentity class]])
		return NO;

	identity = object;

	if ([_category isEqual: identity->_category] &&
	    (_name == identity->_name || [_name isEqual: identity->_name]) &&
	    [_type isEqual: identity->_type])
		return YES;

	return NO;
}

- (uint32_t) hash
{
	uint32_t hash;

	OF_HASH_INIT(hash);

	OF_HASH_ADD_HASH(hash, [_category hash]);
	OF_HASH_ADD_HASH(hash, [_type hash]);







|




|




|







|


|






|

|


|







87
88
89
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
	[_type release];

	[super dealloc];
}

- (OFString*)category
{
	OF_GETTER(_category, true)
}

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

- (OFString*)type
{
	OF_GETTER(_type, true)
}

- (bool)isEqual: (id)object
{
	XMPPDiscoIdentity *identity;

	if (object == self)
		return true;

	if (![object isKindOfClass: [XMPPDiscoIdentity class]])
		return false;

	identity = object;

	if ([_category isEqual: identity->_category] &&
	    (_name == identity->_name || [_name isEqual: identity->_name]) &&
	    [_type isEqual: identity->_type])
		return true;

	return false;
}

- (uint32_t)hash
{
	uint32_t hash;

	OF_HASH_INIT(hash);

	OF_HASH_ADD_HASH(hash, [_category hash]);
	OF_HASH_ADD_HASH(hash, [_type hash]);