Port to ObjC 1.

This commit is contained in:
Jonathan Schleifer 2011-03-29 03:46:20 +02:00
parent 50012ba975
commit 5b16eaa1f0
19 changed files with 468 additions and 204 deletions

View file

@ -23,13 +23,21 @@
#import "XMPPRosterItem.h"
@implementation XMPPRosterItem
@synthesize JID, name, subscription, groups;
+ rosterItem
{
return [[[self alloc] init] autorelease];
}
- (void)dealloc
{
[JID release];
[name release];
[subscription release];
[groups release];
[super dealloc];
}
- copy
{
XMPPRosterItem *new = [[XMPPRosterItem alloc] init];
@ -53,4 +61,52 @@
@"subscription=%@, groups=%@>",
JID, name, subscription, groups];
}
- (void)setJID: (XMPPJID*)JID_
{
XMPPJID *old = JID;
JID = [JID_ copy];
[old release];
}
- (XMPPJID*)JID
{
return [[JID copy] autorelease];
}
- (void)setName: (OFString*)name_
{
OFString *old = name;
name = [name_ copy];
[old release];
}
- (OFString*)name
{
return [[name copy] autorelease];
}
- (void)setSubscription: (OFString*)subscription_
{
OFString *old = subscription;
subscription = [subscription_ copy];
[old release];
}
- (OFString*)subscription
{
return [[subscription copy] autorelease];
}
- (void)setGroups: (OFArray*)groups_
{
OFArray *old = groups;
groups = [groups_ copy];
[old release];
}
- (OFArray*)groups
{
return [[groups copy] autorelease];
}
@end