Documentation improvements.

This commit is contained in:
Jonathan Schleifer 2012-02-03 16:12:04 +01:00
parent ed82ae1799
commit 0da29ac529
14 changed files with 153 additions and 129 deletions

View file

@ -35,17 +35,17 @@
} }
#ifdef OF_HAVE_PROPERTIES #ifdef OF_HAVE_PROPERTIES
/// The authzid to get authorization for /// \brief The authzid to get authorization for
@property (copy) OFString *authzid; @property (copy) OFString *authzid;
/// The authcid to authenticate with /// \brief The authcid to authenticate with
@property (copy) OFString *authcid; @property (copy) OFString *authcid;
/// The password to authenticate with /// \brief The password to authenticate with
@property (copy) OFString *password; @property (copy) OFString *password;
#endif #endif
/** /**
* Initializes an already allocated XMPPAuthenticator with an authcid * \brief Initializes an already allocated XMPPAuthenticator with an authcid
* and password. * and password.
* *
* \param authcid The authcid to authenticate with * \param authcid The authcid to authenticate with
* \param password The password to authenticate with * \param password The password to authenticate with
@ -55,8 +55,8 @@
password: (OFString*)password; password: (OFString*)password;
/** /**
* Initializes an already allocated XMPPSCRAMAuthenticator with an authzid, * \brief Initializes an already allocated XMPPSCRAMAuthenticator with an
* authcid and password. * authzid, authcid and password.
* *
* \param authzid The authzid to get authorization for * \param authzid The authzid to get authorization for
* \param authcid The authcid to authenticate with * \param authcid The authcid to authenticate with
@ -68,11 +68,15 @@
password: (OFString*)password; 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; - (OFDataArray*)initialMessage;
/** /**
* \brief Continue authentication with the specified data.
*
* \param data The continuation data send by the server * \param data The continuation data send by the server
* \return The appropriate response if the data was a challenge, nil otherwise * \return The appropriate response if the data was a challenge, nil otherwise
*/ */

View file

@ -170,47 +170,50 @@
#endif #endif
/** /**
* \brief Creates a new autoreleased XMPPConnection.
*
* \return A new autoreleased XMPPConnection * \return A new autoreleased XMPPConnection
*/ */
+ connection; + connection;
/** /**
* Adds the specified delegate. * \brief Adds the specified delegate.
* *
* \param delegate The delegate to add * \param delegate The delegate to add
*/ */
- (void)addDelegate: (id <XMPPConnectionDelegate>)delegate; - (void)addDelegate: (id <XMPPConnectionDelegate>)delegate;
/** /**
* Removes the specified delegate. * \brief Removes the specified delegate.
* *
* \param delegate The delegate to remove * \param delegate The delegate to remove
*/ */
- (void)removeDelegate: (id <XMPPConnectionDelegate>)delegate; - (void)removeDelegate: (id <XMPPConnectionDelegate>)delegate;
/** /**
* Connects to the XMPP service. * \brief Connects to the XMPP service.
*/ */
- (void)connect; - (void)connect;
/** /**
* Closes the stream to the XMPP service * \brief Closes the stream to the XMPP service
*/ */
- (void)close; - (void)close;
/** /**
* Checks the certificate presented by the server. * \brief Checks the certificate presented by the server.
* Throws SSLInvalidCertificateException on failure. *
* \throw SSLInvalidCertificateException Thrown if the certificate is invalid
*/ */
- (void)checkCertificate; - (void)checkCertificate;
/** /**
* Starts a loop handling incomming data. * \brief Starts a loop handling incomming data.
*/ */
- (void)handleConnection; - (void)handleConnection;
/** /**
* Parses the specified buffer. * \brief Parses the specified buffer.
* *
* This is useful for handling multiple connections at once. * This is useful for handling multiple connections at once.
* *
@ -222,36 +225,42 @@
withLength: (size_t)length; withLength: (size_t)length;
/** /**
* \brief Returns the socket used by the XMPPConnection.
*
* \return The socket used by the XMPPConnection * \return The socket used by the XMPPConnection
*/ */
- (OFTCPSocket*)socket; - (OFTCPSocket*)socket;
/** /**
* \brief Returns whether encryption is encrypted.
*
* \return Whether encryption is encrypted * \return Whether encryption is encrypted
*/ */
- (BOOL)encryptionRequired; - (BOOL)encryptionRequired;
/** /**
* Sets whether encryption is required. * \brief Sets whether encryption is required.
* *
* \param required Whether encryption is required * \param required Whether encryption is required
*/ */
- (void)setEncryptionRequired: (BOOL)required; - (void)setEncryptionRequired: (BOOL)required;
/** /**
* \brief Returns whether the connection is encrypted.
*
* \return Whether the connection is encrypted * \return Whether the connection is encrypted
*/ */
- (BOOL)encrypted; - (BOOL)encrypted;
/** /**
* Sends an OFXMLElement, usually an XMPPStanza. * \brief Sends an OFXMLElement, usually an XMPPStanza.
* *
* \param element The element to send * \param element The element to send
*/ */
- (void)sendStanza: (OFXMLElement*)element; - (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 object The object that contains the callback method
* \param selector The selector of the callback method, * \param selector The selector of the callback method,
@ -263,7 +272,7 @@
#ifdef OF_HAVE_BLOCKS #ifdef OF_HAVE_BLOCKS
/** /**
* Sends an XMPPIQ, registering a callback block * \brief Sends an XMPPIQ, registering a callback block.
* *
* \param callback The callback block * \param callback The callback block
*/ */
@ -272,7 +281,7 @@
#endif #endif
/** /**
* Generates a new, unique stanza ID. * \brief Generates a new, unique stanza ID.
* *
* \return A new, generated, unique stanza ID. * \return A new, generated, unique stanza ID.
*/ */

View file

@ -28,14 +28,14 @@
*/ */
@interface XMPPEXTERNALAuth: XMPPAuthenticator @interface XMPPEXTERNALAuth: XMPPAuthenticator
/** /**
* Creates a new autoreleased XMPPEXTERNALAuth. * \brief Creates a new autoreleased XMPPEXTERNALAuth.
* *
* \return A new autoreleased XMPPEXTERNALAuth * \return A new autoreleased XMPPEXTERNALAuth
*/ */
+ EXTERNALAuth; + 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 * \param authzid The authzid to get authorization for
* \return A new autoreleased XMPPEXTERNALAuth * \return A new autoreleased XMPPEXTERNALAuth

View file

@ -36,12 +36,12 @@
} }
#ifdef OF_HAVE_PROPERTIES #ifdef OF_HAVE_PROPERTIES
/// The connection the exception relates to /// \brief The connection the exception relates to
@property (readonly, assign) XMPPConnection *connection; @property (readonly, assign) XMPPConnection *connection;
#endif #endif
/** /**
* Creates a new XMPPException * \brief Creates a new XMPPException.
* *
* \param class_ The class of the object which caused the exception * \param class_ The class of the object which caused the exception
* \param connection The connection that received the data responsible * \param connection The connection that received the data responsible
@ -52,7 +52,7 @@
connection: (XMPPConnection*)connection; 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 class_ The class of the object which caused the exception
* \param connection The connection that received the data responsible * \param connection The connection that received the data responsible
@ -77,14 +77,14 @@
} }
#ifdef OF_HAVE_PROPERTIES #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; @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; @property (readonly, assign) OFString *reason;
#endif #endif
/** /**
* Creates a new XMPPStreamErrorException * \brief Creates a new XMPPStreamErrorException.
* *
* \param class_ The class of the object which caused the exception * \param class_ The class of the object which caused the exception
* \param connection The connection that received the stream error * \param connection The connection that received the stream error
@ -98,7 +98,7 @@
reason: (OFString*)reason; 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 class_ The class of the object which caused the exception
* \param connection The connection that received the stream error * \param connection The connection that received the stream error
@ -128,14 +128,14 @@
} }
#ifdef OF_HAVE_PROPERTIES #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; @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; @property (readonly, assign) OFString *string;
#endif #endif
/** /**
* Creates a new XMPPStringPrepFailedException * \brief Creates a new XMPPStringPrepFailedException.
* *
* \param class_ The class of the object which caused the exception * \param class_ The class of the object which caused the exception
* \param connection The connection the string relates to * \param connection The connection the string relates to
@ -149,7 +149,7 @@
string: (OFString*)string; 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 class_ The class of the object which caused the exception
* \param connection The connection the string relates to * \param connection The connection the string relates to
@ -178,14 +178,14 @@
} }
#ifdef OF_HAVE_PROPERTIES #ifdef OF_HAVE_PROPERTIES
/// The IDNA translation operation which failed /// \brief The IDNA translation operation which failed
@property (readonly, assign) OFString *operation; @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; @property (readonly, assign) OFString *string;
#endif #endif
/** /**
* Creates a new XMPPIDNATranslationFailedException * \brief Creates a new XMPPIDNATranslationFailedException.
* *
* \param class_ The class of the object which caused the exception * \param class_ The class of the object which caused the exception
* \param connection The connection the string relates to * \param connection The connection the string relates to
@ -199,7 +199,7 @@
string: (OFString*)string; 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 class_ The class of the object which caused the exception
* \param connection The connection the string relates to * \param connection The connection the string relates to
@ -227,12 +227,12 @@
} }
#ifdef OF_HAVE_PROPERTIES #ifdef OF_HAVE_PROPERTIES
/// The reason the authentication failed /// \brief The reason the authentication failed
@property (readonly, assign) OFString *reason; @property (readonly, assign) OFString *reason;
#endif #endif
/** /**
* Creates a new XMPPAuthFailedException * \brief Creates a new XMPPAuthFailedException.
* *
* \param class_ The class of the object which caused the exception * \param class_ The class of the object which caused the exception
* \param connection The connection that could not be authenticated * \param connection The connection that could not be authenticated
@ -244,7 +244,7 @@
reason: (OFString*)reason; 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 class_ The class of the object which caused the exception
* \param connection The connection that could not be authenticated * \param connection The connection that could not be authenticated

View file

@ -28,7 +28,7 @@
*/ */
@interface XMPPIQ: XMPPStanza @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 type The value for the stanza's type attribute
* \param ID The value for the stanza's id attribute * \param ID The value for the stanza's id attribute
@ -38,7 +38,8 @@
ID: (OFString*)ID; 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 type The value for the stanza's type attribute
* \param ID The value for the stanza's id attribute * \param ID The value for the stanza's id attribute
@ -48,17 +49,17 @@
ID: (OFString*)ID; 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 * \return A new autoreleased XMPPIQ
*/ */
- (XMPPIQ*)resultIQ; - (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 type An error type as defined by RFC 6120
* \param condition A error condition as defined by RFC 6120 * \param condition An error condition as defined by RFC 6120
* \param text A descriptive text * \param text A descriptive text
* \return A new autoreleased XMPPIQ * \return A new autoreleased XMPPIQ
*/ */
@ -67,9 +68,9 @@
text: (OFString*)text; 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 * \param condition A defined conditions from RFC 6120
* \return A new autoreleased XMPPIQ * \return A new autoreleased XMPPIQ
*/ */

View file

@ -36,23 +36,23 @@
} }
#ifdef OF_HAVE_PROPERTIES #ifdef OF_HAVE_PROPERTIES
/// The JID's localpart /// \brief The JID's localpart
@property (copy) OFString *node; @property (copy) OFString *node;
/// The JID's domainpart /// \brief The JID's domainpart
@property (copy) OFString *domain; @property (copy) OFString *domain;
/// The JID's resourcepart /// \brief The JID's resourcepart
@property (copy) OFString *resource; @property (copy) OFString *resource;
#endif #endif
/** /**
* Creates a new autoreleased XMPPJID. * \brief Creates a new autoreleased XMPPJID.
* *
* \return A new autoreleased XMPPJID * \return A new autoreleased XMPPJID
*/ */
+ JID; + 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 * \param str The string to parse into a JID object
* \return A new autoreleased XMPPJID * \return A new autoreleased XMPPJID
@ -60,7 +60,7 @@
+ JIDWithString: (OFString*)str; + 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 * \param str The string to parse into a JID object
* \return A initialized XMPPJID * \return A initialized XMPPJID
@ -68,11 +68,15 @@
- initWithString: (OFString*)str; - initWithString: (OFString*)str;
/** /**
* \brief Returns the bare JID.
*
* \return An OFString containing the bare JID * \return An OFString containing the bare JID
*/ */
- (OFString*)bareJID; - (OFString*)bareJID;
/** /**
* \brief Returns the full JID.
*
* \return An OFString containing the full JID * \return An OFString containing the full JID
*/ */
- (OFString*)fullJID; - (OFString*)fullJID;

View file

@ -28,18 +28,19 @@
*/ */
@interface XMPPMessage: XMPPStanza @interface XMPPMessage: XMPPStanza
#ifdef OF_HAVE_PROPERTIES #ifdef OF_HAVE_PROPERTIES
/// \brief The text content of the body of the message
@property (copy) OFString *body; @property (copy) OFString *body;
#endif #endif
/** /**
* Creates a new autoreleased XMPPMessage. * \brief Creates a new autoreleased XMPPMessage.
* *
* \return A new autoreleased XMPPMessage * \return A new autoreleased XMPPMessage
*/ */
+ message; + 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 * \param ID The value for the stanza's id attribute
* \return A new autoreleased XMPPMessage * \return A new autoreleased XMPPMessage
@ -47,7 +48,7 @@
+ messageWithID: (OFString*)ID; + 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 * \param type The value for the stanza's type attribute
* \return A new autoreleased XMPPMessage * \return A new autoreleased XMPPMessage
@ -55,7 +56,7 @@
+ messageWithType: (OFString*)type; + 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 type The value for the stanza's type attribute
* \param ID The value for the stanza's id attribute * \param ID The value for the stanza's id attribute
@ -65,14 +66,7 @@
ID: (OFString*)ID; ID: (OFString*)ID;
/** /**
* Initializes an already allocated XMPPMessage. * \brief Initializes an already allocated XMPPMessage with the specified ID.
*
* \return A initialized XMPPMessage
*/
- init;
/**
* Initializes an already allocated XMPPMessage with the specified id.
* *
* \param ID The value for the stanza's id attribute * \param ID The value for the stanza's id attribute
* \return A initialized XMPPMessage * \return A initialized XMPPMessage
@ -80,7 +74,7 @@
- initWithID: (OFString*)ID; - 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 * \param type The value for the stanza's type attribute
* \return A initialized XMPPMessage * \return A initialized XMPPMessage
@ -88,7 +82,8 @@
- initWithType: (OFString*)type; - 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 type The value for the stanza's type attribute
* \param ID The value for the stanza's id attribute * \param ID The value for the stanza's id attribute
@ -98,14 +93,14 @@
ID: (OFString*)ID; 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 * \param body The text content of the body element or nil to remove the body
*/ */
- (void)setBody: (OFString*)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. * \return The text content of the body element of the XMPPMessage.
*/ */

View file

@ -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 * \param delegate The delegate to add
*/ */
- (void)addDelegate: (id)delegate; - (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 * \param delegate The delegate to remove
*/ */
- (void)removeDelegate: (id)delegate; - (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 selector The selector to broadcast
* \param object The object to broadcast * \param object The object to broadcast
@ -58,7 +58,7 @@
withObject: (id)object; 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 selector The selector to broadcast
* \param object1 The first object to broadcast * \param object1 The first object to broadcast

View file

@ -28,7 +28,7 @@
*/ */
@interface XMPPPLAINAuth: XMPPAuthenticator @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 authcid The authcid to authenticate with
* \param password The password to authenticate with * \param password The password to authenticate with
@ -38,8 +38,8 @@
password: (OFString*)password; password: (OFString*)password;
/** /**
* Creates a new autoreleased XMPPPLAINAuth with an authzid, * \brief Creates a new autoreleased XMPPPLAINAuth with an authzid, authcid and
* authcid and password. * password.
* *
* \param authzid The authzid to get authorization for * \param authzid The authzid to get authorization for
* \param authcid The authcid to authenticate with * \param authcid The authcid to authenticate with

View file

@ -28,14 +28,14 @@
*/ */
@interface XMPPPresence: XMPPStanza @interface XMPPPresence: XMPPStanza
/** /**
* Creates a new autoreleased XMPPPresence. * \brief Creates a new autoreleased XMPPPresence.
* *
* \return A new autoreleased XMPPPresence * \return A new autoreleased XMPPPresence
*/ */
+ presence; + 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 * \param ID The value for the stanza's id attribute
* \return A new autoreleased XMPPPresence * \return A new autoreleased XMPPPresence
@ -43,7 +43,7 @@
+ presenceWithID: (OFString*)ID; + 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 * \param type The value for the stanza's type attribute
* \return A new autoreleased XMPPPresence * \return A new autoreleased XMPPPresence
@ -51,7 +51,8 @@
+ presenceWithType: (OFString*)type; + 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 type The value for the stanza's type attribute
* \param ID The value for the stanza's id attribute * \param ID The value for the stanza's id attribute
@ -61,14 +62,7 @@
ID: (OFString*)ID; ID: (OFString*)ID;
/** /**
* Initializes an already allocated XMPPPresence. * \brief Initializes an already allocated XMPPPresence with the specified ID.
*
* \return A initialized XMPPPresence
*/
- init;
/**
* Initializes an already allocated XMPPPresence with the specified id.
* *
* \param ID The value for the stanza's id attribute * \param ID The value for the stanza's id attribute
* \return A initialized XMPPPresence * \return A initialized XMPPPresence
@ -76,7 +70,7 @@
- initWithID: (OFString*)ID; - 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 * \param type The value for the stanza's type attribute
* \return A initialized XMPPPresence * \return A initialized XMPPPresence
@ -84,7 +78,8 @@
- initWithType: (OFString*)type; - 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 type The value for the stanza's type attribute
* \param ID The value for the stanza's id attribute * \param ID The value for the stanza's id attribute
@ -94,21 +89,21 @@
ID: (OFString*)ID; 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 * \param show The text content of the show element
*/ */
- (void)addShow: (OFString*)show; - (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 * \param status The text content of the status element
*/ */
- (void)addStatus: (OFString*)status; - (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 * \param priority The text content of the priority element
*/ */

View file

@ -42,15 +42,15 @@
@optional @optional
#endif #endif
/** /**
* This callback is called after the roster was received (as a result of * \brief This callback is called after the roster was received (as a result of
* calling -requestRoster. * calling -requestRoster).
* *
* \param roster The roster that was received * \param roster The roster that was received
*/ */
- (void)rosterWasReceived: (XMPPRoster*)roster; - (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 roster The roster that was updated by the roster push
* \param rosterItem The roster item received in the push * \param rosterItem The roster item received in the push
@ -60,7 +60,7 @@
@end @end
/** /**
* \brief A class implementing roster related functionality * \brief A class implementing roster related functionality.
*/ */
@interface XMPPRoster: OFObject @interface XMPPRoster: OFObject
#ifdef OF_HAVE_OPTIONAL_PROTOCOLS #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 * \param connection The connection roster related stanzas
* are send and received over * are send and received over
@ -84,47 +84,48 @@
- initWithConnection: (XMPPConnection*)connection; - 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 * \return An autoreleased copy of the dictionary containing the roster items
*/ */
- (OFDictionary*)rosterItems; - (OFDictionary*)rosterItems;
/** /**
* Requests the roster from the server * \brief Requests the roster from the server.
*/ */
- (void)requestRoster; - (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 * \param rosterItem The roster item to add to the roster
*/ */
- (void)addRosterItem: (XMPPRosterItem*)rosterItem; - (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 * \param rosterItem The roster item to update
*/ */
- (void)updateRosterItem: (XMPPRosterItem*)rosterItem; - (void)updateRosterItem: (XMPPRosterItem*)rosterItem;
/** /**
* Delete a contact from the roster * \brief Delete a contact from the roster.
* *
* \param rosterItem The roster item to delete * \param rosterItem The roster item to delete
*/ */
- (void)deleteRosterItem: (XMPPRosterItem*)rosterItem; - (void)deleteRosterItem: (XMPPRosterItem*)rosterItem;
/** /**
* Adds the specified delegate * \brief Adds the specified delegate.
* *
* \param delegate The delegate to add * \param delegate The delegate to add
*/ */
- (void)addDelegate: (id <XMPPRosterDelegate>)delegate; - (void)addDelegate: (id <XMPPRosterDelegate>)delegate;
/** /**
* Removes the specified delegate * \brief Removes the specified delegate.
* *
* \param delegate The delegate to remove * \param delegate The delegate to remove
*/ */

View file

@ -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/ * https://webkeks.org/hg/objxmpp/
* *
@ -38,13 +38,23 @@
} }
#ifdef OF_HAVE_PROPERTIES #ifdef OF_HAVE_PROPERTIES
/// \brief The JID of the roster item
@property (copy) XMPPJID *JID; @property (copy) XMPPJID *JID;
/// \brief The name of the roster item to show to the user
@property (copy) OFString *name; @property (copy) OFString *name;
/// \brief The subscription for the roster item
@property (copy) OFString *subscription; @property (copy) OFString *subscription;
/// \brief An array of groups in which the roster item is
@property (copy) OFArray *groups; @property (copy) OFArray *groups;
#endif #endif
/**
* \brief Creates a new autoreleased roster item.
*
* \return A new autoreleased roster item.
*/
+ rosterItem; + rosterItem;
- (void)setJID: (XMPPJID*)JID; - (void)setJID: (XMPPJID*)JID;
- (XMPPJID*)JID; - (XMPPJID*)JID;
- (void)setName: (OFString*)name; - (void)setName: (OFString*)name;

View file

@ -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 authcid The authcid to authenticate with
* \param password The password to authenticate with * \param password The password to authenticate with
@ -58,8 +58,8 @@
plusAvailable: (BOOL)plusAvailable; plusAvailable: (BOOL)plusAvailable;
/** /**
* Creates a new autoreleased XMPPSCRAMAuth with an authzid, * \brief Creates a new autoreleased XMPPSCRAMAuth with an authzid, authcid and
* authcid and password. * password.
* *
* \param authzid The authzid to get authorization for * \param authzid The authzid to get authorization for
* \param authcid The authcid to authenticate with * \param authcid The authcid to authenticate with
@ -77,7 +77,8 @@
plusAvailable: (BOOL)plusAvailable; 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 authcid The authcid to authenticate with
* \param password The password to authenticate with * \param password The password to authenticate with
@ -93,8 +94,8 @@
plusAvailable: (BOOL)plusAvailable; plusAvailable: (BOOL)plusAvailable;
/** /**
* Initializes an already allocated XMPPSCRAMAuth with a authzid, * \brief Initializes an already allocated XMPPSCRAMAuth with a authzid,
* authcid and password. * authcid and password.
* *
* \param authzid The authzid to get authorization for * \param authzid The authzid to get authorization for
* \param authcid The authcid to authenticate with * \param authcid The authcid to authenticate with

View file

@ -39,18 +39,18 @@
} }
#ifdef OF_HAVE_PROPERTIES #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; @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; @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; @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; @property (copy) OFString *ID;
#endif #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) * \param name The stanza's name (one of iq, message or presence)
* \return A new autoreleased XMPPStanza * \return A new autoreleased XMPPStanza
@ -58,7 +58,8 @@
+ stanzaWithName: (OFString*)name; + 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 name The stanza's name (one of iq, message or presence)
* \param type The value for the stanza's type attribute * \param type The value for the stanza's type attribute
@ -68,7 +69,7 @@
type: (OFString*)type; 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 name The stanza's name (one of iq, message or presence)
* \param ID The value for the stanza's id attribute * \param ID The value for the stanza's id attribute
@ -78,7 +79,8 @@
ID: (OFString*)ID; 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 name The stanza's name (one of iq, message or presence)
* \param type The value for the stanza's type attribute * \param type The value for the stanza's type attribute
@ -90,7 +92,7 @@
ID: (OFString*)ID; 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 * \param element The element to base the XMPPStanza on
* \return A new autoreleased XMPPStanza * \return A new autoreleased XMPPStanza
@ -98,7 +100,7 @@
+ stanzaWithElement: (OFXMLElement*)element; + 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) * \param name The stanza's name (one of iq, message or presence)
* \return A initialized XMPPStanza * \return A initialized XMPPStanza
@ -106,7 +108,8 @@
- initWithName: (OFString*)name; - 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 name The stanza's name (one of iq, message or presence)
* \param type The value for the stanza's type attribute * \param type The value for the stanza's type attribute
@ -116,7 +119,8 @@
type: (OFString*)type; 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 name The stanza's name (one of iq, message or presence)
* \param ID The value for the stanza's id attribute * \param ID The value for the stanza's id attribute
@ -126,8 +130,8 @@
ID: (OFString*)ID; ID: (OFString*)ID;
/** /**
* Initializes an already allocated XMPPStanza with the specified name, type * \brief Initializes an already allocated XMPPStanza with the specified name,
* and id. * type and ID.
* *
* \param name The stanza's name (one of iq, message or presence) * \param name The stanza's name (one of iq, message or presence)
* \param type The value for the stanza's type attribute * \param type The value for the stanza's type attribute
@ -139,7 +143,7 @@
ID: (OFString*)ID; 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 * \param element The element to base the XMPPStanza on
* \return A initialized XMPPStanza * \return A initialized XMPPStanza