ObjXMPP  Diff

Differences From Artifact [1ae4e0c618]:

To Artifact [a16d9343e0]:


21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
 * POSSIBILITY OF SUCH DAMAGE.
 */

#import "XMPPStanza.h"
#import "XMPPJID.h"

@implementation XMPPStanza
@synthesize from;
@synthesize to;
@synthesize type;
@synthesize ID;

+ stanzaWithName: (OFString*)name
{
	return [[[self alloc] initWithName: name] autorelease];
}

+ stanzaWithName: (OFString*)name
	    type: (OFString*)type_







<
<
<
<
<







21
22
23
24
25
26
27





28
29
30
31
32
33
34
 * POSSIBILITY OF SUCH DAMAGE.
 */

#import "XMPPStanza.h"
#import "XMPPJID.h"

@implementation XMPPStanza





+ stanzaWithName: (OFString*)name
{
	return [[[self alloc] initWithName: name] autorelease];
}

+ stanzaWithName: (OFString*)name
	    type: (OFString*)type_
162
163
164
165
166
167
168





169
170
171
172
173
174
175
176
177
178
179
180
181





182
183
184
185
186
187
188
189
190
191
192
193
194





195
196
197
198
199
200
201
202
203
204
205
206
207





208

	[self removeAttributeForName: @"from"];

	if (from_ != nil)
		[self addAttributeWithName: @"from"
			       stringValue: from_.fullJID];
}






- (void)setTo: (XMPPJID*)to_
{
	XMPPJID *old = to;
	to = [to_ copy];
	[old release];

	[self removeAttributeForName: @"to"];

	if (to_ != nil)
		[self addAttributeWithName: @"to"
			       stringValue: to_.fullJID];
}






- (void)setType: (OFString*)type_
{
	OFString *old = type;
	type = [type_ copy];
	[old release];

	[self removeAttributeForName: @"type"];

	if (type_ != nil)
		[self addAttributeWithName: @"type"
			       stringValue: type];
}






- (void)setID: (OFString*)ID_
{
	OFString* old = ID;
	ID = [ID_ copy];
	[old release];

	[self removeAttributeForName: @"id"];

	if (ID_ != nil)
		[self addAttributeWithName: @"id"
			       stringValue: ID];
}





@end







>
>
>
>
>













>
>
>
>
>













>
>
>
>
>













>
>
>
>
>

157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223

	[self removeAttributeForName: @"from"];

	if (from_ != nil)
		[self addAttributeWithName: @"from"
			       stringValue: from_.fullJID];
}

- (OFString*)from
{
	return [[from copy] autorelease];
}

- (void)setTo: (XMPPJID*)to_
{
	XMPPJID *old = to;
	to = [to_ copy];
	[old release];

	[self removeAttributeForName: @"to"];

	if (to_ != nil)
		[self addAttributeWithName: @"to"
			       stringValue: to_.fullJID];
}

- (OFString*)to
{
	return [[to copy] autorelease];
}

- (void)setType: (OFString*)type_
{
	OFString *old = type;
	type = [type_ copy];
	[old release];

	[self removeAttributeForName: @"type"];

	if (type_ != nil)
		[self addAttributeWithName: @"type"
			       stringValue: type];
}

- (OFString*)type
{
	return [[type copy] autorelease];
}

- (void)setID: (OFString*)ID_
{
	OFString* old = ID;
	ID = [ID_ copy];
	[old release];

	[self removeAttributeForName: @"id"];

	if (ID_ != nil)
		[self addAttributeWithName: @"id"
			       stringValue: ID];
}

- (OFString*)ID
{
	return [[ID copy] autorelease];
}
@end