180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
|
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
|
-
+
-
-
|
}
- (void)setPriority: (OFNumber*)priority
{
intmax_t prio = [priority intMaxValue];
if ((prio < -128) || (prio > 127))
@throw [OFInvalidArgumentException
@throw [OFInvalidArgumentException exception];
exceptionWithClass: [self class]
selector: _cmd];
OFXMLElement *oldPriority = [self elementForName: @"priority"
namespace: XMPP_NS_CLIENT];
if (oldPriority != nil)
[self removeChild: oldPriority];
|
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
|
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
|
-
+
-
-
|
OFString *otherShow;
of_comparison_result_t priorityOrder;
if (object == self)
return OF_ORDERED_SAME;
if (![object isKindOfClass: [XMPPPresence class]])
@throw [OFInvalidArgumentException
@throw [OFInvalidArgumentException exception];
exceptionWithClass: [self class]
selector: _cmd];
otherPresence = (XMPPPresence*)object;
otherPriority = [otherPresence priority];
if (otherPriority == nil)
otherPriority = [OFNumber numberWithInt8: 0];
if (_priority != nil)
|