Index: src/XMPPCallback.h ================================================================== --- src/XMPPCallback.h +++ src/XMPPCallback.h @@ -37,17 +37,17 @@ xmpp_callback_block_t _block; #endif } #ifdef OF_HAVE_BLOCKS -+ callbackWithBlock: (xmpp_callback_block_t)callback; ++ (instancetype)callbackWithBlock: (xmpp_callback_block_t)callback; - initWithBlock: (xmpp_callback_block_t)callback; #endif -+ callbackWithTarget: (id)target - selector: (SEL)selector; ++ (instancetype)callbackWithTarget: (id)target + selector: (SEL)selector; - initWithTarget: (id)target selector: (SEL)selector; - (void)runWithIQ: (XMPPIQ*)iq connection: (XMPPConnection*)connection; @end Index: src/XMPPCallback.m ================================================================== --- src/XMPPCallback.m +++ src/XMPPCallback.m @@ -26,11 +26,11 @@ #import "XMPPCallback.h" @implementation XMPPCallback #ifdef OF_HAVE_BLOCKS -+ callbackWithBlock: (xmpp_callback_block_t)block ++ (instancetype)callbackWithBlock: (xmpp_callback_block_t)block { return [[(XMPPCallback*)[self alloc] initWithBlock: block] autorelease]; } - initWithBlock: (xmpp_callback_block_t)block @@ -46,12 +46,12 @@ return self; } #endif -+ callbackWithTarget: (id)target - selector: (SEL)selector ++ (instancetype)callbackWithTarget: (id)target + selector: (SEL)selector { return [[[self alloc] initWithTarget: target selector: selector] autorelease]; } Index: src/XMPPConnection.h ================================================================== --- src/XMPPConnection.h +++ src/XMPPConnection.h @@ -216,11 +216,11 @@ /** * \brief Creates a new autoreleased XMPPConnection. * * \return A new autoreleased XMPPConnection */ -+ connection; ++ (instancetype)connection; /** * \brief Adds the specified delegate. * * \param delegate The delegate to add Index: src/XMPPConnection.m ================================================================== --- src/XMPPConnection.m +++ src/XMPPConnection.m @@ -115,11 +115,11 @@ return nil; } @end @implementation XMPPConnection -+ connection ++ (instancetype)connection { return [[[self alloc] init] autorelease]; } - init Index: src/XMPPDiscoEntity.h ================================================================== --- src/XMPPDiscoEntity.h +++ src/XMPPDiscoEntity.h @@ -56,22 +56,22 @@ * connection. * * \param connection The XMPPConnection to serve responses on. * \return A new autoreleased XMPPDiscoEntity */ -+ discoEntityWithConnection: (XMPPConnection*)connection; ++ (instancetype)discoEntityWithConnection: (XMPPConnection*)connection; /** * \brief Creates a new autoreleased XMPPDiscoEntity with the specified * connection. * * \param connection The XMPPConnection to serve responses on. * \param capsNode The node advertised for the entity's capabilites * \return A new autoreleased XMPPDiscoEntity */ -+ discoEntityWithConnection: (XMPPConnection*)connection - capsNode: (OFString*)capsNode; ++ (instancetype)discoEntityWithConnection: (XMPPConnection*)connection + capsNode: (OFString*)capsNode; /** * \brief Initializes an already allocated XMPPDiscoEntity with the specified * connection. * Index: src/XMPPDiscoEntity.m ================================================================== --- src/XMPPDiscoEntity.m +++ src/XMPPDiscoEntity.m @@ -24,17 +24,17 @@ #import "XMPPDiscoIdentity.h" #import "XMPPIQ.h" #import "namespaces.h" @implementation XMPPDiscoEntity -+ discoEntityWithConnection: (XMPPConnection*)connection ++ (instancetype)discoEntityWithConnection: (XMPPConnection*)connection { return [[[self alloc] initWithConnection: connection] autorelease]; } -+ discoEntityWithConnection: (XMPPConnection*)connection - capsNode: (OFString*)capsNode ++ (instancetype)discoEntityWithConnection: (XMPPConnection*)connection + capsNode: (OFString*)capsNode { return [[[self alloc] initWithConnection: connection capsNode: capsNode] autorelease]; } Index: src/XMPPDiscoIdentity.h ================================================================== --- src/XMPPDiscoIdentity.h +++ src/XMPPDiscoIdentity.h @@ -45,24 +45,24 @@ * \param category The category of the identity * \param type The type of the identity * \param name The name of the identity * \return A new autoreleased XMPPDiscoIdentity */ -+ identityWithCategory: (OFString*)category - type: (OFString*)type - name: (OFString*)name; ++ (instancetype)identityWithCategory: (OFString*)category + type: (OFString*)type + name: (OFString*)name; /** * \brief Creates a new autoreleased XMPPDiscoIdentity with the specified * category and type. * * \param category The category of the identity * \param type The type of the identity * \return A new autoreleased XMPPDiscoIdentity */ -+ identityWithCategory: (OFString*)category - type: (OFString*)type; ++ (instancetype)identityWithCategory: (OFString*)category + type: (OFString*)type; /** * \brief Initializes an already allocated XMPPDiscoIdentity with the specified * category, type and name. * Index: src/XMPPDiscoIdentity.m ================================================================== --- src/XMPPDiscoIdentity.m +++ src/XMPPDiscoIdentity.m @@ -21,21 +21,21 @@ */ #import "XMPPDiscoIdentity.h" @implementation XMPPDiscoIdentity -+ identityWithCategory: (OFString*)category - type: (OFString*)type - name: (OFString*)name ++ (instancetype)identityWithCategory: (OFString*)category + type: (OFString*)type + name: (OFString*)name { return [[[self alloc] initWithCategory: category type: type name: name] autorelease]; } -+ identityWithCategory: (OFString*)category - type: (OFString*)type ++ (instancetype)identityWithCategory: (OFString*)category + type: (OFString*)type { return [[[self alloc] initWithCategory: category type: type] autorelease]; } Index: src/XMPPDiscoNode.h ================================================================== --- src/XMPPDiscoNode.h +++ src/XMPPDiscoNode.h @@ -59,12 +59,12 @@ * * \param JID The JID this node lives on * \param node The node's opaque name * \return A new autoreleased XMPPDiscoNode */ -+ discoNodeWithJID: (XMPPJID*)JID - node: (OFString*)node; ++ (instancetype)discoNodeWithJID: (XMPPJID*)JID + node: (OFString*)node; /** * \brief Creates a new autoreleased XMPPDiscoNode with the specified * JID, node and name * @@ -71,12 +71,12 @@ * \param JID The JID this node lives on * \param node The node's opaque name * \param name The node's human friendly name * \return A new autoreleased XMPPDiscoNode */ -+ discoNodeWithJID: (XMPPJID*)JID - node: (OFString*)node ++ (instancetype)discoNodeWithJID: (XMPPJID*)JID + node: (OFString*)node name: (OFString*)name; /** * \brief Initializes an already allocated XMPPDiscoNode with the specified * JID and node Index: src/XMPPDiscoNode.m ================================================================== --- src/XMPPDiscoNode.m +++ src/XMPPDiscoNode.m @@ -26,21 +26,21 @@ #import "XMPPDiscoNode.h" #import "XMPPDiscoIdentity.h" #import "namespaces.h" @implementation XMPPDiscoNode -+ discoNodeWithJID: (XMPPJID*)JID - node: (OFString*)node; ++ (instancetype)discoNodeWithJID: (XMPPJID*)JID + node: (OFString*)node; { return [[[self alloc] initWithJID: JID node: node] autorelease]; } -+ discoNodeWithJID: (XMPPJID*)JID - node: (OFString*)node - name: (OFString*)name ++ (instancetype)discoNodeWithJID: (XMPPJID*)JID + node: (OFString*)node + name: (OFString*)name { return [[[self alloc] initWithJID: JID node: node name: name] autorelease]; } Index: src/XMPPEXTERNALAuth.h ================================================================== --- src/XMPPEXTERNALAuth.h +++ src/XMPPEXTERNALAuth.h @@ -30,15 +30,15 @@ /** * \brief Creates a new autoreleased XMPPEXTERNALAuth. * * \return A new autoreleased XMPPEXTERNALAuth */ -+ EXTERNALAuth; ++ (instancetype)EXTERNALAuth; /** * \brief Creates a new autoreleased XMPPEXTERNALAuth with an authzid. * * \param authzid The authzid to get authorization for * \return A new autoreleased XMPPEXTERNALAuth */ -+ EXTERNALAuthWithAuthzid: (OFString*)authzid; ++ (instancetype)EXTERNALAuthWithAuthzid: (OFString*)authzid; @end Index: src/XMPPEXTERNALAuth.m ================================================================== --- src/XMPPEXTERNALAuth.m +++ src/XMPPEXTERNALAuth.m @@ -25,17 +25,17 @@ #endif #import "XMPPEXTERNALAuth.h" @implementation XMPPEXTERNALAuth: XMPPAuthenticator -+ EXTERNALAuth ++ (instancetype)EXTERNALAuth { return [[[self alloc] initWithAuthcid: nil password: nil] autorelease]; } -+ EXTERNALAuthWithAuthzid: (OFString*)authzid ++ (instancetype)EXTERNALAuthWithAuthzid: (OFString*)authzid { return [[[self alloc] initWithAuthzid: authzid authcid: nil password: nil] autorelease]; } Index: src/XMPPExceptions.h ================================================================== --- src/XMPPExceptions.h +++ src/XMPPExceptions.h @@ -43,11 +43,11 @@ * * \param connection The connection that received the data responsible * for this exception * \return A new XMPPException */ -+ exceptionWithConnection: (XMPPConnection*)connection; ++ (instancetype)exceptionWithConnection: (XMPPConnection*)connection; /** * \brief Initializes an already allocated XMPPException. * * \param connection The connection that received the data responsible @@ -80,13 +80,13 @@ * \param connection The connection that received the stream error * \param condition The defined error condition specified by the stream error * \param reason The descriptive free-form text specified by the stream error * \return A new XMPPStreamErrorException */ -+ exceptionWithConnection: (XMPPConnection*)connection - condition: (OFString*)condition - reason: (OFString*)reason; ++ (instancetype)exceptionWithConnection: (XMPPConnection*)connection + condition: (OFString*)condition + reason: (OFString*)reason; /** * \brief Initializes an already allocated XMPPStreamErrorException. * * \param connection The connection that received the stream error @@ -124,13 +124,13 @@ * \param connection The connection the string relates to * \param profile The name of the stringprep profile that did not apply * \param string The string that failed the stringprep profile * \return A new XMPPStringPrepFailedException */ -+ exceptionWithConnection: (XMPPConnection*)connection - profile: (OFString*)profile - string: (OFString*)string; ++ (instancetype)exceptionWithConnection: (XMPPConnection*)connection + profile: (OFString*)profile + string: (OFString*)string; /** * \brief Initializes an already allocated XMPPStringPrepFailedException. * * \param connection The connection the string relates to @@ -167,13 +167,13 @@ * \param connection The connection the string relates to * \param operation The name of the stringprep profile that did not apply * \param string The string that could not be translated * \return A new XMPPIDNATranslationFailedException */ -+ exceptionWithConnection: (XMPPConnection*)connection - operation: (OFString*)operation - string: (OFString*)string; ++ (instancetype)exceptionWithConnection: (XMPPConnection*)connection + operation: (OFString*)operation + string: (OFString*)string; /** * \brief Initializes an already allocated XMPPIDNATranslationFailedException. * * \param connection The connection the string relates to @@ -207,12 +207,12 @@ * * \param connection The connection that could not be authenticated * \param reason The reason the authentication failed * \return A new XMPPAuthFailedException */ -+ exceptionWithConnection: (XMPPConnection*)connection - reason: (OFString*)reason; ++ (instancetype)exceptionWithConnection: (XMPPConnection*)connection + reason: (OFString*)reason; /** * \brief Initializes an already allocated XMPPAuthFailedException. * * \param connection The connection that could not be authenticated Index: src/XMPPExceptions.m ================================================================== --- src/XMPPExceptions.m +++ src/XMPPExceptions.m @@ -28,11 +28,11 @@ #import "XMPPExceptions.h" #import "XMPPConnection.h" @implementation XMPPException -+ exceptionWithConnection: (XMPPConnection*)connection ++ (instancetype)exceptionWithConnection: (XMPPConnection*)connection { return [[[self alloc] initWithConnection: connection] autorelease]; } - init @@ -73,13 +73,13 @@ OF_GETTER(_connection, false) } @end @implementation XMPPStreamErrorException -+ exceptionWithConnection: (XMPPConnection*)connection - condition: (OFString*)condition - reason: (OFString*)reason; ++ (instancetype)exceptionWithConnection: (XMPPConnection*)connection + condition: (OFString*)condition + reason: (OFString*)reason; { return [[[self alloc] initWithConnection: connection condition: condition reason: reason] autorelease]; } @@ -137,13 +137,13 @@ OF_GETTER(_reason, false) } @end @implementation XMPPStringPrepFailedException -+ exceptionWithConnection: (XMPPConnection*)connection - profile: (OFString*)profile - string: (OFString*)string ++ (instancetype)exceptionWithConnection: (XMPPConnection*)connection + profile: (OFString*)profile + string: (OFString*)string { return [[[self alloc] initWithConnection: connection profile: profile string: string] autorelease]; } @@ -202,13 +202,13 @@ OF_GETTER(_string, false) } @end @implementation XMPPIDNATranslationFailedException -+ exceptionWithConnection: (XMPPConnection*)connection - operation: (OFString*)operation - string: (OFString*)string ++ (instancetype)exceptionWithConnection: (XMPPConnection*)connection + operation: (OFString*)operation + string: (OFString*)string { return [[[self alloc] initWithConnection: connection operation: operation string: string] autorelease]; } @@ -266,12 +266,12 @@ OF_GETTER(_string, false) } @end @implementation XMPPAuthFailedException -+ exceptionWithConnection: (XMPPConnection*)connection - reason: (OFString*)reason; ++ (instancetype)exceptionWithConnection: (XMPPConnection*)connection + reason: (OFString*)reason; { return [[[self alloc] initWithConnection: connection reason: reason] autorelease]; } Index: src/XMPPIQ.h ================================================================== --- src/XMPPIQ.h +++ src/XMPPIQ.h @@ -32,12 +32,12 @@ * * \param type The value for the stanza's type attribute * \param ID The value for the stanza's id attribute * \return A new autoreleased XMPPIQ */ -+ IQWithType: (OFString*)type - ID: (OFString*)ID; ++ (instancetype)IQWithType: (OFString*)type + ID: (OFString*)ID; /** * \brief Initializes an already allocated XMPPIQ with the specified type and * ID. * Index: src/XMPPIQ.m ================================================================== --- src/XMPPIQ.m +++ src/XMPPIQ.m @@ -27,12 +27,12 @@ #import "namespaces.h" #import "XMPPIQ.h" @implementation XMPPIQ -+ IQWithType: (OFString*)type - ID: (OFString*)ID ++ (instancetype)IQWithType: (OFString*)type + ID: (OFString*)ID { return [[[self alloc] initWithType: type ID: ID] autorelease]; } Index: src/XMPPJID.h ================================================================== --- src/XMPPJID.h +++ src/XMPPJID.h @@ -43,19 +43,19 @@ /** * \brief Creates a new autoreleased XMPPJID. * * \return A new autoreleased XMPPJID */ -+ JID; ++ (instancetype)JID; /** * \brief Creates a new autoreleased XMPPJID from a string. * * \param string The string to parse into a JID object * \return A new autoreleased XMPPJID */ -+ JIDWithString: (OFString*)string; ++ (instancetype)JIDWithString: (OFString*)string; /** * \brief Initializes an already allocated XMPPJID with a string. * * \param string The string to parse into a JID object Index: src/XMPPJID.m ================================================================== --- src/XMPPJID.m +++ src/XMPPJID.m @@ -31,16 +31,16 @@ #import "XMPPJID.h" #import "XMPPExceptions.h" @implementation XMPPJID -+ JID ++ (instancetype)JID { return [[[self alloc] init] autorelease]; } -+ JIDWithString: (OFString*)string ++ (instancetype)JIDWithString: (OFString*)string { return [[[self alloc] initWithString: string] autorelease]; } - initWithString: (OFString*)string Index: src/XMPPMessage.h ================================================================== --- src/XMPPMessage.h +++ src/XMPPMessage.h @@ -35,37 +35,37 @@ /** * \brief Creates a new autoreleased XMPPMessage. * * \return A new autoreleased XMPPMessage */ -+ message; ++ (instancetype)message; /** * \brief Creates a new autoreleased XMPPMessage with the specified ID. * * \param ID The value for the stanza's id attribute * \return A new autoreleased XMPPMessage */ -+ messageWithID: (OFString*)ID; ++ (instancetype)messageWithID: (OFString*)ID; /** * \brief Creates a new autoreleased XMPPMessage with the specified type. * * \param type The value for the stanza's type attribute * \return A new autoreleased XMPPMessage */ -+ messageWithType: (OFString*)type; ++ (instancetype)messageWithType: (OFString*)type; /** * \brief Creates a new autoreleased XMPPMessage with the specified type and ID. * * \param type The value for the stanza's type attribute * \param ID The value for the stanza's id attribute * \return A new autoreleased XMPPMessage */ -+ messageWithType: (OFString*)type - ID: (OFString*)ID; ++ (instancetype)messageWithType: (OFString*)type + ID: (OFString*)ID; /** * \brief Initializes an already allocated XMPPMessage with the specified ID. * * \param ID The value for the stanza's id attribute Index: src/XMPPMessage.m ================================================================== --- src/XMPPMessage.m +++ src/XMPPMessage.m @@ -27,26 +27,26 @@ #import "XMPPMessage.h" #import "namespaces.h" @implementation XMPPMessage -+ message ++ (instancetype)message { return [[[self alloc] init] autorelease]; } -+ messageWithID: (OFString*)ID ++ (instancetype)messageWithID: (OFString*)ID { return [[[self alloc] initWithID: ID] autorelease]; } -+ messageWithType: (OFString*)type ++ (instancetype)messageWithType: (OFString*)type { return [[[self alloc] initWithType: type] autorelease]; } -+ messageWithType: (OFString*)type ++ (instancetype)messageWithType: (OFString*)type ID: (OFString*)ID { return [[[self alloc] initWithType: type ID: ID] autorelease]; } Index: src/XMPPPLAINAuth.h ================================================================== --- src/XMPPPLAINAuth.h +++ src/XMPPPLAINAuth.h @@ -32,12 +32,12 @@ * * \param authcid The authcid to authenticate with * \param password The password to authenticate with * \return A new autoreleased XMPPPLAINAuth */ -+ PLAINAuthWithAuthcid: (OFString*)authcid - password: (OFString*)password; ++ (instancetype)PLAINAuthWithAuthcid: (OFString*)authcid + password: (OFString*)password; /** * \brief Creates a new autoreleased XMPPPLAINAuth with an authzid, authcid and * password. * @@ -44,9 +44,9 @@ * \param authzid The authzid to get authorization for * \param authcid The authcid to authenticate with * \param password The password to authenticate with * \return A new autoreleased XMPPPLAINAuth */ -+ PLAINAuthWithAuthzid: (OFString*)authzid - authcid: (OFString*)authcid ++ (instancetype)PLAINAuthWithAuthzid: (OFString*)authzid + authcid: (OFString*)authcid password: (OFString*)password; @end Index: src/XMPPPLAINAuth.m ================================================================== --- src/XMPPPLAINAuth.m +++ src/XMPPPLAINAuth.m @@ -26,20 +26,20 @@ #import "XMPPPLAINAuth.h" #import "XMPPExceptions.h" @implementation XMPPPLAINAuth -+ PLAINAuthWithAuthcid: (OFString*)authcid - password: (OFString*)password ++ (instancetype)PLAINAuthWithAuthcid: (OFString*)authcid + password: (OFString*)password { return [[[self alloc] initWithAuthcid: authcid password: password] autorelease]; } -+ PLAINAuthWithAuthzid: (OFString*)authzid - authcid: (OFString*)authcid - password: (OFString*)password ++ (instancetype)PLAINAuthWithAuthzid: (OFString*)authzid + authcid: (OFString*)authcid + password: (OFString*)password { return [[[self alloc] initWithAuthzid: authzid authcid: authcid password: password] autorelease]; } Index: src/XMPPPresence.h ================================================================== --- src/XMPPPresence.h +++ src/XMPPPresence.h @@ -40,38 +40,38 @@ /** * \brief Creates a new autoreleased XMPPPresence. * * \return A new autoreleased XMPPPresence */ -+ presence; ++ (instancetype)presence; /** * \brief Creates a new autoreleased XMPPPresence with the specified ID. * * \param ID The value for the stanza's id attribute * \return A new autoreleased XMPPPresence */ -+ presenceWithID: (OFString*)ID; ++ (instancetype)presenceWithID: (OFString*)ID; /** * \brief Creates a new autoreleased XMPPPresence with the specified type. * * \param type The value for the stanza's type attribute * \return A new autoreleased XMPPPresence */ -+ presenceWithType: (OFString*)type; ++ (instancetype)presenceWithType: (OFString*)type; /** * \brief Creates a new autoreleased XMPPPresence with the specified type and * ID. * * \param type The value for the stanza's type attribute * \param ID The value for the stanza's id attribute * \return A new autoreleased XMPPPresence */ -+ presenceWithType: (OFString*)type - ID: (OFString*)ID; ++ (instancetype)presenceWithType: (OFString*)type + ID: (OFString*)ID; /** * \brief Initializes an already allocated XMPPPresence with the specified ID. * * \param ID The value for the stanza's id attribute Index: src/XMPPPresence.m ================================================================== --- src/XMPPPresence.m +++ src/XMPPPresence.m @@ -41,27 +41,27 @@ assert(0); } @implementation XMPPPresence -+ presence ++ (instancetype)presence { return [[[self alloc] init] autorelease]; } -+ presenceWithID: (OFString*)ID ++ (instancetype)presenceWithID: (OFString*)ID { return [[[self alloc] initWithID: ID] autorelease]; } -+ presenceWithType: (OFString*)type ++ (instancetype)presenceWithType: (OFString*)type { return [[[self alloc] initWithType: type] autorelease]; } -+ presenceWithType: (OFString*)type - ID: (OFString*)ID ++ (instancetype)presenceWithType: (OFString*)type + ID: (OFString*)ID { return [[[self alloc] initWithType: type ID: ID] autorelease]; } Index: src/XMPPRosterItem.h ================================================================== --- src/XMPPRosterItem.h +++ src/XMPPRosterItem.h @@ -49,11 +49,11 @@ /** * \brief Creates a new autoreleased roster item. * * \return A new autoreleased roster item. */ -+ rosterItem; ++ (instancetype)rosterItem; - (void)setJID: (XMPPJID*)JID; - (XMPPJID*)JID; - (void)setName: (OFString*)name; - (OFString*)name; Index: src/XMPPRosterItem.m ================================================================== --- src/XMPPRosterItem.m +++ src/XMPPRosterItem.m @@ -28,11 +28,11 @@ #import "XMPPJID.h" #import @implementation XMPPRosterItem -+ rosterItem ++ (instancetype)rosterItem { return [[[self alloc] init] autorelease]; } - (void)dealloc Index: src/XMPPSCRAMAuth.h ================================================================== --- src/XMPPSCRAMAuth.h +++ src/XMPPSCRAMAuth.h @@ -47,15 +47,15 @@ * \param connection The connection over which authentication is done * \param hash The class to use for calulating hashes * \param plusAvailable Whether the PLUS variant was offered * \return A new autoreleased XMPPSCRAMAuth */ -+ SCRAMAuthWithAuthcid: (OFString*)authcid - password: (OFString*)password - connection: (XMPPConnection*)connection - hash: (Class)hash - plusAvailable: (bool)plusAvailable; ++ (instancetype)SCRAMAuthWithAuthcid: (OFString*)authcid + password: (OFString*)password + connection: (XMPPConnection*)connection + hash: (Class)hash + plusAvailable: (bool)plusAvailable; /** * \brief Creates a new autoreleased XMPPSCRAMAuth with an authzid, authcid and * password. * @@ -65,16 +65,16 @@ * \param connection The connection over which authentication is done * \param hash The class to use for calulating hashes * \param plusAvailable Whether the PLUS variant was offered * \return A new autoreleased XMPPSCRAMAuth */ -+ SCRAMAuthWithAuthzid: (OFString*)authzid - authcid: (OFString*)authcid - password: (OFString*)password - connection: (XMPPConnection*)connection - hash: (Class)hash - plusAvailable: (bool)plusAvailable; ++ (instancetype)SCRAMAuthWithAuthzid: (OFString*)authzid + authcid: (OFString*)authcid + password: (OFString*)password + connection: (XMPPConnection*)connection + hash: (Class)hash + plusAvailable: (bool)plusAvailable; /** * \brief Initializes an already allocated XMPPSCRAMAuth with an authcid and * password. * Index: src/XMPPSCRAMAuth.m ================================================================== --- src/XMPPSCRAMAuth.m +++ src/XMPPSCRAMAuth.m @@ -36,29 +36,29 @@ #define HMAC_IPAD 0x36 #define HMAC_OPAD 0x5c @implementation XMPPSCRAMAuth -+ SCRAMAuthWithAuthcid: (OFString*)authcid - password: (OFString*)password - connection: (XMPPConnection*)connection - hash: (Class)hash - plusAvailable: (bool)plusAvailable ++ (instancetype)SCRAMAuthWithAuthcid: (OFString*)authcid + password: (OFString*)password + connection: (XMPPConnection*)connection + hash: (Class)hash + plusAvailable: (bool)plusAvailable { return [[[self alloc] initWithAuthcid: authcid password: password connection: connection hash: hash plusAvailable: plusAvailable] autorelease]; } -+ SCRAMAuthWithAuthzid: (OFString*)authzid - authcid: (OFString*)authcid - password: (OFString*)password - connection: (XMPPConnection*)connection - hash: (Class)hash - plusAvailable: (bool)plusAvailable ++ (instancetype)SCRAMAuthWithAuthzid: (OFString*)authzid + authcid: (OFString*)authcid + password: (OFString*)password + connection: (XMPPConnection*)connection + hash: (Class)hash + plusAvailable: (bool)plusAvailable { return [[[self alloc] initWithAuthzid: authzid authcid: authcid password: password connection: connection Index: src/XMPPSRVLookup.h ================================================================== --- src/XMPPSRVLookup.h +++ src/XMPPSRVLookup.h @@ -41,16 +41,16 @@ @property uint32_t accumulatedWeight; @property (readonly) uint16_t port; @property (readonly, copy) OFString *target; #endif -+ entryWithPriority: (uint16_t)priority - weight: (uint16_t)weight - port: (uint16_t)port - target: (OFString*)target; -+ entryWithResourceRecord: (ns_rr)resourceRecord - handle: (ns_msg)handle; ++ (instancetype)entryWithPriority: (uint16_t)priority + weight: (uint16_t)weight + port: (uint16_t)port + target: (OFString*)target; ++ (instancetype)entryWithResourceRecord: (ns_rr)resourceRecord + handle: (ns_msg)handle; - initWithPriority: (uint16_t)priority weight: (uint16_t)weight port: (uint16_t)port target: (OFString*)target; - initWithResourceRecord: (ns_rr)resourceRecord @@ -72,11 +72,11 @@ #ifdef OF_HAVE_PROPERTIES @property (readonly, copy) OFString *domain; #endif -+ lookupWithDomain: (OFString*)domain; ++ (instancetype)lookupWithDomain: (OFString*)domain; - initWithDomain: (OFString*)domain; - (void)XMPP_lookup; - (void)XMPP_addEntry: (XMPPSRVEntry*)item; @end Index: src/XMPPSRVLookup.m ================================================================== --- src/XMPPSRVLookup.m +++ src/XMPPSRVLookup.m @@ -35,23 +35,23 @@ #include #import "XMPPSRVLookup.h" @implementation XMPPSRVEntry -+ entryWithPriority: (uint16_t)priority - weight: (uint16_t)weight - port: (uint16_t)port - target: (OFString*)target ++ (instancetype)entryWithPriority: (uint16_t)priority + weight: (uint16_t)weight + port: (uint16_t)port + target: (OFString*)target { return [[[self alloc] initWithPriority: priority weight: weight port: port target: target] autorelease]; } -+ entryWithResourceRecord: (ns_rr)resourceRecord - handle: (ns_msg)handle ++ (instancetype)entryWithResourceRecord: (ns_rr)resourceRecord + handle: (ns_msg)handle { return [[[self alloc] initWithResourceRecord: resourceRecord handle: handle] autorelease]; } @@ -161,11 +161,11 @@ OF_GETTER(_target, true) } @end @implementation XMPPSRVLookup -+ lookupWithDomain: (OFString*)domain ++ (instancetype)lookupWithDomain: (OFString*)domain { return [[[self alloc] initWithDomain: domain] autorelease]; } - initWithDomain: (OFString*)domain Index: src/XMPPStanza.h ================================================================== --- src/XMPPStanza.h +++ src/XMPPStanza.h @@ -50,32 +50,32 @@ * \brief Creates a new autoreleased XMPPStanza with the specified name. * * \param name The stanza's name (one of iq, message or presence) * \return A new autoreleased XMPPStanza */ -+ stanzaWithName: (OFString*)name; ++ (instancetype)stanzaWithName: (OFString*)name; /** * \brief Creates a new autoreleased XMPPStanza with the specified name and * type. * * \param name The stanza's name (one of iq, message or presence) * \param type The value for the stanza's type attribute * \return A new autoreleased XMPPStanza */ -+ stanzaWithName: (OFString*)name - type: (OFString*)type; ++ (instancetype)stanzaWithName: (OFString*)name + type: (OFString*)type; /** * \brief Creates a new autoreleased XMPPStanza with the specified name and ID. * * \param name The stanza's name (one of iq, message or presence) * \param ID The value for the stanza's id attribute * \return A new autoreleased XMPPStanza */ -+ stanzaWithName: (OFString*)name - ID: (OFString*)ID; ++ (instancetype)stanzaWithName: (OFString*)name + ID: (OFString*)ID; /** * \brief Creates a new autoreleased XMPPStanza with the specified name, type * and ID. * @@ -82,21 +82,21 @@ * \param name The stanza's name (one of iq, message or presence) * \param type The value for the stanza's type attribute * \param ID The value for the stanza's id attribute * \return A new autoreleased XMPPStanza */ -+ stanzaWithName: (OFString*)name - type: (OFString*)type - ID: (OFString*)ID; ++ (instancetype)stanzaWithName: (OFString*)name + type: (OFString*)type + ID: (OFString*)ID; /** * \brief Creates a new autoreleased XMPPStanza from an OFXMLElement. * * \param element The element to base the XMPPStanza on * \return A new autoreleased XMPPStanza */ -+ stanzaWithElement: (OFXMLElement*)element; ++ (instancetype)stanzaWithElement: (OFXMLElement*)element; /** * \brief Initializes an already allocated XMPPStanza with the specified name. * * \param name The stanza's name (one of iq, message or presence) Index: src/XMPPStanza.m ================================================================== --- src/XMPPStanza.m +++ src/XMPPStanza.m @@ -28,39 +28,39 @@ #import "XMPPStanza.h" #import "XMPPJID.h" #import "namespaces.h" @implementation XMPPStanza -+ stanzaWithName: (OFString*)name ++ (instancetype)stanzaWithName: (OFString*)name { return [[[self alloc] initWithName: name] autorelease]; } -+ stanzaWithName: (OFString*)name - type: (OFString*)type ++ (instancetype)stanzaWithName: (OFString*)name + type: (OFString*)type { return [[[self alloc] initWithName: name type: type] autorelease]; } -+ stanzaWithName: (OFString*)name - ID: (OFString*)ID ++ (instancetype)stanzaWithName: (OFString*)name + ID: (OFString*)ID { return [[[self alloc] initWithName: name ID: ID] autorelease]; } -+ stanzaWithName: (OFString*)name - type: (OFString*)type - ID: (OFString*)ID ++ (instancetype)stanzaWithName: (OFString*)name + type: (OFString*)type + ID: (OFString*)ID { return [[[self alloc] initWithName: name type: type ID: ID] autorelease]; } -+ stanzaWithElement: (OFXMLElement*)element ++ (instancetype)stanzaWithElement: (OFXMLElement*)element { return [[[self alloc] initWithElement: element] autorelease]; } - initWithName: (OFString*)name