@@ -23,15 +23,10 @@ #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]; } @@ -164,10 +159,15 @@ 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]; @@ -177,10 +177,15 @@ 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]; @@ -190,10 +195,15 @@ if (type_ != nil) [self addAttributeWithName: @"type" stringValue: type]; } + +- (OFString*)type +{ + return [[type copy] autorelease]; +} - (void)setID: (OFString*)ID_ { OFString* old = ID; ID = [ID_ copy]; @@ -203,6 +213,11 @@ if (ID_ != nil) [self addAttributeWithName: @"id" stringValue: ID]; } + +- (OFString*)ID +{ + return [[ID copy] autorelease]; +} @end