aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAleksander Morgado <aleksander@aleksander.es>2017-02-09 15:02:01 +0100
committerAleksander Morgado <aleksander@aleksander.es>2017-02-10 14:08:38 +0100
commitb64cfdc786f5a2bb707f3068bfca0fb3bf09ee68 (patch)
tree570cb31ece60bcaa1295d552d3e82c8396b106b1
parent51792d744578912672928dd16af78ea7d90169bd (diff)
downloadexternal_libqmi-b64cfdc786f5a2bb707f3068bfca0fb3bf09ee68.zip
external_libqmi-b64cfdc786f5a2bb707f3068bfca0fb3bf09ee68.tar.gz
external_libqmi-b64cfdc786f5a2bb707f3068bfca0fb3bf09ee68.tar.bz2
docs: update QmiMessageContext documentation
-rw-r--r--src/libqmi-glib/qmi-message-context.c22
-rw-r--r--src/libqmi-glib/qmi-message-context.h80
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