diff -r cd97a18dd0b9 -r efc92c939fef jingle/jingle.h --- a/jingle/jingle.h Tue Aug 17 23:14:52 2010 +0200 +++ b/jingle/jingle.h Tue Aug 17 23:30:53 2010 +0200 @@ -1,23 +1,25 @@ +/** + * @file jingle.h + * @brief jingle.c header file + * @author Nicolas Cornu + * @version 0.1 + */ + #ifndef __JINGLE_H__ #define __JINGLE_H__ 1 -/** - * \file jingle.h - * \brief - * \author Nicolas Cornu - * \version 0.1 - */ - #include #include +/** Jingle namespace */ #define NS_JINGLE "urn:xmpp:jingle:1" +/** Jingle Errors namespace */ #define NS_JINGLE_ERRORS "urn:xmpp:jingle:errors:1" /** - * \enum JingleAction - * \brief Jingle actions constants + * @enum JingleAction + * @brief Jingle actions constants */ typedef enum { JINGLE_UNKNOWN_ACTION, @@ -50,48 +52,77 @@ JINGLE_SENDERS_RESPONDER, } JingleSenders; +/** + * @struct JingleNode + * @brief Represent an incoming jingle IQ + * + * This struct is used to represent an incoming jingle IQ. + * It should be destroyed as soon as it is not needed using #jingle_free_jinglenode + */ typedef struct { - /* pointer to the original LmMessage */ + /** + * @brief Pointer to the original LmMessage + */ LmMessage *message; - /* pointer to the element */ + /** + * @brief Pointer to the element + */ LmMessageNode *node; - /* action attribute */ + /** + * @brief Jingle action of the incoming IQ + */ JingleAction action; - /* full JID of the entity that has initiated the session flow. - * may be different from the 'from' address on the IQ-set of the + /** + * @brief Full JID of the entity that has initiated the session flow + * + * May be different from the 'from' address on the IQ-set of the * session-initiate message. - * recommended for session-initiate, not recommended otherwise. */ + * recommended for session-initiate, not recommended otherwise. + */ const gchar *initiator; - /* full JID of the entity that has replied to the initation. - * can be different from the 'to' address on the IQ-set. - * recommended for session-accept, not recommended otherwise. */ + /** + * @brief Full JID of the entity that has replied to the initation. + * + * Can be different from the 'to' address on the IQ-set. + * recommended for session-accept, not recommended otherwise. + */ const gchar *responder; - /* Random session identifier generated by the initator. */ + /** + * @brief Random session identifier generated by the initator + */ const gchar *sid; - /* Linked list of JingleContent. */ + /** + * @brief Linked list of JingleContent. + */ GSList *content; } JingleNode; +/** + * @struct JingleContent + * @brief Struct used to represent a element of an incoming Jingle IQ + */ typedef struct { /** - * pointer to the element + * @brief pointer to the element */ LmMessageNode *node; - /** which party originally generated the content type. + /** + * which party originally generated the content type. * the defined values are "initiator" and "responder" * (where the default is "initiator"). required. */ JingleCreator creator; - /** how the content definition is to be interpreted by the recipient. + /** + * how the content definition is to be interpreted by the recipient. * optional, the default value is "session". */ const gchar *disposition; // optional, default=session @@ -125,6 +156,12 @@ LmMessageNode *transport; } JingleContent; +/** + * @struct JingleActionList + * + * Represent a jingle action and the "handler" + * (defined in action-handlers.c) for that action. + */ struct JingleActionList { const gchar *name; void (*handler)(JingleNode *); @@ -155,7 +192,7 @@ guint timeout; /** - * \private + * @private * * date at which the handler was inserted using * jingle_new_ack_handler @@ -163,7 +200,7 @@ time_t _inserted; /** - * \private + * @private * * a pointer to the LmMessageHandler created * using jingle_new_ack_handler