33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
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
113
114
115
116
117
|
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
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
|
-
-
-
-
+
+
+
+
-
-
-
-
+
+
+
+
-
+
-
+
-
+
-
-
-
+
-
+
-
+
-
-
-
+
-
+
-
+
-
-
-
+
-
+
-
+
-
+
|
+ rosterItem
{
return [[[self alloc] init] autorelease];
}
- (void)dealloc
{
[JID release];
[name release];
[subscription release];
[groups release];
[_JID release];
[_name release];
[_subscription release];
[_groups release];
[super dealloc];
}
- copy
{
XMPPRosterItem *new = [[XMPPRosterItem alloc] init];
@try {
new->JID = [JID copy];
new->name = [name copy];
new->subscription = [subscription copy];
new->groups = [groups copy];
new->_JID = [_JID copy];
new->_name = [_name copy];
new->_subscription = [_subscription copy];
new->_groups = [_groups copy];
} @catch (id e) {
[new release];
@throw e;
}
return new;
}
- (OFString*)description
{
return [OFString stringWithFormat: @"<XMPPRosterItem, JID=%@, name=%@, "
@"subscription=%@, groups=%@>",
JID, name, subscription, groups];
_JID, _name, _subscription, _groups];
}
- (void)setJID: (XMPPJID*)JID_
- (void)setJID: (XMPPJID*)JID
{
XMPPJID *old = JID;
OF_SETTER(_JID, JID, YES, YES)
JID = [JID_ copy];
[old release];
}
- (XMPPJID*)JID
{
return [[JID copy] autorelease];
OF_GETTER(_JID, YES)
}
- (void)setName: (OFString*)name_
- (void)setName: (OFString*)name
{
OFString *old = name;
OF_SETTER(_name, name, YES, YES)
name = [name_ copy];
[old release];
}
- (OFString*)name
{
return [[name copy] autorelease];
OF_GETTER(_name, YES)
}
- (void)setSubscription: (OFString*)subscription_
- (void)setSubscription: (OFString*)subscription
{
OFString *old = subscription;
OF_SETTER(_subscription, subscription, YES, YES)
subscription = [subscription_ copy];
[old release];
}
- (OFString*)subscription
{
return [[subscription copy] autorelease];
OF_GETTER(_subscription, YES)
}
- (void)setGroups: (OFArray*)groups_
- (void)setGroups: (OFArray*)groups
{
OF_SETTER(groups, groups_, YES, YES)
OF_SETTER(_groups, groups, YES, YES)
}
- (OFArray*)groups
{
OF_GETTER(groups, YES)
OF_GETTER(_groups, YES)
}
@end
|