19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
|
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
|
-
-
+
+
+
+
+
+
+
+
+
+
|
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
#import "XMPPRosterItem.h"
@implementation XMPPRosterItem
@synthesize JID, name, subscription, groups;
+ rosterItem
{
return [[[self alloc] init] autorelease];
}
- (void)dealloc
{
[JID release];
[name release];
[subscription release];
[groups release];
[super dealloc];
}
- copy
{
XMPPRosterItem *new = [[XMPPRosterItem alloc] init];
@try {
new->JID = [JID copy];
|
49
50
51
52
53
54
55
56
|
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
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
|
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
|
- (OFString*)description
{
return [OFString stringWithFormat: @"<XMPPRosterItem, JID=%@, name=%@, "
@"subscription=%@, groups=%@>",
JID, name, subscription, groups];
}
- (void)setJID: (XMPPJID*)JID_
{
XMPPJID *old = JID;
JID = [JID_ copy];
[old release];
}
- (XMPPJID*)JID
{
return [[JID copy] autorelease];
}
- (void)setName: (OFString*)name_
{
OFString *old = name;
name = [name_ copy];
[old release];
}
- (OFString*)name
{
return [[name copy] autorelease];
}
- (void)setSubscription: (OFString*)subscription_
{
OFString *old = subscription;
subscription = [subscription_ copy];
[old release];
}
- (OFString*)subscription
{
return [[subscription copy] autorelease];
}
- (void)setGroups: (OFArray*)groups_
{
OFArray *old = groups;
groups = [groups_ copy];
[old release];
}
- (OFArray*)groups
{
return [[groups copy] autorelease];
}
@end
|