Use instancetype.
This commit is contained in:
parent
4fead04d9a
commit
9ae39edeb4
32 changed files with 153 additions and 153 deletions
|
@ -39,11 +39,11 @@ typedef void (^xmpp_callback_block_t)(XMPPConnection*, XMPPIQ*);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef OF_HAVE_BLOCKS
|
#ifdef OF_HAVE_BLOCKS
|
||||||
+ callbackWithBlock: (xmpp_callback_block_t)callback;
|
+ (instancetype)callbackWithBlock: (xmpp_callback_block_t)callback;
|
||||||
- initWithBlock: (xmpp_callback_block_t)callback;
|
- initWithBlock: (xmpp_callback_block_t)callback;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
+ callbackWithTarget: (id)target
|
+ (instancetype)callbackWithTarget: (id)target
|
||||||
selector: (SEL)selector;
|
selector: (SEL)selector;
|
||||||
- initWithTarget: (id)target
|
- initWithTarget: (id)target
|
||||||
selector: (SEL)selector;
|
selector: (SEL)selector;
|
||||||
|
|
|
@ -28,7 +28,7 @@
|
||||||
|
|
||||||
@implementation XMPPCallback
|
@implementation XMPPCallback
|
||||||
#ifdef OF_HAVE_BLOCKS
|
#ifdef OF_HAVE_BLOCKS
|
||||||
+ callbackWithBlock: (xmpp_callback_block_t)block
|
+ (instancetype)callbackWithBlock: (xmpp_callback_block_t)block
|
||||||
{
|
{
|
||||||
return [[(XMPPCallback*)[self alloc] initWithBlock: block] autorelease];
|
return [[(XMPPCallback*)[self alloc] initWithBlock: block] autorelease];
|
||||||
}
|
}
|
||||||
|
@ -48,7 +48,7 @@
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
+ callbackWithTarget: (id)target
|
+ (instancetype)callbackWithTarget: (id)target
|
||||||
selector: (SEL)selector
|
selector: (SEL)selector
|
||||||
{
|
{
|
||||||
return [[[self alloc] initWithTarget: target
|
return [[[self alloc] initWithTarget: target
|
||||||
|
|
|
@ -218,7 +218,7 @@
|
||||||
*
|
*
|
||||||
* \return A new autoreleased XMPPConnection
|
* \return A new autoreleased XMPPConnection
|
||||||
*/
|
*/
|
||||||
+ connection;
|
+ (instancetype)connection;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Adds the specified delegate.
|
* \brief Adds the specified delegate.
|
||||||
|
|
|
@ -117,7 +117,7 @@
|
||||||
@end
|
@end
|
||||||
|
|
||||||
@implementation XMPPConnection
|
@implementation XMPPConnection
|
||||||
+ connection
|
+ (instancetype)connection
|
||||||
{
|
{
|
||||||
return [[[self alloc] init] autorelease];
|
return [[[self alloc] init] autorelease];
|
||||||
}
|
}
|
||||||
|
|
|
@ -58,7 +58,7 @@
|
||||||
* \param connection The XMPPConnection to serve responses on.
|
* \param connection The XMPPConnection to serve responses on.
|
||||||
* \return A new autoreleased XMPPDiscoEntity
|
* \return A new autoreleased XMPPDiscoEntity
|
||||||
*/
|
*/
|
||||||
+ discoEntityWithConnection: (XMPPConnection*)connection;
|
+ (instancetype)discoEntityWithConnection: (XMPPConnection*)connection;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Creates a new autoreleased XMPPDiscoEntity with the specified
|
* \brief Creates a new autoreleased XMPPDiscoEntity with the specified
|
||||||
|
@ -68,7 +68,7 @@
|
||||||
* \param capsNode The node advertised for the entity's capabilites
|
* \param capsNode The node advertised for the entity's capabilites
|
||||||
* \return A new autoreleased XMPPDiscoEntity
|
* \return A new autoreleased XMPPDiscoEntity
|
||||||
*/
|
*/
|
||||||
+ discoEntityWithConnection: (XMPPConnection*)connection
|
+ (instancetype)discoEntityWithConnection: (XMPPConnection*)connection
|
||||||
capsNode: (OFString*)capsNode;
|
capsNode: (OFString*)capsNode;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -26,12 +26,12 @@
|
||||||
#import "namespaces.h"
|
#import "namespaces.h"
|
||||||
|
|
||||||
@implementation XMPPDiscoEntity
|
@implementation XMPPDiscoEntity
|
||||||
+ discoEntityWithConnection: (XMPPConnection*)connection
|
+ (instancetype)discoEntityWithConnection: (XMPPConnection*)connection
|
||||||
{
|
{
|
||||||
return [[[self alloc] initWithConnection: connection] autorelease];
|
return [[[self alloc] initWithConnection: connection] autorelease];
|
||||||
}
|
}
|
||||||
|
|
||||||
+ discoEntityWithConnection: (XMPPConnection*)connection
|
+ (instancetype)discoEntityWithConnection: (XMPPConnection*)connection
|
||||||
capsNode: (OFString*)capsNode
|
capsNode: (OFString*)capsNode
|
||||||
{
|
{
|
||||||
return [[[self alloc] initWithConnection: connection
|
return [[[self alloc] initWithConnection: connection
|
||||||
|
|
|
@ -47,7 +47,7 @@
|
||||||
* \param name The name of the identity
|
* \param name The name of the identity
|
||||||
* \return A new autoreleased XMPPDiscoIdentity
|
* \return A new autoreleased XMPPDiscoIdentity
|
||||||
*/
|
*/
|
||||||
+ identityWithCategory: (OFString*)category
|
+ (instancetype)identityWithCategory: (OFString*)category
|
||||||
type: (OFString*)type
|
type: (OFString*)type
|
||||||
name: (OFString*)name;
|
name: (OFString*)name;
|
||||||
|
|
||||||
|
@ -59,7 +59,7 @@
|
||||||
* \param type The type of the identity
|
* \param type The type of the identity
|
||||||
* \return A new autoreleased XMPPDiscoIdentity
|
* \return A new autoreleased XMPPDiscoIdentity
|
||||||
*/
|
*/
|
||||||
+ identityWithCategory: (OFString*)category
|
+ (instancetype)identityWithCategory: (OFString*)category
|
||||||
type: (OFString*)type;
|
type: (OFString*)type;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -23,7 +23,7 @@
|
||||||
#import "XMPPDiscoIdentity.h"
|
#import "XMPPDiscoIdentity.h"
|
||||||
|
|
||||||
@implementation XMPPDiscoIdentity
|
@implementation XMPPDiscoIdentity
|
||||||
+ identityWithCategory: (OFString*)category
|
+ (instancetype)identityWithCategory: (OFString*)category
|
||||||
type: (OFString*)type
|
type: (OFString*)type
|
||||||
name: (OFString*)name
|
name: (OFString*)name
|
||||||
{
|
{
|
||||||
|
@ -32,7 +32,7 @@
|
||||||
name: name] autorelease];
|
name: name] autorelease];
|
||||||
}
|
}
|
||||||
|
|
||||||
+ identityWithCategory: (OFString*)category
|
+ (instancetype)identityWithCategory: (OFString*)category
|
||||||
type: (OFString*)type
|
type: (OFString*)type
|
||||||
{
|
{
|
||||||
return [[[self alloc] initWithCategory: category
|
return [[[self alloc] initWithCategory: category
|
||||||
|
|
|
@ -61,7 +61,7 @@
|
||||||
* \param node The node's opaque name
|
* \param node The node's opaque name
|
||||||
* \return A new autoreleased XMPPDiscoNode
|
* \return A new autoreleased XMPPDiscoNode
|
||||||
*/
|
*/
|
||||||
+ discoNodeWithJID: (XMPPJID*)JID
|
+ (instancetype)discoNodeWithJID: (XMPPJID*)JID
|
||||||
node: (OFString*)node;
|
node: (OFString*)node;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -73,7 +73,7 @@
|
||||||
* \param name The node's human friendly name
|
* \param name The node's human friendly name
|
||||||
* \return A new autoreleased XMPPDiscoNode
|
* \return A new autoreleased XMPPDiscoNode
|
||||||
*/
|
*/
|
||||||
+ discoNodeWithJID: (XMPPJID*)JID
|
+ (instancetype)discoNodeWithJID: (XMPPJID*)JID
|
||||||
node: (OFString*)node
|
node: (OFString*)node
|
||||||
name: (OFString*)name;
|
name: (OFString*)name;
|
||||||
|
|
||||||
|
|
|
@ -28,7 +28,7 @@
|
||||||
#import "namespaces.h"
|
#import "namespaces.h"
|
||||||
|
|
||||||
@implementation XMPPDiscoNode
|
@implementation XMPPDiscoNode
|
||||||
+ discoNodeWithJID: (XMPPJID*)JID
|
+ (instancetype)discoNodeWithJID: (XMPPJID*)JID
|
||||||
node: (OFString*)node;
|
node: (OFString*)node;
|
||||||
{
|
{
|
||||||
return [[[self alloc] initWithJID: JID
|
return [[[self alloc] initWithJID: JID
|
||||||
|
@ -36,7 +36,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
+ discoNodeWithJID: (XMPPJID*)JID
|
+ (instancetype)discoNodeWithJID: (XMPPJID*)JID
|
||||||
node: (OFString*)node
|
node: (OFString*)node
|
||||||
name: (OFString*)name
|
name: (OFString*)name
|
||||||
{
|
{
|
||||||
|
|
|
@ -32,7 +32,7 @@
|
||||||
*
|
*
|
||||||
* \return A new autoreleased XMPPEXTERNALAuth
|
* \return A new autoreleased XMPPEXTERNALAuth
|
||||||
*/
|
*/
|
||||||
+ EXTERNALAuth;
|
+ (instancetype)EXTERNALAuth;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Creates a new autoreleased XMPPEXTERNALAuth with an authzid.
|
* \brief Creates a new autoreleased XMPPEXTERNALAuth with an authzid.
|
||||||
|
@ -40,5 +40,5 @@
|
||||||
* \param authzid The authzid to get authorization for
|
* \param authzid The authzid to get authorization for
|
||||||
* \return A new autoreleased XMPPEXTERNALAuth
|
* \return A new autoreleased XMPPEXTERNALAuth
|
||||||
*/
|
*/
|
||||||
+ EXTERNALAuthWithAuthzid: (OFString*)authzid;
|
+ (instancetype)EXTERNALAuthWithAuthzid: (OFString*)authzid;
|
||||||
@end
|
@end
|
||||||
|
|
|
@ -27,13 +27,13 @@
|
||||||
#import "XMPPEXTERNALAuth.h"
|
#import "XMPPEXTERNALAuth.h"
|
||||||
|
|
||||||
@implementation XMPPEXTERNALAuth: XMPPAuthenticator
|
@implementation XMPPEXTERNALAuth: XMPPAuthenticator
|
||||||
+ EXTERNALAuth
|
+ (instancetype)EXTERNALAuth
|
||||||
{
|
{
|
||||||
return [[[self alloc] initWithAuthcid: nil
|
return [[[self alloc] initWithAuthcid: nil
|
||||||
password: nil] autorelease];
|
password: nil] autorelease];
|
||||||
}
|
}
|
||||||
|
|
||||||
+ EXTERNALAuthWithAuthzid: (OFString*)authzid
|
+ (instancetype)EXTERNALAuthWithAuthzid: (OFString*)authzid
|
||||||
{
|
{
|
||||||
return [[[self alloc] initWithAuthzid: authzid
|
return [[[self alloc] initWithAuthzid: authzid
|
||||||
authcid: nil
|
authcid: nil
|
||||||
|
|
|
@ -45,7 +45,7 @@
|
||||||
* for this exception
|
* for this exception
|
||||||
* \return A new XMPPException
|
* \return A new XMPPException
|
||||||
*/
|
*/
|
||||||
+ exceptionWithConnection: (XMPPConnection*)connection;
|
+ (instancetype)exceptionWithConnection: (XMPPConnection*)connection;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Initializes an already allocated XMPPException.
|
* \brief Initializes an already allocated XMPPException.
|
||||||
|
@ -82,7 +82,7 @@
|
||||||
* \param reason The descriptive free-form text specified by the stream error
|
* \param reason The descriptive free-form text specified by the stream error
|
||||||
* \return A new XMPPStreamErrorException
|
* \return A new XMPPStreamErrorException
|
||||||
*/
|
*/
|
||||||
+ exceptionWithConnection: (XMPPConnection*)connection
|
+ (instancetype)exceptionWithConnection: (XMPPConnection*)connection
|
||||||
condition: (OFString*)condition
|
condition: (OFString*)condition
|
||||||
reason: (OFString*)reason;
|
reason: (OFString*)reason;
|
||||||
|
|
||||||
|
@ -126,7 +126,7 @@
|
||||||
* \param string The string that failed the stringprep profile
|
* \param string The string that failed the stringprep profile
|
||||||
* \return A new XMPPStringPrepFailedException
|
* \return A new XMPPStringPrepFailedException
|
||||||
*/
|
*/
|
||||||
+ exceptionWithConnection: (XMPPConnection*)connection
|
+ (instancetype)exceptionWithConnection: (XMPPConnection*)connection
|
||||||
profile: (OFString*)profile
|
profile: (OFString*)profile
|
||||||
string: (OFString*)string;
|
string: (OFString*)string;
|
||||||
|
|
||||||
|
@ -169,7 +169,7 @@
|
||||||
* \param string The string that could not be translated
|
* \param string The string that could not be translated
|
||||||
* \return A new XMPPIDNATranslationFailedException
|
* \return A new XMPPIDNATranslationFailedException
|
||||||
*/
|
*/
|
||||||
+ exceptionWithConnection: (XMPPConnection*)connection
|
+ (instancetype)exceptionWithConnection: (XMPPConnection*)connection
|
||||||
operation: (OFString*)operation
|
operation: (OFString*)operation
|
||||||
string: (OFString*)string;
|
string: (OFString*)string;
|
||||||
|
|
||||||
|
@ -209,7 +209,7 @@
|
||||||
* \param reason The reason the authentication failed
|
* \param reason The reason the authentication failed
|
||||||
* \return A new XMPPAuthFailedException
|
* \return A new XMPPAuthFailedException
|
||||||
*/
|
*/
|
||||||
+ exceptionWithConnection: (XMPPConnection*)connection
|
+ (instancetype)exceptionWithConnection: (XMPPConnection*)connection
|
||||||
reason: (OFString*)reason;
|
reason: (OFString*)reason;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -30,7 +30,7 @@
|
||||||
#import "XMPPConnection.h"
|
#import "XMPPConnection.h"
|
||||||
|
|
||||||
@implementation XMPPException
|
@implementation XMPPException
|
||||||
+ exceptionWithConnection: (XMPPConnection*)connection
|
+ (instancetype)exceptionWithConnection: (XMPPConnection*)connection
|
||||||
{
|
{
|
||||||
return [[[self alloc] initWithConnection: connection] autorelease];
|
return [[[self alloc] initWithConnection: connection] autorelease];
|
||||||
}
|
}
|
||||||
|
@ -75,7 +75,7 @@
|
||||||
@end
|
@end
|
||||||
|
|
||||||
@implementation XMPPStreamErrorException
|
@implementation XMPPStreamErrorException
|
||||||
+ exceptionWithConnection: (XMPPConnection*)connection
|
+ (instancetype)exceptionWithConnection: (XMPPConnection*)connection
|
||||||
condition: (OFString*)condition
|
condition: (OFString*)condition
|
||||||
reason: (OFString*)reason;
|
reason: (OFString*)reason;
|
||||||
{
|
{
|
||||||
|
@ -139,7 +139,7 @@
|
||||||
@end
|
@end
|
||||||
|
|
||||||
@implementation XMPPStringPrepFailedException
|
@implementation XMPPStringPrepFailedException
|
||||||
+ exceptionWithConnection: (XMPPConnection*)connection
|
+ (instancetype)exceptionWithConnection: (XMPPConnection*)connection
|
||||||
profile: (OFString*)profile
|
profile: (OFString*)profile
|
||||||
string: (OFString*)string
|
string: (OFString*)string
|
||||||
{
|
{
|
||||||
|
@ -204,7 +204,7 @@
|
||||||
@end
|
@end
|
||||||
|
|
||||||
@implementation XMPPIDNATranslationFailedException
|
@implementation XMPPIDNATranslationFailedException
|
||||||
+ exceptionWithConnection: (XMPPConnection*)connection
|
+ (instancetype)exceptionWithConnection: (XMPPConnection*)connection
|
||||||
operation: (OFString*)operation
|
operation: (OFString*)operation
|
||||||
string: (OFString*)string
|
string: (OFString*)string
|
||||||
{
|
{
|
||||||
|
@ -268,7 +268,7 @@
|
||||||
@end
|
@end
|
||||||
|
|
||||||
@implementation XMPPAuthFailedException
|
@implementation XMPPAuthFailedException
|
||||||
+ exceptionWithConnection: (XMPPConnection*)connection
|
+ (instancetype)exceptionWithConnection: (XMPPConnection*)connection
|
||||||
reason: (OFString*)reason;
|
reason: (OFString*)reason;
|
||||||
{
|
{
|
||||||
return [[[self alloc] initWithConnection: connection
|
return [[[self alloc] initWithConnection: connection
|
||||||
|
|
|
@ -34,7 +34,7 @@
|
||||||
* \param ID The value for the stanza's id attribute
|
* \param ID The value for the stanza's id attribute
|
||||||
* \return A new autoreleased XMPPIQ
|
* \return A new autoreleased XMPPIQ
|
||||||
*/
|
*/
|
||||||
+ IQWithType: (OFString*)type
|
+ (instancetype)IQWithType: (OFString*)type
|
||||||
ID: (OFString*)ID;
|
ID: (OFString*)ID;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -29,7 +29,7 @@
|
||||||
#import "XMPPIQ.h"
|
#import "XMPPIQ.h"
|
||||||
|
|
||||||
@implementation XMPPIQ
|
@implementation XMPPIQ
|
||||||
+ IQWithType: (OFString*)type
|
+ (instancetype)IQWithType: (OFString*)type
|
||||||
ID: (OFString*)ID
|
ID: (OFString*)ID
|
||||||
{
|
{
|
||||||
return [[[self alloc] initWithType: type
|
return [[[self alloc] initWithType: type
|
||||||
|
|
|
@ -45,7 +45,7 @@
|
||||||
*
|
*
|
||||||
* \return A new autoreleased XMPPJID
|
* \return A new autoreleased XMPPJID
|
||||||
*/
|
*/
|
||||||
+ JID;
|
+ (instancetype)JID;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Creates a new autoreleased XMPPJID from a string.
|
* \brief Creates a new autoreleased XMPPJID from a string.
|
||||||
|
@ -53,7 +53,7 @@
|
||||||
* \param string The string to parse into a JID object
|
* \param string The string to parse into a JID object
|
||||||
* \return A new autoreleased XMPPJID
|
* \return A new autoreleased XMPPJID
|
||||||
*/
|
*/
|
||||||
+ JIDWithString: (OFString*)string;
|
+ (instancetype)JIDWithString: (OFString*)string;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Initializes an already allocated XMPPJID with a string.
|
* \brief Initializes an already allocated XMPPJID with a string.
|
||||||
|
|
|
@ -33,12 +33,12 @@
|
||||||
#import "XMPPExceptions.h"
|
#import "XMPPExceptions.h"
|
||||||
|
|
||||||
@implementation XMPPJID
|
@implementation XMPPJID
|
||||||
+ JID
|
+ (instancetype)JID
|
||||||
{
|
{
|
||||||
return [[[self alloc] init] autorelease];
|
return [[[self alloc] init] autorelease];
|
||||||
}
|
}
|
||||||
|
|
||||||
+ JIDWithString: (OFString*)string
|
+ (instancetype)JIDWithString: (OFString*)string
|
||||||
{
|
{
|
||||||
return [[[self alloc] initWithString: string] autorelease];
|
return [[[self alloc] initWithString: string] autorelease];
|
||||||
}
|
}
|
||||||
|
|
|
@ -37,7 +37,7 @@
|
||||||
*
|
*
|
||||||
* \return A new autoreleased XMPPMessage
|
* \return A new autoreleased XMPPMessage
|
||||||
*/
|
*/
|
||||||
+ message;
|
+ (instancetype)message;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Creates a new autoreleased XMPPMessage with the specified ID.
|
* \brief Creates a new autoreleased XMPPMessage with the specified ID.
|
||||||
|
@ -45,7 +45,7 @@
|
||||||
* \param ID The value for the stanza's id attribute
|
* \param ID The value for the stanza's id attribute
|
||||||
* \return A new autoreleased XMPPMessage
|
* \return A new autoreleased XMPPMessage
|
||||||
*/
|
*/
|
||||||
+ messageWithID: (OFString*)ID;
|
+ (instancetype)messageWithID: (OFString*)ID;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Creates a new autoreleased XMPPMessage with the specified type.
|
* \brief Creates a new autoreleased XMPPMessage with the specified type.
|
||||||
|
@ -53,7 +53,7 @@
|
||||||
* \param type The value for the stanza's type attribute
|
* \param type The value for the stanza's type attribute
|
||||||
* \return A new autoreleased XMPPMessage
|
* \return A new autoreleased XMPPMessage
|
||||||
*/
|
*/
|
||||||
+ messageWithType: (OFString*)type;
|
+ (instancetype)messageWithType: (OFString*)type;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Creates a new autoreleased XMPPMessage with the specified type and ID.
|
* \brief Creates a new autoreleased XMPPMessage with the specified type and ID.
|
||||||
|
@ -62,7 +62,7 @@
|
||||||
* \param ID The value for the stanza's id attribute
|
* \param ID The value for the stanza's id attribute
|
||||||
* \return A new autoreleased XMPPMessage
|
* \return A new autoreleased XMPPMessage
|
||||||
*/
|
*/
|
||||||
+ messageWithType: (OFString*)type
|
+ (instancetype)messageWithType: (OFString*)type
|
||||||
ID: (OFString*)ID;
|
ID: (OFString*)ID;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -29,22 +29,22 @@
|
||||||
#import "namespaces.h"
|
#import "namespaces.h"
|
||||||
|
|
||||||
@implementation XMPPMessage
|
@implementation XMPPMessage
|
||||||
+ message
|
+ (instancetype)message
|
||||||
{
|
{
|
||||||
return [[[self alloc] init] autorelease];
|
return [[[self alloc] init] autorelease];
|
||||||
}
|
}
|
||||||
|
|
||||||
+ messageWithID: (OFString*)ID
|
+ (instancetype)messageWithID: (OFString*)ID
|
||||||
{
|
{
|
||||||
return [[[self alloc] initWithID: ID] autorelease];
|
return [[[self alloc] initWithID: ID] autorelease];
|
||||||
}
|
}
|
||||||
|
|
||||||
+ messageWithType: (OFString*)type
|
+ (instancetype)messageWithType: (OFString*)type
|
||||||
{
|
{
|
||||||
return [[[self alloc] initWithType: type] autorelease];
|
return [[[self alloc] initWithType: type] autorelease];
|
||||||
}
|
}
|
||||||
|
|
||||||
+ messageWithType: (OFString*)type
|
+ (instancetype)messageWithType: (OFString*)type
|
||||||
ID: (OFString*)ID
|
ID: (OFString*)ID
|
||||||
{
|
{
|
||||||
return [[[self alloc] initWithType: type
|
return [[[self alloc] initWithType: type
|
||||||
|
|
|
@ -34,7 +34,7 @@
|
||||||
* \param password The password to authenticate with
|
* \param password The password to authenticate with
|
||||||
* \return A new autoreleased XMPPPLAINAuth
|
* \return A new autoreleased XMPPPLAINAuth
|
||||||
*/
|
*/
|
||||||
+ PLAINAuthWithAuthcid: (OFString*)authcid
|
+ (instancetype)PLAINAuthWithAuthcid: (OFString*)authcid
|
||||||
password: (OFString*)password;
|
password: (OFString*)password;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -46,7 +46,7 @@
|
||||||
* \param password The password to authenticate with
|
* \param password The password to authenticate with
|
||||||
* \return A new autoreleased XMPPPLAINAuth
|
* \return A new autoreleased XMPPPLAINAuth
|
||||||
*/
|
*/
|
||||||
+ PLAINAuthWithAuthzid: (OFString*)authzid
|
+ (instancetype)PLAINAuthWithAuthzid: (OFString*)authzid
|
||||||
authcid: (OFString*)authcid
|
authcid: (OFString*)authcid
|
||||||
password: (OFString*)password;
|
password: (OFString*)password;
|
||||||
@end
|
@end
|
||||||
|
|
|
@ -28,14 +28,14 @@
|
||||||
#import "XMPPExceptions.h"
|
#import "XMPPExceptions.h"
|
||||||
|
|
||||||
@implementation XMPPPLAINAuth
|
@implementation XMPPPLAINAuth
|
||||||
+ PLAINAuthWithAuthcid: (OFString*)authcid
|
+ (instancetype)PLAINAuthWithAuthcid: (OFString*)authcid
|
||||||
password: (OFString*)password
|
password: (OFString*)password
|
||||||
{
|
{
|
||||||
return [[[self alloc] initWithAuthcid: authcid
|
return [[[self alloc] initWithAuthcid: authcid
|
||||||
password: password] autorelease];
|
password: password] autorelease];
|
||||||
}
|
}
|
||||||
|
|
||||||
+ PLAINAuthWithAuthzid: (OFString*)authzid
|
+ (instancetype)PLAINAuthWithAuthzid: (OFString*)authzid
|
||||||
authcid: (OFString*)authcid
|
authcid: (OFString*)authcid
|
||||||
password: (OFString*)password
|
password: (OFString*)password
|
||||||
{
|
{
|
||||||
|
|
|
@ -42,7 +42,7 @@
|
||||||
*
|
*
|
||||||
* \return A new autoreleased XMPPPresence
|
* \return A new autoreleased XMPPPresence
|
||||||
*/
|
*/
|
||||||
+ presence;
|
+ (instancetype)presence;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Creates a new autoreleased XMPPPresence with the specified ID.
|
* \brief Creates a new autoreleased XMPPPresence with the specified ID.
|
||||||
|
@ -50,7 +50,7 @@
|
||||||
* \param ID The value for the stanza's id attribute
|
* \param ID The value for the stanza's id attribute
|
||||||
* \return A new autoreleased XMPPPresence
|
* \return A new autoreleased XMPPPresence
|
||||||
*/
|
*/
|
||||||
+ presenceWithID: (OFString*)ID;
|
+ (instancetype)presenceWithID: (OFString*)ID;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Creates a new autoreleased XMPPPresence with the specified type.
|
* \brief Creates a new autoreleased XMPPPresence with the specified type.
|
||||||
|
@ -58,7 +58,7 @@
|
||||||
* \param type The value for the stanza's type attribute
|
* \param type The value for the stanza's type attribute
|
||||||
* \return A new autoreleased XMPPPresence
|
* \return A new autoreleased XMPPPresence
|
||||||
*/
|
*/
|
||||||
+ presenceWithType: (OFString*)type;
|
+ (instancetype)presenceWithType: (OFString*)type;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Creates a new autoreleased XMPPPresence with the specified type and
|
* \brief Creates a new autoreleased XMPPPresence with the specified type and
|
||||||
|
@ -68,7 +68,7 @@
|
||||||
* \param ID The value for the stanza's id attribute
|
* \param ID The value for the stanza's id attribute
|
||||||
* \return A new autoreleased XMPPPresence
|
* \return A new autoreleased XMPPPresence
|
||||||
*/
|
*/
|
||||||
+ presenceWithType: (OFString*)type
|
+ (instancetype)presenceWithType: (OFString*)type
|
||||||
ID: (OFString*)ID;
|
ID: (OFString*)ID;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -43,22 +43,22 @@ static int show_to_int(OFString *show)
|
||||||
}
|
}
|
||||||
|
|
||||||
@implementation XMPPPresence
|
@implementation XMPPPresence
|
||||||
+ presence
|
+ (instancetype)presence
|
||||||
{
|
{
|
||||||
return [[[self alloc] init] autorelease];
|
return [[[self alloc] init] autorelease];
|
||||||
}
|
}
|
||||||
|
|
||||||
+ presenceWithID: (OFString*)ID
|
+ (instancetype)presenceWithID: (OFString*)ID
|
||||||
{
|
{
|
||||||
return [[[self alloc] initWithID: ID] autorelease];
|
return [[[self alloc] initWithID: ID] autorelease];
|
||||||
}
|
}
|
||||||
|
|
||||||
+ presenceWithType: (OFString*)type
|
+ (instancetype)presenceWithType: (OFString*)type
|
||||||
{
|
{
|
||||||
return [[[self alloc] initWithType: type] autorelease];
|
return [[[self alloc] initWithType: type] autorelease];
|
||||||
}
|
}
|
||||||
|
|
||||||
+ presenceWithType: (OFString*)type
|
+ (instancetype)presenceWithType: (OFString*)type
|
||||||
ID: (OFString*)ID
|
ID: (OFString*)ID
|
||||||
{
|
{
|
||||||
return [[[self alloc] initWithType: type
|
return [[[self alloc] initWithType: type
|
||||||
|
|
|
@ -51,7 +51,7 @@
|
||||||
*
|
*
|
||||||
* \return A new autoreleased roster item.
|
* \return A new autoreleased roster item.
|
||||||
*/
|
*/
|
||||||
+ rosterItem;
|
+ (instancetype)rosterItem;
|
||||||
|
|
||||||
- (void)setJID: (XMPPJID*)JID;
|
- (void)setJID: (XMPPJID*)JID;
|
||||||
- (XMPPJID*)JID;
|
- (XMPPJID*)JID;
|
||||||
|
|
|
@ -30,7 +30,7 @@
|
||||||
#import <ObjFW/macros.h>
|
#import <ObjFW/macros.h>
|
||||||
|
|
||||||
@implementation XMPPRosterItem
|
@implementation XMPPRosterItem
|
||||||
+ rosterItem
|
+ (instancetype)rosterItem
|
||||||
{
|
{
|
||||||
return [[[self alloc] init] autorelease];
|
return [[[self alloc] init] autorelease];
|
||||||
}
|
}
|
||||||
|
|
|
@ -49,7 +49,7 @@
|
||||||
* \param plusAvailable Whether the PLUS variant was offered
|
* \param plusAvailable Whether the PLUS variant was offered
|
||||||
* \return A new autoreleased XMPPSCRAMAuth
|
* \return A new autoreleased XMPPSCRAMAuth
|
||||||
*/
|
*/
|
||||||
+ SCRAMAuthWithAuthcid: (OFString*)authcid
|
+ (instancetype)SCRAMAuthWithAuthcid: (OFString*)authcid
|
||||||
password: (OFString*)password
|
password: (OFString*)password
|
||||||
connection: (XMPPConnection*)connection
|
connection: (XMPPConnection*)connection
|
||||||
hash: (Class)hash
|
hash: (Class)hash
|
||||||
|
@ -67,7 +67,7 @@
|
||||||
* \param plusAvailable Whether the PLUS variant was offered
|
* \param plusAvailable Whether the PLUS variant was offered
|
||||||
* \return A new autoreleased XMPPSCRAMAuth
|
* \return A new autoreleased XMPPSCRAMAuth
|
||||||
*/
|
*/
|
||||||
+ SCRAMAuthWithAuthzid: (OFString*)authzid
|
+ (instancetype)SCRAMAuthWithAuthzid: (OFString*)authzid
|
||||||
authcid: (OFString*)authcid
|
authcid: (OFString*)authcid
|
||||||
password: (OFString*)password
|
password: (OFString*)password
|
||||||
connection: (XMPPConnection*)connection
|
connection: (XMPPConnection*)connection
|
||||||
|
|
|
@ -38,7 +38,7 @@
|
||||||
#define HMAC_OPAD 0x5c
|
#define HMAC_OPAD 0x5c
|
||||||
|
|
||||||
@implementation XMPPSCRAMAuth
|
@implementation XMPPSCRAMAuth
|
||||||
+ SCRAMAuthWithAuthcid: (OFString*)authcid
|
+ (instancetype)SCRAMAuthWithAuthcid: (OFString*)authcid
|
||||||
password: (OFString*)password
|
password: (OFString*)password
|
||||||
connection: (XMPPConnection*)connection
|
connection: (XMPPConnection*)connection
|
||||||
hash: (Class)hash
|
hash: (Class)hash
|
||||||
|
@ -51,7 +51,7 @@
|
||||||
plusAvailable: plusAvailable] autorelease];
|
plusAvailable: plusAvailable] autorelease];
|
||||||
}
|
}
|
||||||
|
|
||||||
+ SCRAMAuthWithAuthzid: (OFString*)authzid
|
+ (instancetype)SCRAMAuthWithAuthzid: (OFString*)authzid
|
||||||
authcid: (OFString*)authcid
|
authcid: (OFString*)authcid
|
||||||
password: (OFString*)password
|
password: (OFString*)password
|
||||||
connection: (XMPPConnection*)connection
|
connection: (XMPPConnection*)connection
|
||||||
|
|
|
@ -43,11 +43,11 @@
|
||||||
@property (readonly, copy) OFString *target;
|
@property (readonly, copy) OFString *target;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
+ entryWithPriority: (uint16_t)priority
|
+ (instancetype)entryWithPriority: (uint16_t)priority
|
||||||
weight: (uint16_t)weight
|
weight: (uint16_t)weight
|
||||||
port: (uint16_t)port
|
port: (uint16_t)port
|
||||||
target: (OFString*)target;
|
target: (OFString*)target;
|
||||||
+ entryWithResourceRecord: (ns_rr)resourceRecord
|
+ (instancetype)entryWithResourceRecord: (ns_rr)resourceRecord
|
||||||
handle: (ns_msg)handle;
|
handle: (ns_msg)handle;
|
||||||
- initWithPriority: (uint16_t)priority
|
- initWithPriority: (uint16_t)priority
|
||||||
weight: (uint16_t)weight
|
weight: (uint16_t)weight
|
||||||
|
@ -74,7 +74,7 @@
|
||||||
@property (readonly, copy) OFString *domain;
|
@property (readonly, copy) OFString *domain;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
+ lookupWithDomain: (OFString*)domain;
|
+ (instancetype)lookupWithDomain: (OFString*)domain;
|
||||||
- initWithDomain: (OFString*)domain;
|
- initWithDomain: (OFString*)domain;
|
||||||
|
|
||||||
- (void)XMPP_lookup;
|
- (void)XMPP_lookup;
|
||||||
|
|
|
@ -37,7 +37,7 @@
|
||||||
#import "XMPPSRVLookup.h"
|
#import "XMPPSRVLookup.h"
|
||||||
|
|
||||||
@implementation XMPPSRVEntry
|
@implementation XMPPSRVEntry
|
||||||
+ entryWithPriority: (uint16_t)priority
|
+ (instancetype)entryWithPriority: (uint16_t)priority
|
||||||
weight: (uint16_t)weight
|
weight: (uint16_t)weight
|
||||||
port: (uint16_t)port
|
port: (uint16_t)port
|
||||||
target: (OFString*)target
|
target: (OFString*)target
|
||||||
|
@ -48,7 +48,7 @@
|
||||||
target: target] autorelease];
|
target: target] autorelease];
|
||||||
}
|
}
|
||||||
|
|
||||||
+ entryWithResourceRecord: (ns_rr)resourceRecord
|
+ (instancetype)entryWithResourceRecord: (ns_rr)resourceRecord
|
||||||
handle: (ns_msg)handle
|
handle: (ns_msg)handle
|
||||||
{
|
{
|
||||||
return [[[self alloc] initWithResourceRecord: resourceRecord
|
return [[[self alloc] initWithResourceRecord: resourceRecord
|
||||||
|
@ -163,7 +163,7 @@
|
||||||
@end
|
@end
|
||||||
|
|
||||||
@implementation XMPPSRVLookup
|
@implementation XMPPSRVLookup
|
||||||
+ lookupWithDomain: (OFString*)domain
|
+ (instancetype)lookupWithDomain: (OFString*)domain
|
||||||
{
|
{
|
||||||
return [[[self alloc] initWithDomain: domain] autorelease];
|
return [[[self alloc] initWithDomain: domain] autorelease];
|
||||||
}
|
}
|
||||||
|
|
|
@ -52,7 +52,7 @@
|
||||||
* \param name The stanza's name (one of iq, message or presence)
|
* \param name The stanza's name (one of iq, message or presence)
|
||||||
* \return A new autoreleased XMPPStanza
|
* \return A new autoreleased XMPPStanza
|
||||||
*/
|
*/
|
||||||
+ stanzaWithName: (OFString*)name;
|
+ (instancetype)stanzaWithName: (OFString*)name;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Creates a new autoreleased XMPPStanza with the specified name and
|
* \brief Creates a new autoreleased XMPPStanza with the specified name and
|
||||||
|
@ -62,7 +62,7 @@
|
||||||
* \param type The value for the stanza's type attribute
|
* \param type The value for the stanza's type attribute
|
||||||
* \return A new autoreleased XMPPStanza
|
* \return A new autoreleased XMPPStanza
|
||||||
*/
|
*/
|
||||||
+ stanzaWithName: (OFString*)name
|
+ (instancetype)stanzaWithName: (OFString*)name
|
||||||
type: (OFString*)type;
|
type: (OFString*)type;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -72,7 +72,7 @@
|
||||||
* \param ID The value for the stanza's id attribute
|
* \param ID The value for the stanza's id attribute
|
||||||
* \return A new autoreleased XMPPStanza
|
* \return A new autoreleased XMPPStanza
|
||||||
*/
|
*/
|
||||||
+ stanzaWithName: (OFString*)name
|
+ (instancetype)stanzaWithName: (OFString*)name
|
||||||
ID: (OFString*)ID;
|
ID: (OFString*)ID;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -84,7 +84,7 @@
|
||||||
* \param ID The value for the stanza's id attribute
|
* \param ID The value for the stanza's id attribute
|
||||||
* \return A new autoreleased XMPPStanza
|
* \return A new autoreleased XMPPStanza
|
||||||
*/
|
*/
|
||||||
+ stanzaWithName: (OFString*)name
|
+ (instancetype)stanzaWithName: (OFString*)name
|
||||||
type: (OFString*)type
|
type: (OFString*)type
|
||||||
ID: (OFString*)ID;
|
ID: (OFString*)ID;
|
||||||
|
|
||||||
|
@ -94,7 +94,7 @@
|
||||||
* \param element The element to base the XMPPStanza on
|
* \param element The element to base the XMPPStanza on
|
||||||
* \return A new autoreleased XMPPStanza
|
* \return A new autoreleased XMPPStanza
|
||||||
*/
|
*/
|
||||||
+ stanzaWithElement: (OFXMLElement*)element;
|
+ (instancetype)stanzaWithElement: (OFXMLElement*)element;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Initializes an already allocated XMPPStanza with the specified name.
|
* \brief Initializes an already allocated XMPPStanza with the specified name.
|
||||||
|
|
|
@ -30,26 +30,26 @@
|
||||||
#import "namespaces.h"
|
#import "namespaces.h"
|
||||||
|
|
||||||
@implementation XMPPStanza
|
@implementation XMPPStanza
|
||||||
+ stanzaWithName: (OFString*)name
|
+ (instancetype)stanzaWithName: (OFString*)name
|
||||||
{
|
{
|
||||||
return [[[self alloc] initWithName: name] autorelease];
|
return [[[self alloc] initWithName: name] autorelease];
|
||||||
}
|
}
|
||||||
|
|
||||||
+ stanzaWithName: (OFString*)name
|
+ (instancetype)stanzaWithName: (OFString*)name
|
||||||
type: (OFString*)type
|
type: (OFString*)type
|
||||||
{
|
{
|
||||||
return [[[self alloc] initWithName: name
|
return [[[self alloc] initWithName: name
|
||||||
type: type] autorelease];
|
type: type] autorelease];
|
||||||
}
|
}
|
||||||
|
|
||||||
+ stanzaWithName: (OFString*)name
|
+ (instancetype)stanzaWithName: (OFString*)name
|
||||||
ID: (OFString*)ID
|
ID: (OFString*)ID
|
||||||
{
|
{
|
||||||
return [[[self alloc] initWithName: name
|
return [[[self alloc] initWithName: name
|
||||||
ID: ID] autorelease];
|
ID: ID] autorelease];
|
||||||
}
|
}
|
||||||
|
|
||||||
+ stanzaWithName: (OFString*)name
|
+ (instancetype)stanzaWithName: (OFString*)name
|
||||||
type: (OFString*)type
|
type: (OFString*)type
|
||||||
ID: (OFString*)ID
|
ID: (OFString*)ID
|
||||||
{
|
{
|
||||||
|
@ -58,7 +58,7 @@
|
||||||
ID: ID] autorelease];
|
ID: ID] autorelease];
|
||||||
}
|
}
|
||||||
|
|
||||||
+ stanzaWithElement: (OFXMLElement*)element
|
+ (instancetype)stanzaWithElement: (OFXMLElement*)element
|
||||||
{
|
{
|
||||||
return [[[self alloc] initWithElement: element] autorelease];
|
return [[[self alloc] initWithElement: element] autorelease];
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue