Documentation improvements.
This commit is contained in:
parent
ed82ae1799
commit
0da29ac529
14 changed files with 153 additions and 129 deletions
|
@ -35,17 +35,17 @@
|
|||
}
|
||||
|
||||
#ifdef OF_HAVE_PROPERTIES
|
||||
/// The authzid to get authorization for
|
||||
/// \brief The authzid to get authorization for
|
||||
@property (copy) OFString *authzid;
|
||||
/// The authcid to authenticate with
|
||||
/// \brief The authcid to authenticate with
|
||||
@property (copy) OFString *authcid;
|
||||
/// The password to authenticate with
|
||||
/// \brief The password to authenticate with
|
||||
@property (copy) OFString *password;
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Initializes an already allocated XMPPAuthenticator with an authcid
|
||||
* and password.
|
||||
* \brief Initializes an already allocated XMPPAuthenticator with an authcid
|
||||
* and password.
|
||||
*
|
||||
* \param authcid The authcid to authenticate with
|
||||
* \param password The password to authenticate with
|
||||
|
@ -55,8 +55,8 @@
|
|||
password: (OFString*)password;
|
||||
|
||||
/**
|
||||
* Initializes an already allocated XMPPSCRAMAuthenticator with an authzid,
|
||||
* authcid and password.
|
||||
* \brief Initializes an already allocated XMPPSCRAMAuthenticator with an
|
||||
* authzid, authcid and password.
|
||||
*
|
||||
* \param authzid The authzid to get authorization for
|
||||
* \param authcid The authcid to authenticate with
|
||||
|
@ -68,11 +68,15 @@
|
|||
password: (OFString*)password;
|
||||
|
||||
/**
|
||||
* \return A OFDataAray containing the initial authentication message
|
||||
* \brief Returns an OFDataArray containing the initial authentication message.
|
||||
*
|
||||
* \return An OFDataAray containing the initial authentication message
|
||||
*/
|
||||
- (OFDataArray*)initialMessage;
|
||||
|
||||
/**
|
||||
* \brief Continue authentication with the specified data.
|
||||
*
|
||||
* \param data The continuation data send by the server
|
||||
* \return The appropriate response if the data was a challenge, nil otherwise
|
||||
*/
|
||||
|
|
|
@ -170,47 +170,50 @@
|
|||
#endif
|
||||
|
||||
/**
|
||||
* \brief Creates a new autoreleased XMPPConnection.
|
||||
*
|
||||
* \return A new autoreleased XMPPConnection
|
||||
*/
|
||||
+ connection;
|
||||
|
||||
/**
|
||||
* Adds the specified delegate.
|
||||
* \brief Adds the specified delegate.
|
||||
*
|
||||
* \param delegate The delegate to add
|
||||
*/
|
||||
- (void)addDelegate: (id <XMPPConnectionDelegate>)delegate;
|
||||
|
||||
/**
|
||||
* Removes the specified delegate.
|
||||
* \brief Removes the specified delegate.
|
||||
*
|
||||
* \param delegate The delegate to remove
|
||||
*/
|
||||
- (void)removeDelegate: (id <XMPPConnectionDelegate>)delegate;
|
||||
|
||||
/**
|
||||
* Connects to the XMPP service.
|
||||
* \brief Connects to the XMPP service.
|
||||
*/
|
||||
- (void)connect;
|
||||
|
||||
/**
|
||||
* Closes the stream to the XMPP service
|
||||
* \brief Closes the stream to the XMPP service
|
||||
*/
|
||||
- (void)close;
|
||||
|
||||
/**
|
||||
* Checks the certificate presented by the server.
|
||||
* Throws SSLInvalidCertificateException on failure.
|
||||
* \brief Checks the certificate presented by the server.
|
||||
*
|
||||
* \throw SSLInvalidCertificateException Thrown if the certificate is invalid
|
||||
*/
|
||||
- (void)checkCertificate;
|
||||
|
||||
/**
|
||||
* Starts a loop handling incomming data.
|
||||
* \brief Starts a loop handling incomming data.
|
||||
*/
|
||||
- (void)handleConnection;
|
||||
|
||||
/**
|
||||
* Parses the specified buffer.
|
||||
* \brief Parses the specified buffer.
|
||||
*
|
||||
* This is useful for handling multiple connections at once.
|
||||
*
|
||||
|
@ -222,36 +225,42 @@
|
|||
withLength: (size_t)length;
|
||||
|
||||
/**
|
||||
* \brief Returns the socket used by the XMPPConnection.
|
||||
*
|
||||
* \return The socket used by the XMPPConnection
|
||||
*/
|
||||
- (OFTCPSocket*)socket;
|
||||
|
||||
/**
|
||||
* \brief Returns whether encryption is encrypted.
|
||||
*
|
||||
* \return Whether encryption is encrypted
|
||||
*/
|
||||
- (BOOL)encryptionRequired;
|
||||
|
||||
/**
|
||||
* Sets whether encryption is required.
|
||||
* \brief Sets whether encryption is required.
|
||||
*
|
||||
* \param required Whether encryption is required
|
||||
*/
|
||||
- (void)setEncryptionRequired: (BOOL)required;
|
||||
|
||||
/**
|
||||
* \brief Returns whether the connection is encrypted.
|
||||
*
|
||||
* \return Whether the connection is encrypted
|
||||
*/
|
||||
- (BOOL)encrypted;
|
||||
|
||||
/**
|
||||
* Sends an OFXMLElement, usually an XMPPStanza.
|
||||
* \brief Sends an OFXMLElement, usually an XMPPStanza.
|
||||
*
|
||||
* \param element The element to send
|
||||
*/
|
||||
- (void)sendStanza: (OFXMLElement*)element;
|
||||
|
||||
/**
|
||||
* Sends an XMPPIQ, registering a callback method
|
||||
* \brief Sends an XMPPIQ, registering a callback method.
|
||||
*
|
||||
* \param object The object that contains the callback method
|
||||
* \param selector The selector of the callback method,
|
||||
|
@ -263,7 +272,7 @@
|
|||
|
||||
#ifdef OF_HAVE_BLOCKS
|
||||
/**
|
||||
* Sends an XMPPIQ, registering a callback block
|
||||
* \brief Sends an XMPPIQ, registering a callback block.
|
||||
*
|
||||
* \param callback The callback block
|
||||
*/
|
||||
|
@ -272,7 +281,7 @@
|
|||
#endif
|
||||
|
||||
/**
|
||||
* Generates a new, unique stanza ID.
|
||||
* \brief Generates a new, unique stanza ID.
|
||||
*
|
||||
* \return A new, generated, unique stanza ID.
|
||||
*/
|
||||
|
|
|
@ -28,14 +28,14 @@
|
|||
*/
|
||||
@interface XMPPEXTERNALAuth: XMPPAuthenticator
|
||||
/**
|
||||
* Creates a new autoreleased XMPPEXTERNALAuth.
|
||||
* \brief Creates a new autoreleased XMPPEXTERNALAuth.
|
||||
*
|
||||
* \return A new autoreleased XMPPEXTERNALAuth
|
||||
*/
|
||||
+ EXTERNALAuth;
|
||||
|
||||
/**
|
||||
* Creates a new autoreleased XMPPEXTERNALAuth with an authzid.
|
||||
* \brief Creates a new autoreleased XMPPEXTERNALAuth with an authzid.
|
||||
*
|
||||
* \param authzid The authzid to get authorization for
|
||||
* \return A new autoreleased XMPPEXTERNALAuth
|
||||
|
|
|
@ -36,12 +36,12 @@
|
|||
}
|
||||
|
||||
#ifdef OF_HAVE_PROPERTIES
|
||||
/// The connection the exception relates to
|
||||
/// \brief The connection the exception relates to
|
||||
@property (readonly, assign) XMPPConnection *connection;
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Creates a new XMPPException
|
||||
* \brief Creates a new XMPPException.
|
||||
*
|
||||
* \param class_ The class of the object which caused the exception
|
||||
* \param connection The connection that received the data responsible
|
||||
|
@ -52,7 +52,7 @@
|
|||
connection: (XMPPConnection*)connection;
|
||||
|
||||
/**
|
||||
* Initializes an already allocated XMPPException
|
||||
* \brief Initializes an already allocated XMPPException.
|
||||
*
|
||||
* \param class_ The class of the object which caused the exception
|
||||
* \param connection The connection that received the data responsible
|
||||
|
@ -77,14 +77,14 @@
|
|||
}
|
||||
|
||||
#ifdef OF_HAVE_PROPERTIES
|
||||
/// The defined error condition specified by the stream error
|
||||
/// \brief The defined error condition specified by the stream error
|
||||
@property (readonly, assign) OFString *condition;
|
||||
/// The descriptive free-form text specified by the stream error
|
||||
/// \brief The descriptive free-form text specified by the stream error
|
||||
@property (readonly, assign) OFString *reason;
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Creates a new XMPPStreamErrorException
|
||||
* \brief Creates a new XMPPStreamErrorException.
|
||||
*
|
||||
* \param class_ The class of the object which caused the exception
|
||||
* \param connection The connection that received the stream error
|
||||
|
@ -98,7 +98,7 @@
|
|||
reason: (OFString*)reason;
|
||||
|
||||
/**
|
||||
* Initializes an already allocated XMPPStreamErrorException
|
||||
* \brief Initializes an already allocated XMPPStreamErrorException.
|
||||
*
|
||||
* \param class_ The class of the object which caused the exception
|
||||
* \param connection The connection that received the stream error
|
||||
|
@ -128,14 +128,14 @@
|
|||
}
|
||||
|
||||
#ifdef OF_HAVE_PROPERTIES
|
||||
/// The name of the stringprep profile that did not apply
|
||||
/// \brief The name of the stringprep profile that did not apply
|
||||
@property (readonly, assign) OFString *profile;
|
||||
/// The string that failed the stringprep profile
|
||||
/// \brief The string that failed the stringprep profile
|
||||
@property (readonly, assign) OFString *string;
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Creates a new XMPPStringPrepFailedException
|
||||
* \brief Creates a new XMPPStringPrepFailedException.
|
||||
*
|
||||
* \param class_ The class of the object which caused the exception
|
||||
* \param connection The connection the string relates to
|
||||
|
@ -149,7 +149,7 @@
|
|||
string: (OFString*)string;
|
||||
|
||||
/**
|
||||
* Initializes an already allocated XMPPStringPrepFailedException
|
||||
* \brief Initializes an already allocated XMPPStringPrepFailedException.
|
||||
*
|
||||
* \param class_ The class of the object which caused the exception
|
||||
* \param connection The connection the string relates to
|
||||
|
@ -178,14 +178,14 @@
|
|||
}
|
||||
|
||||
#ifdef OF_HAVE_PROPERTIES
|
||||
/// The IDNA translation operation which failed
|
||||
/// \brief The IDNA translation operation which failed
|
||||
@property (readonly, assign) OFString *operation;
|
||||
/// The string that could not be translated
|
||||
/// \brief The string that could not be translated
|
||||
@property (readonly, assign) OFString *string;
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Creates a new XMPPIDNATranslationFailedException
|
||||
* \brief Creates a new XMPPIDNATranslationFailedException.
|
||||
*
|
||||
* \param class_ The class of the object which caused the exception
|
||||
* \param connection The connection the string relates to
|
||||
|
@ -199,7 +199,7 @@
|
|||
string: (OFString*)string;
|
||||
|
||||
/**
|
||||
* Initializes an already allocated XMPPIDNATranslationFailedException
|
||||
* \brief Initializes an already allocated XMPPIDNATranslationFailedException.
|
||||
*
|
||||
* \param class_ The class of the object which caused the exception
|
||||
* \param connection The connection the string relates to
|
||||
|
@ -227,12 +227,12 @@
|
|||
}
|
||||
|
||||
#ifdef OF_HAVE_PROPERTIES
|
||||
/// The reason the authentication failed
|
||||
/// \brief The reason the authentication failed
|
||||
@property (readonly, assign) OFString *reason;
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Creates a new XMPPAuthFailedException
|
||||
* \brief Creates a new XMPPAuthFailedException.
|
||||
*
|
||||
* \param class_ The class of the object which caused the exception
|
||||
* \param connection The connection that could not be authenticated
|
||||
|
@ -244,7 +244,7 @@
|
|||
reason: (OFString*)reason;
|
||||
|
||||
/**
|
||||
* Initializes an already allocated XMPPAuthFailedException
|
||||
* \brief Initializes an already allocated XMPPAuthFailedException.
|
||||
*
|
||||
* \param class_ The class of the object which caused the exception
|
||||
* \param connection The connection that could not be authenticated
|
||||
|
|
17
src/XMPPIQ.h
17
src/XMPPIQ.h
|
@ -28,7 +28,7 @@
|
|||
*/
|
||||
@interface XMPPIQ: XMPPStanza
|
||||
/**
|
||||
* Creates a new XMPPIQ with the specified type and id.
|
||||
* \brief Creates a new XMPPIQ 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
|
||||
|
@ -38,7 +38,8 @@
|
|||
ID: (OFString*)ID;
|
||||
|
||||
/**
|
||||
* Initializes an already allocated XMPPIQ with the specified type and id
|
||||
* \brief Initializes an already allocated XMPPIQ 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
|
||||
|
@ -48,17 +49,17 @@
|
|||
ID: (OFString*)ID;
|
||||
|
||||
/**
|
||||
* Generates a result IQ for the receiving object
|
||||
* \brief Generates a result IQ for the receiving object.
|
||||
*
|
||||
* \return A new autoreleased XMPPIQ
|
||||
*/
|
||||
- (XMPPIQ*)resultIQ;
|
||||
|
||||
/**
|
||||
* Generates a error IQ for the receiving object
|
||||
* \brief Generates an error IQ for the receiving object.
|
||||
*
|
||||
* \param type A error type as defined by RFC 6120
|
||||
* \param condition A error condition as defined by RFC 6120
|
||||
* \param type An error type as defined by RFC 6120
|
||||
* \param condition An error condition as defined by RFC 6120
|
||||
* \param text A descriptive text
|
||||
* \return A new autoreleased XMPPIQ
|
||||
*/
|
||||
|
@ -67,9 +68,9 @@
|
|||
text: (OFString*)text;
|
||||
|
||||
/**
|
||||
* Generates a error IQ for the receiving object
|
||||
* \brief Generates an error IQ for the receiving object.
|
||||
*
|
||||
* \param type A error type as defined by RFC 6120
|
||||
* \param type An error type as defined by RFC 6120
|
||||
* \param condition A defined conditions from RFC 6120
|
||||
* \return A new autoreleased XMPPIQ
|
||||
*/
|
||||
|
|
|
@ -36,23 +36,23 @@
|
|||
}
|
||||
|
||||
#ifdef OF_HAVE_PROPERTIES
|
||||
/// The JID's localpart
|
||||
/// \brief The JID's localpart
|
||||
@property (copy) OFString *node;
|
||||
/// The JID's domainpart
|
||||
/// \brief The JID's domainpart
|
||||
@property (copy) OFString *domain;
|
||||
/// The JID's resourcepart
|
||||
/// \brief The JID's resourcepart
|
||||
@property (copy) OFString *resource;
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Creates a new autoreleased XMPPJID.
|
||||
* \brief Creates a new autoreleased XMPPJID.
|
||||
*
|
||||
* \return A new autoreleased XMPPJID
|
||||
*/
|
||||
+ JID;
|
||||
|
||||
/**
|
||||
* Creates a new autoreleased XMPPJID from a string.
|
||||
* \brief Creates a new autoreleased XMPPJID from a string.
|
||||
*
|
||||
* \param str The string to parse into a JID object
|
||||
* \return A new autoreleased XMPPJID
|
||||
|
@ -60,7 +60,7 @@
|
|||
+ JIDWithString: (OFString*)str;
|
||||
|
||||
/**
|
||||
* Initializes an already allocated XMPPJID with a string.
|
||||
* \brief Initializes an already allocated XMPPJID with a string.
|
||||
*
|
||||
* \param str The string to parse into a JID object
|
||||
* \return A initialized XMPPJID
|
||||
|
@ -68,11 +68,15 @@
|
|||
- initWithString: (OFString*)str;
|
||||
|
||||
/**
|
||||
* \brief Returns the bare JID.
|
||||
*
|
||||
* \return An OFString containing the bare JID
|
||||
*/
|
||||
- (OFString*)bareJID;
|
||||
|
||||
/**
|
||||
* \brief Returns the full JID.
|
||||
*
|
||||
* \return An OFString containing the full JID
|
||||
*/
|
||||
- (OFString*)fullJID;
|
||||
|
|
|
@ -28,18 +28,19 @@
|
|||
*/
|
||||
@interface XMPPMessage: XMPPStanza
|
||||
#ifdef OF_HAVE_PROPERTIES
|
||||
/// \brief The text content of the body of the message
|
||||
@property (copy) OFString *body;
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Creates a new autoreleased XMPPMessage.
|
||||
* \brief Creates a new autoreleased XMPPMessage.
|
||||
*
|
||||
* \return A new autoreleased XMPPMessage
|
||||
*/
|
||||
+ message;
|
||||
|
||||
/**
|
||||
* Creates a new autoreleased XMPPMessage with the specified id.
|
||||
* \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
|
||||
|
@ -47,7 +48,7 @@
|
|||
+ messageWithID: (OFString*)ID;
|
||||
|
||||
/**
|
||||
* Creates a new autoreleased XMPPMessage with the specified type.
|
||||
* \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
|
||||
|
@ -55,7 +56,7 @@
|
|||
+ messageWithType: (OFString*)type;
|
||||
|
||||
/**
|
||||
* Creates a new autoreleased XMPPMessage with the specified type and id.
|
||||
* \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
|
||||
|
@ -65,14 +66,7 @@
|
|||
ID: (OFString*)ID;
|
||||
|
||||
/**
|
||||
* Initializes an already allocated XMPPMessage.
|
||||
*
|
||||
* \return A initialized XMPPMessage
|
||||
*/
|
||||
- init;
|
||||
|
||||
/**
|
||||
* Initializes an already allocated XMPPMessage with the specified id.
|
||||
* \brief Initializes an already allocated XMPPMessage with the specified ID.
|
||||
*
|
||||
* \param ID The value for the stanza's id attribute
|
||||
* \return A initialized XMPPMessage
|
||||
|
@ -80,7 +74,7 @@
|
|||
- initWithID: (OFString*)ID;
|
||||
|
||||
/**
|
||||
* Initializes an already allocated XMPPMessage with the specified type.
|
||||
* \brief Initializes an already allocated XMPPMessage with the specified type.
|
||||
*
|
||||
* \param type The value for the stanza's type attribute
|
||||
* \return A initialized XMPPMessage
|
||||
|
@ -88,7 +82,8 @@
|
|||
- initWithType: (OFString*)type;
|
||||
|
||||
/**
|
||||
* Initializes an already allocated XMPPMessage with the specified type and id.
|
||||
* \brief Initializes an already allocated 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
|
||||
|
@ -98,14 +93,14 @@
|
|||
ID: (OFString*)ID;
|
||||
|
||||
/**
|
||||
* Sets the text content of the body of the XMPPMessage.
|
||||
* \brief Sets the text content of the body of the XMPPMessage.
|
||||
*
|
||||
* \param body The text content of the body element or nil to remove the body
|
||||
*/
|
||||
- (void)setBody: (OFString*)body;
|
||||
|
||||
/**
|
||||
* Returns the text content of the body element of the XMPPMessage.
|
||||
* \brief Returns the text content of the body element of the XMPPMessage.
|
||||
*
|
||||
* \return The text content of the body element of the XMPPMessage.
|
||||
*/
|
||||
|
|
|
@ -35,21 +35,21 @@
|
|||
}
|
||||
|
||||
/**
|
||||
* Adds a delegate to the set of managed delegates
|
||||
* \brief Adds a delegate which should receive the broadcasts.
|
||||
*
|
||||
* \param delegate The delegate to add
|
||||
*/
|
||||
- (void)addDelegate: (id)delegate;
|
||||
|
||||
/**
|
||||
* Removes a delegate from the set of managed delegates
|
||||
* \brief Removes a delegate so it does not receive the broadcasts anymore.
|
||||
*
|
||||
* \param delegate The delegate to remove
|
||||
*/
|
||||
- (void)removeDelegate: (id)delegate;
|
||||
|
||||
/**
|
||||
* Broadcasts a selector with one object to all managed delegates
|
||||
* \brief Broadcasts a selector with an object to all registered delegates.
|
||||
*
|
||||
* \param selector The selector to broadcast
|
||||
* \param object The object to broadcast
|
||||
|
@ -58,7 +58,7 @@
|
|||
withObject: (id)object;
|
||||
|
||||
/**
|
||||
* Broadcasts a selector with two objects to all managed delegates
|
||||
* \brief Broadcasts a selector with two objects to all registered delegates.
|
||||
*
|
||||
* \param selector The selector to broadcast
|
||||
* \param object1 The first object to broadcast
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
*/
|
||||
@interface XMPPPLAINAuth: XMPPAuthenticator
|
||||
/**
|
||||
* Creates a new autoreleased XMPPPLAINAuth with an authcid and password.
|
||||
* \brief Creates a new autoreleased XMPPPLAINAuth with an authcid and password.
|
||||
*
|
||||
* \param authcid The authcid to authenticate with
|
||||
* \param password The password to authenticate with
|
||||
|
@ -38,8 +38,8 @@
|
|||
password: (OFString*)password;
|
||||
|
||||
/**
|
||||
* Creates a new autoreleased XMPPPLAINAuth with an authzid,
|
||||
* authcid and password.
|
||||
* \brief Creates a new autoreleased XMPPPLAINAuth with an authzid, authcid and
|
||||
* password.
|
||||
*
|
||||
* \param authzid The authzid to get authorization for
|
||||
* \param authcid The authcid to authenticate with
|
||||
|
|
|
@ -28,14 +28,14 @@
|
|||
*/
|
||||
@interface XMPPPresence: XMPPStanza
|
||||
/**
|
||||
* Creates a new autoreleased XMPPPresence.
|
||||
* \brief Creates a new autoreleased XMPPPresence.
|
||||
*
|
||||
* \return A new autoreleased XMPPPresence
|
||||
*/
|
||||
+ presence;
|
||||
|
||||
/**
|
||||
* Creates a new autoreleased XMPPPresence with the specified id.
|
||||
* \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
|
||||
|
@ -43,7 +43,7 @@
|
|||
+ presenceWithID: (OFString*)ID;
|
||||
|
||||
/**
|
||||
* Creates a new autoreleased XMPPPresence with the specified type.
|
||||
* \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
|
||||
|
@ -51,7 +51,8 @@
|
|||
+ presenceWithType: (OFString*)type;
|
||||
|
||||
/**
|
||||
* Creates a new autoreleased XMPPPresence with the specified type and id.
|
||||
* \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
|
||||
|
@ -61,14 +62,7 @@
|
|||
ID: (OFString*)ID;
|
||||
|
||||
/**
|
||||
* Initializes an already allocated XMPPPresence.
|
||||
*
|
||||
* \return A initialized XMPPPresence
|
||||
*/
|
||||
- init;
|
||||
|
||||
/**
|
||||
* Initializes an already allocated XMPPPresence with the specified id.
|
||||
* \brief Initializes an already allocated XMPPPresence with the specified ID.
|
||||
*
|
||||
* \param ID The value for the stanza's id attribute
|
||||
* \return A initialized XMPPPresence
|
||||
|
@ -76,7 +70,7 @@
|
|||
- initWithID: (OFString*)ID;
|
||||
|
||||
/**
|
||||
* Initializes an already allocated XMPPPresence with the specified type.
|
||||
* \brief Initializes an already allocated XMPPPresence with the specified type.
|
||||
*
|
||||
* \param type The value for the stanza's type attribute
|
||||
* \return A initialized XMPPPresence
|
||||
|
@ -84,7 +78,8 @@
|
|||
- initWithType: (OFString*)type;
|
||||
|
||||
/**
|
||||
* Initializes an already allocated XMPPPresence with the specified type and id.
|
||||
* \brief Initializes an already allocated 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
|
||||
|
@ -94,21 +89,21 @@
|
|||
ID: (OFString*)ID;
|
||||
|
||||
/**
|
||||
* Adds a show element to the presence stanza.
|
||||
* \brief Adds a show element to the presence stanza.
|
||||
*
|
||||
* \param show The text content of the show element
|
||||
*/
|
||||
- (void)addShow: (OFString*)show;
|
||||
|
||||
/**
|
||||
* Adds a status element to the presence stanza.
|
||||
* \brief Adds a status element to the presence stanza.
|
||||
*
|
||||
* \param status The text content of the status element
|
||||
*/
|
||||
- (void)addStatus: (OFString*)status;
|
||||
|
||||
/**
|
||||
* Adds a priority element to the presence stanza.
|
||||
* \brief Adds a priority element to the presence stanza.
|
||||
*
|
||||
* \param priority The text content of the priority element
|
||||
*/
|
||||
|
|
|
@ -42,15 +42,15 @@
|
|||
@optional
|
||||
#endif
|
||||
/**
|
||||
* This callback is called after the roster was received (as a result of
|
||||
* calling -requestRoster.
|
||||
* \brief This callback is called after the roster was received (as a result of
|
||||
* calling -requestRoster).
|
||||
*
|
||||
* \param roster The roster that was received
|
||||
*/
|
||||
- (void)rosterWasReceived: (XMPPRoster*)roster;
|
||||
|
||||
/**
|
||||
* This callback is called whenever a roster push was received.
|
||||
* \brief This callback is called whenever a roster push was received.
|
||||
*
|
||||
* \param roster The roster that was updated by the roster push
|
||||
* \param rosterItem The roster item received in the push
|
||||
|
@ -60,7 +60,7 @@
|
|||
@end
|
||||
|
||||
/**
|
||||
* \brief A class implementing roster related functionality
|
||||
* \brief A class implementing roster related functionality.
|
||||
*/
|
||||
@interface XMPPRoster: OFObject
|
||||
#ifdef OF_HAVE_OPTIONAL_PROTOCOLS
|
||||
|
@ -75,7 +75,7 @@
|
|||
}
|
||||
|
||||
/**
|
||||
* Initializes an already allocated XMPPRoster
|
||||
* \brief Initializes an already allocated XMPPRoster.
|
||||
*
|
||||
* \param connection The connection roster related stanzas
|
||||
* are send and received over
|
||||
|
@ -84,47 +84,48 @@
|
|||
- initWithConnection: (XMPPConnection*)connection;
|
||||
|
||||
/**
|
||||
* Returns the list of contacts as a OFDictionary with the bare JID as key
|
||||
* \brief Returns the list of contacts as an OFDictionary with the bare JID as
|
||||
* a string as key.
|
||||
*
|
||||
* \return An autoreleased copy of the dictionary containing the roster items
|
||||
*/
|
||||
- (OFDictionary*)rosterItems;
|
||||
|
||||
/**
|
||||
* Requests the roster from the server
|
||||
* \brief Requests the roster from the server.
|
||||
*/
|
||||
- (void)requestRoster;
|
||||
|
||||
/**
|
||||
* Adds a new contact to the roster
|
||||
* \brief Adds a new contact to the roster.
|
||||
*
|
||||
* \param rosterItem The roster item to add to the roster
|
||||
*/
|
||||
- (void)addRosterItem: (XMPPRosterItem*)rosterItem;
|
||||
|
||||
/**
|
||||
* Updates an already existing contact in the roster
|
||||
* \brief Updates an already existing contact in the roster.
|
||||
*
|
||||
* \param rosterItem The roster item to update
|
||||
*/
|
||||
- (void)updateRosterItem: (XMPPRosterItem*)rosterItem;
|
||||
|
||||
/**
|
||||
* Delete a contact from the roster
|
||||
* \brief Delete a contact from the roster.
|
||||
*
|
||||
* \param rosterItem The roster item to delete
|
||||
*/
|
||||
- (void)deleteRosterItem: (XMPPRosterItem*)rosterItem;
|
||||
|
||||
/**
|
||||
* Adds the specified delegate
|
||||
* \brief Adds the specified delegate.
|
||||
*
|
||||
* \param delegate The delegate to add
|
||||
*/
|
||||
- (void)addDelegate: (id <XMPPRosterDelegate>)delegate;
|
||||
|
||||
/**
|
||||
* Removes the specified delegate
|
||||
* \brief Removes the specified delegate.
|
||||
*
|
||||
* \param delegate The delegate to remove
|
||||
*/
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2011, Jonathan Schleifer <js@webkeks.org>
|
||||
* Copyright (c) 2011, 2012, Jonathan Schleifer <js@webkeks.org>
|
||||
*
|
||||
* https://webkeks.org/hg/objxmpp/
|
||||
*
|
||||
|
@ -38,13 +38,23 @@
|
|||
}
|
||||
|
||||
#ifdef OF_HAVE_PROPERTIES
|
||||
/// \brief The JID of the roster item
|
||||
@property (copy) XMPPJID *JID;
|
||||
/// \brief The name of the roster item to show to the user
|
||||
@property (copy) OFString *name;
|
||||
/// \brief The subscription for the roster item
|
||||
@property (copy) OFString *subscription;
|
||||
/// \brief An array of groups in which the roster item is
|
||||
@property (copy) OFArray *groups;
|
||||
#endif
|
||||
|
||||
/**
|
||||
* \brief Creates a new autoreleased roster item.
|
||||
*
|
||||
* \return A new autoreleased roster item.
|
||||
*/
|
||||
+ rosterItem;
|
||||
|
||||
- (void)setJID: (XMPPJID*)JID;
|
||||
- (XMPPJID*)JID;
|
||||
- (void)setName: (OFString*)name;
|
||||
|
|
|
@ -42,7 +42,7 @@
|
|||
}
|
||||
|
||||
/**
|
||||
* Creates a new autoreleased XMPPSCRAMAuth with an authcid and password.
|
||||
* \brief Creates a new autoreleased XMPPSCRAMAuth with an authcid and password.
|
||||
*
|
||||
* \param authcid The authcid to authenticate with
|
||||
* \param password The password to authenticate with
|
||||
|
@ -58,8 +58,8 @@
|
|||
plusAvailable: (BOOL)plusAvailable;
|
||||
|
||||
/**
|
||||
* Creates a new autoreleased XMPPSCRAMAuth with an authzid,
|
||||
* authcid and password.
|
||||
* \brief Creates a new autoreleased XMPPSCRAMAuth with an authzid, authcid and
|
||||
* password.
|
||||
*
|
||||
* \param authzid The authzid to get authorization for
|
||||
* \param authcid The authcid to authenticate with
|
||||
|
@ -77,7 +77,8 @@
|
|||
plusAvailable: (BOOL)plusAvailable;
|
||||
|
||||
/**
|
||||
* Initializes an already allocated XMPPSCRAMAuth with an authcid and password.
|
||||
* \brief Initializes an already allocated XMPPSCRAMAuth with an authcid and
|
||||
* password.
|
||||
*
|
||||
* \param authcid The authcid to authenticate with
|
||||
* \param password The password to authenticate with
|
||||
|
@ -93,8 +94,8 @@
|
|||
plusAvailable: (BOOL)plusAvailable;
|
||||
|
||||
/**
|
||||
* Initializes an already allocated XMPPSCRAMAuth with a authzid,
|
||||
* authcid and password.
|
||||
* \brief Initializes an already allocated XMPPSCRAMAuth with a authzid,
|
||||
* authcid and password.
|
||||
*
|
||||
* \param authzid The authzid to get authorization for
|
||||
* \param authcid The authcid to authenticate with
|
||||
|
|
|
@ -39,18 +39,18 @@
|
|||
}
|
||||
|
||||
#ifdef OF_HAVE_PROPERTIES
|
||||
/// The value of the stanza's from attribute
|
||||
/// \brief The value of the stanza's from attribute
|
||||
@property (copy) XMPPJID *from;
|
||||
/// The value of the stanza's to attribute
|
||||
/// \brief The value of the stanza's to attribute
|
||||
@property (copy) XMPPJID *to;
|
||||
/// The value of the stanza's type attribute
|
||||
/// \brief The value of the stanza's type attribute
|
||||
@property (copy) OFString *type;
|
||||
/// The value of the stanza's id attribute
|
||||
/// \brief The value of the stanza's id attribute
|
||||
@property (copy) OFString *ID;
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Creates a new autoreleased XMPPStanza with the specified name.
|
||||
* \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
|
||||
|
@ -58,7 +58,8 @@
|
|||
+ stanzaWithName: (OFString*)name;
|
||||
|
||||
/**
|
||||
* Creates a new autoreleased XMPPStanza with the specified name and type.
|
||||
* \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
|
||||
|
@ -68,7 +69,7 @@
|
|||
type: (OFString*)type;
|
||||
|
||||
/**
|
||||
* Creates a new autoreleased XMPPStanza with the specified name and id.
|
||||
* \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
|
||||
|
@ -78,7 +79,8 @@
|
|||
ID: (OFString*)ID;
|
||||
|
||||
/**
|
||||
* Creates a new autoreleased XMPPStanza with the specified name, type and id.
|
||||
* \brief Creates a new autoreleased XMPPStanza with the specified name, type
|
||||
* and ID.
|
||||
*
|
||||
* \param name The stanza's name (one of iq, message or presence)
|
||||
* \param type The value for the stanza's type attribute
|
||||
|
@ -90,7 +92,7 @@
|
|||
ID: (OFString*)ID;
|
||||
|
||||
/**
|
||||
* Creates a new autoreleased XMPPStanza from an OFXMLElement.
|
||||
* \brief Creates a new autoreleased XMPPStanza from an OFXMLElement.
|
||||
*
|
||||
* \param element The element to base the XMPPStanza on
|
||||
* \return A new autoreleased XMPPStanza
|
||||
|
@ -98,7 +100,7 @@
|
|||
+ stanzaWithElement: (OFXMLElement*)element;
|
||||
|
||||
/**
|
||||
* Initializes an already allocated XMPPStanza with the specified name.
|
||||
* \brief Initializes an already allocated XMPPStanza with the specified name.
|
||||
*
|
||||
* \param name The stanza's name (one of iq, message or presence)
|
||||
* \return A initialized XMPPStanza
|
||||
|
@ -106,7 +108,8 @@
|
|||
- initWithName: (OFString*)name;
|
||||
|
||||
/**
|
||||
* Initializes an already allocated XMPPStanza with the specified name and type.
|
||||
* \brief Initializes an already allocated 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
|
||||
|
@ -116,7 +119,8 @@
|
|||
type: (OFString*)type;
|
||||
|
||||
/**
|
||||
* Initializes an already allocated XMPPStanza with the specified name and id.
|
||||
* \brief Initializes an already allocated 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
|
||||
|
@ -126,8 +130,8 @@
|
|||
ID: (OFString*)ID;
|
||||
|
||||
/**
|
||||
* Initializes an already allocated XMPPStanza with the specified name, type
|
||||
* and id.
|
||||
* \brief Initializes an already allocated XMPPStanza with the specified name,
|
||||
* type and ID.
|
||||
*
|
||||
* \param name The stanza's name (one of iq, message or presence)
|
||||
* \param type The value for the stanza's type attribute
|
||||
|
@ -139,7 +143,7 @@
|
|||
ID: (OFString*)ID;
|
||||
|
||||
/**
|
||||
* Initializes an already allocated XMPPStanza based on a OFXMLElement
|
||||
* \brief Initializes an already allocated XMPPStanza based on a OFXMLElement.
|
||||
*
|
||||
* \param element The element to base the XMPPStanza on
|
||||
* \return A initialized XMPPStanza
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue