Use one file per class.

This commit is contained in:
Jonathan Schleifer 2011-02-16 20:32:39 +01:00
parent 2fa82b833c
commit fa59d3ce32
11 changed files with 361 additions and 355 deletions

57
src/XMPPMessage.m Normal file
View file

@ -0,0 +1,57 @@
#import "XMPPMessage.h"
@implementation XMPPMessage
+ message
{
return [[[self alloc] init] autorelease];
}
+ messageWithID: (OFString*)ID_
{
return [[[self alloc] initWithID: ID_] autorelease];
}
+ messageWithType: (OFString*)type_
{
return [[[self alloc] initWithType: type_] autorelease];
}
+ messageWithType: (OFString*)type_
ID: (OFString*)ID_
{
return [[[self alloc] initWithType: type_
ID: ID_] autorelease];
}
- init
{
return [self initWithType: nil
ID: nil];
}
- initWithID: (OFString*)ID_
{
return [self initWithType: nil
ID: ID_];
}
- initWithType: (OFString*)type_
{
return [self initWithType: type_
ID: nil];
}
- initWithType: (OFString*)type_
ID: (OFString*)ID_
{
return [super initWithName: @"message"
type: type_
ID: ID_];
}
- (void)addBody: (OFString*)body
{
[self addChild: [OFXMLElement elementWithName: @"body"
stringValue: body]];
}
@end