1
2
3
4
5
6
7
8
9
10
11
|
1
2
3
4
5
6
7
8
9
10
11
12
|
+
-
+
|
/*
* Copyright (c) 2013, Florian Zeitz <florob@babelmonkeys.de>
* Copyright (c) 2013, 2016, Jonathan Schleifer <js@heap.zone>
*
* https://webkeks.org/git/?p=objxmpp.git
* https://heap.zone/git/?p=objxmpp.git
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice is present in all copies.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
|
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
|
+
+
+
+
-
|
#import "XMPPJID.h"
#import "XMPPDiscoEntity.h"
#import "XMPPDiscoNode.h"
#import "XMPPDiscoIdentity.h"
#import "namespaces.h"
@implementation XMPPDiscoNode
@synthesize JID = _JID, node = _node, name = _name, identities = _identities;
@synthesize features = _features, childNodes = _childNodes;
+ (instancetype)discoNodeWithJID: (XMPPJID*)JID
node: (OFString*)node;
{
return [[[self alloc] initWithJID: JID
node: node] autorelease];
}
+ (instancetype)discoNodeWithJID: (XMPPJID*)JID
node: (OFString*)node
name: (OFString*)name
{
return [[[self alloc] initWithJID: JID
node: node
|
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
|
94
95
96
97
98
99
100
101
102
103
104
105
106
107
|
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
|
[_identities release];
[_features release];
[_childNodes release];
[super dealloc];
}
- (XMPPJID*)JID
{
OF_GETTER(_JID, true)
}
- (OFString*)node
{
OF_GETTER(_node, true)
}
- (OFString*)name
{
OF_GETTER(_name, true)
}
- (OFSortedList*)identities
{
OF_GETTER(_identities, true)
}
- (OFSortedList*)features
{
OF_GETTER(_features, true)
}
- (OFDictionary*)childNodes
{
OF_GETTER(_childNodes, true)
}
- (void)addIdentity: (XMPPDiscoIdentity*)identity
{
[_identities insertObject: identity];
}
- (void)addFeature: (OFString*)feature
{
|