53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
|
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
|
-
+
+
|
ID: (OFString*)ID_
{
return [[[self alloc] initWithName: name
type: type_
ID: ID_] autorelease];
}
+ stanzaWithElement: (OFXMLElement*)elem {
+ stanzaWithElement: (OFXMLElement*)elem
{
return [[[self alloc] initWithElement: elem] autorelease];
}
- initWithName: (OFString*)name_
{
return [self initWithName: name_
type: nil
|
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
|
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
|
-
-
-
-
-
+
+
+
+
+
|
ID: ID_];
}
- initWithName: (OFString*)name_
type: (OFString*)type_
ID: (OFString*)ID_
{
if (![name_ isEqual: @"iq"] &&
![name_ isEqual: @"message"] &&
![name_ isEqual: @"presence"])
of_log(@"Invalid stanza name!");
self = [super initWithName: name_];
@try {
if (![name_ isEqual: @"iq"] && ![name_ isEqual: @"message"] &&
![name_ isEqual: @"presence"])
@throw [OFInvalidArgumentException newWithClass: isa
selector: _cmd];
[self setDefaultNamespace: @"jabber:client"];
if (type_)
[self setType: type_];
if (ID_)
[self setID: ID_];
|