Skip to content

Commit

Permalink
Tidy up class method grouping using pragma marks rather than categories
Browse files Browse the repository at this point in the history
  • Loading branch information
benlangfeld committed Oct 15, 2010
1 parent e8fc5c2 commit 886bce6
Show file tree
Hide file tree
Showing 5 changed files with 83 additions and 143 deletions.
20 changes: 0 additions & 20 deletions TNStropheConnection.j
Expand Up @@ -184,14 +184,10 @@
return self;
}

@end


#pragma mark -
#pragma mark TNStropheConnection Connection

@implementation TNStropheConnection (Connection)

- (void)addNamespaceWithName:(CPString)aName value:(CPString)aValue
{
Strophe.addNamespace(aName, aValue)
Expand Down Expand Up @@ -292,14 +288,10 @@
_connection.flush();
}

@end


#pragma mark -
#pragma mark TNStropheConnection Features

@implementation TNStropheConnection (Features)

- (void)addFeature:(CPString)aFeatureNamespace
{
[_features addObject:aFeatureNamespace];
Expand Down Expand Up @@ -348,14 +340,10 @@
return YES;
}

@end


#pragma mark -
#pragma mark TNStropheConnection Sending

@implementation TNStropheConnection (Sending)

/*! send a TNStropheStanza object
@param aStanza: the stanza to send
*/
Expand Down Expand Up @@ -403,14 +391,10 @@
_audioTagReceive.play();
}

@end


#pragma mark -
#pragma mark TNStropheConnection Handlers

@implementation TNStropheConnection (Handlers)

/*! allows to register a selector for beeing fired on XMPP events, according to the content of a dictionnary parameter.
The dictionnary should contains zero to many of the followings :
- <b>namespace</b>: the namespace of the stanza or of the first child (like query)
Expand Down Expand Up @@ -512,10 +496,6 @@

@end


#pragma mark -
#pragma mark TNStropheConnection CPCoding

@implementation TNStropheConnection (CPCoding)

- (id)initWithCoder:(CPCoder)aCoder
Expand Down
33 changes: 5 additions & 28 deletions TNStropheContact.j
Expand Up @@ -24,9 +24,6 @@
@import "TNStropheGlobals.j"


#pragma mark -
#pragma mark TNStropheContact

/*! @ingroup strophecappuccino
this is an implementation of a XMPP Contact
*/
Expand Down Expand Up @@ -110,13 +107,9 @@
return self;
}

@end


#pragma mark -
#pragma mark TNStropheContact Status

@implementation TNStropheContact (Status)
#pragma mark Status

/*! probe the contact about its status
You should never have to use this message if you are using TNStropheRoster
Expand Down Expand Up @@ -257,13 +250,9 @@
_isComposing = NO;
}

@end


#pragma mark -
#pragma mark TNStropheContact Subscription

@implementation TNStropheContact (Subscription)
#pragma mark Subscription

/*! subscribe to the contact
*/
Expand All @@ -289,13 +278,9 @@
[_connection send:auth];
}

@end


#pragma mark -
#pragma mark TNStropheContact MetaData

@implementation TNStropheContact (MetaData)
#pragma mark MetaData

- (CPString)description
{
Expand Down Expand Up @@ -404,13 +389,9 @@
[[CPNotificationCenter defaultCenter] postNotificationName:TNStropheContactGroupUpdatedNotification object:self];
}

@end


#pragma mark -
#pragma mark TNStropheContact Communicating

@implementation TNStropheContact (Communicating)
#pragma mark Communicating

/*! send a TNStropheStanza to the contact. From, ant To value are rewritten. This message uses a given stanza id
in order to use it if you need. You should mostly use the
Expand Down Expand Up @@ -588,11 +569,7 @@

@end


#pragma mark -
#pragma mark TNStropheContact codingCompliant

@implementation TNStropheContact (codingCompliant)
@implementation TNStropheContact (CPCoding)

- (id)initWithCoder:(CPCoder)aCoder
{
Expand Down
10 changes: 1 addition & 9 deletions TNStropheGroup.j
Expand Up @@ -17,13 +17,9 @@
*/

@import <Foundation/Foundation.j>

@import "TNStropheGlobals.j"


#pragma mark -
#pragma mark TNStropheGroup

/*! @ingroup strophecappuccino
this is an implementation of a basic XMPP Group.
*/
Expand Down Expand Up @@ -89,11 +85,7 @@

@end


#pragma mark -
#pragma mark TNStropheGroup codingCompliant

@implementation TNStropheGroup (codingCompliant)
@implementation TNStropheGroup (CPCoding)

- (id)initWithCoder:(CPCoder)aCoder
{
Expand Down
24 changes: 4 additions & 20 deletions TNStropheRoster.j
Expand Up @@ -79,13 +79,9 @@
[_connection disconnect];
}

@end


#pragma mark -
#pragma mark TNStropheRoster Fetch

@implementation TNStropheRoster (Fetch)
#pragma mark Fetch

/*! ask the server to get the roster of the TNStropheConnection user
*/
Expand Down Expand Up @@ -143,13 +139,9 @@
return NO;
}

@end


#pragma mark -
#pragma mark TNStropheRoster Groups

@implementation TNStropheRoster (Groups)
#pragma mark Groups

/*! add a group to the roster with given name
@param aGroupName the name of the new group
Expand Down Expand Up @@ -259,13 +251,9 @@
return nil;
}

@end


#pragma mark -
#pragma mark TNStropheRoster Contacts

@implementation TNStropheRoster (Contacts)
#pragma mark Contacts

/*! add a new contact to the roster with given information
@param aJID the JID of the new contact
Expand Down Expand Up @@ -404,13 +392,9 @@
[aContact changeGroup:newGroup];
}

@end


#pragma mark -
#pragma mark TNStropheRoster Subscriptions

@implementation TNStropheRoster (Subscriptions)
#pragma mark Subscriptions

/*! message sent when a presence information received
send didReceiveSubscriptionRequest: to the delegate with the stanza as parameter
Expand Down

0 comments on commit 886bce6

Please sign in to comment.