From b64cfdc786f5a2bb707f3068bfca0fb3bf09ee68 Mon Sep 17 00:00:00 2001 From: Aleksander Morgado Date: Thu, 9 Feb 2017 15:02:01 +0100 Subject: docs: update QmiMessageContext documentation --- src/libqmi-glib/qmi-message-context.c | 22 ---------- src/libqmi-glib/qmi-message-context.h | 80 ++++++++++++++++++++++++++++++----- 2 files changed, 70 insertions(+), 32 deletions(-) diff --git a/src/libqmi-glib/qmi-message-context.c b/src/libqmi-glib/qmi-message-context.c index 96f7a67..7461969 100644 --- a/src/libqmi-glib/qmi-message-context.c +++ b/src/libqmi-glib/qmi-message-context.c @@ -35,13 +35,6 @@ struct _QmiMessageContext { guint16 vendor_id; }; -/** - * qmi_message_context_new: - * - * Create a new empty #QmiMessageContext. - * - * Returns: (transfer full): a newly created #QmiMessageContext. The returned value should be freed with qmi_message_context_unref(). - */ QmiMessageContext * qmi_message_context_new (void) { @@ -69,14 +62,6 @@ qmi_message_context_get_type (void) return g_define_type_id__volatile; } -/** - * qmi_message_context_ref: - * @self: a #QmiMessageContext. - * - * Atomically increments the reference count of @self by one. - * - * Returns: (transfer full) the new reference to @self. - */ QmiMessageContext * qmi_message_context_ref (QmiMessageContext *self) { @@ -86,13 +71,6 @@ qmi_message_context_ref (QmiMessageContext *self) return self; } -/** - * qmi_message_context_unref: - * @self: a #QmiMessageContext. - * - * Atomically decrements the reference count of @self by one. - * If the reference count drops to 0, @self is completely disposed. - */ void qmi_message_context_unref (QmiMessageContext *self) { diff --git a/src/libqmi-glib/qmi-message-context.h b/src/libqmi-glib/qmi-message-context.h index 2dcf2ec..1c5d2e3 100644 --- a/src/libqmi-glib/qmi-message-context.h +++ b/src/libqmi-glib/qmi-message-context.h @@ -34,16 +34,24 @@ G_BEGIN_DECLS /** - * QmiMessageContext: - * - * An opaque type representing a QMI message context. + * SECTION:qmi-message-context + * @title: QmiMessageContext + * @short_description: the QMI message context * - * The context defines non-standard features of the QMI message associated with - * it, which may be required for a correct processing. + * The #QmiMessageContext defines non-standard features of the QMI message + * associated with it, which may be required for a correct processing. * * When a context is given when sending a request with qmi_device_command_full(), * the same context will then be applied for the associated response. */ + +/** + * QmiMessageContext: + * + * An opaque type representing a QMI message context. + * + * Since: 1.18 + */ typedef struct _QmiMessageContext QmiMessageContext; GType qmi_message_context_get_type (void); @@ -51,9 +59,39 @@ GType qmi_message_context_get_type (void); /*****************************************************************************/ /* Basic context */ -QmiMessageContext *qmi_message_context_new (void); -QmiMessageContext *qmi_message_context_ref (QmiMessageContext *self); -void qmi_message_context_unref (QmiMessageContext *self); +/** + * qmi_message_context_new: + * + * Create a new empty #QmiMessageContext. + * + * Returns: (transfer full): a newly created #QmiMessageContext. The returned value should be freed with qmi_message_context_unref(). + * + * Since: 1.18 + */ +QmiMessageContext *qmi_message_context_new (void); + +/** + * qmi_message_context_ref: + * @self: a #QmiMessageContext. + * + * Atomically increments the reference count of @self by one. + * + * Returns: (transfer full) the new reference to @self. + * + * Since: 1.18 + */ +QmiMessageContext *qmi_message_context_ref (QmiMessageContext *self); + +/** + * qmi_message_context_unref: + * @self: a #QmiMessageContext. + * + * Atomically decrements the reference count of @self by one. + * If the reference count drops to 0, @self is completely disposed. + * + * Since: 1.18 + */ +void qmi_message_context_unref (QmiMessageContext *self); /*****************************************************************************/ /* Vendor ID */ @@ -62,11 +100,33 @@ void qmi_message_context_unref (QmiMessageContext *self); * QMI_MESSAGE_VENDOR_GENERIC: * * Generic vendor id (0x0000). + * + * Since: 1.18 */ #define QMI_MESSAGE_VENDOR_GENERIC 0x0000 -void qmi_message_context_set_vendor_id (QmiMessageContext *self, - guint16 vendor_id); +/** + * qmi_message_context_set_vendor_id: + * @self: a #QmiMessageContext. + * @vendor_id: the vendor ID. + * + * Sets the vendor ID associated to the message. + * + * Since: 1.18 + */ +void qmi_message_context_set_vendor_id (QmiMessageContext *self, + guint16 vendor_id); + +/** + * qmi_message_context_get_vendor_id: + * @self: a #QmiMessageContext. + * + * Gets the vendor ID associated to the message. + * + * Returns: the vendor ID. + * + * Since: 1.18 + */ guint16 qmi_message_context_get_vendor_id (QmiMessageContext *self); G_END_DECLS -- cgit v1.1