86
87
88
89
90
91
92
93
94
95
96
97
98
99
|
- initWithType: (OFString*)type_
ID: (OFString*)ID_
{
return [super initWithName: @"presence"
type: type_
ID: ID_];
}
- (void)dealloc
{
[status release];
[show release];
[priority release];
|
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
|
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
118
119
120
121
122
123
124
125
126
127
128
|
- initWithType: (OFString*)type_
ID: (OFString*)ID_
{
return [super initWithName: @"presence"
type: type_
ID: ID_];
}
- initWithElement: (OFXMLElement*)element
{
self = [super initWithElement: element];
@try {
OFXMLElement *subElement;
if ((subElement = [element elementForName: @"show"
namespace: XMPP_NS_CLIENT]))
[self setShow: [subElement stringValue]];
if ((subElement = [element elementForName: @"status"
namespace: XMPP_NS_CLIENT]))
[self setStatus: [subElement stringValue]];
if ((subElement = [element elementForName: @"priority"
namespace: XMPP_NS_CLIENT]))
[self setPriority:
[OFNumber numberWithIntMax:
[[subElement stringValue] decimalValue]]];
} @catch (id e) {
[self release];
@throw e;
}
return self;
}
- (void)dealloc
{
[status release];
[show release];
[priority release];
|