aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAleksander Morgado <aleksander@aleksander.es>2017-02-10 13:38:40 +0100
committerAleksander Morgado <aleksander@aleksander.es>2017-02-10 18:57:06 +0100
commit88d359df18e1b40d9faa06aa28596b1cb5cd8c8e (patch)
tree4d7ebecc9bfab6609dff38d38b3386a2160b24ed
parent26ce3282b7b8d7c73bd5712e006cc0c4f0cfebc7 (diff)
downloadexternal_libqmi-88d359df18e1b40d9faa06aa28596b1cb5cd8c8e.zip
external_libqmi-88d359df18e1b40d9faa06aa28596b1cb5cd8c8e.tar.gz
external_libqmi-88d359df18e1b40d9faa06aa28596b1cb5cd8c8e.tar.bz2
docs: update QmiProxy documentation
-rw-r--r--src/libqmi-glib/qmi-proxy.c38
-rw-r--r--src/libqmi-glib/qmi-proxy.h62
2 files changed, 65 insertions, 35 deletions
diff --git a/src/libqmi-glib/qmi-proxy.c b/src/libqmi-glib/qmi-proxy.c
index 592ed8b..f86ff7b 100644
--- a/src/libqmi-glib/qmi-proxy.c
+++ b/src/libqmi-glib/qmi-proxy.c
@@ -39,21 +39,6 @@
#include "qmi-utils.h"
#include "qmi-proxy.h"
-/**
- * SECTION:qmi-proxy
- * @title: QmiProxy
- * @short_description: QMI proxy handling routines
- *
- * The #QmiProxy will setup an abstract socket listening on a predefined
- * address, and will take care of synchronizing the access to a set of shared
- * QMI ports.
- *
- * Multiple #QmiDevices may be connected to the #QmiProxy at any given time. The
- * #QmiProxy acts as a stateless proxy for non-CTL services (messages are
- * transferred unmodified), and as a stateful proxy for the CTL service (all
- * remote #QmiDevices will need to share the same CTL message sequence ID).
- */
-
#define BUFFER_SIZE 512
#define QMI_MESSAGE_OUTPUT_TLV_RESULT 0x02
@@ -87,14 +72,6 @@ struct _QmiProxyPrivate {
/*****************************************************************************/
-/**
- * qmi_proxy_get_n_clients:
- * @self: a #QmiProxy.
- *
- * Get the number of clients currently connected to the proxy.
- *
- * Returns: a #guint.
- */
guint
qmi_proxy_get_n_clients (QmiProxy *self)
{
@@ -810,14 +787,6 @@ setup_socket_service (QmiProxy *self,
/*****************************************************************************/
-/**
- * qmi_proxy_new:
- * @error: Return location for error or %NULL.
- *
- * Creates a #QmiProxy listening in the default proxy addess.
- *
- * Returns: A newly created #QmiProxy, or #NULL if @error is set.
- */
QmiProxy *
qmi_proxy_new (GError **error)
{
@@ -887,11 +856,14 @@ qmi_proxy_class_init (QmiProxyClass *proxy_class)
g_type_class_add_private (object_class, sizeof (QmiProxyPrivate));
- /* Virtual methods */
object_class->get_property = get_property;
object_class->dispose = dispose;
- /* Properties */
+ /**
+ * QmiProxy::qmi-proxy-n-clients
+ *
+ * Since: 1.8
+ */
properties[PROP_N_CLIENTS] =
g_param_spec_uint (QMI_PROXY_N_CLIENTS,
"Number of clients",
diff --git a/src/libqmi-glib/qmi-proxy.h b/src/libqmi-glib/qmi-proxy.h
index 8fa0664..a83d981 100644
--- a/src/libqmi-glib/qmi-proxy.h
+++ b/src/libqmi-glib/qmi-proxy.h
@@ -23,6 +23,21 @@
#ifndef QMI_PROXY_H
#define QMI_PROXY_H
+/**
+ * SECTION:qmi-proxy
+ * @title: QmiProxy
+ * @short_description: QMI proxy handling routines
+ *
+ * The #QmiProxy will setup an abstract socket listening on a predefined
+ * address, and will take care of synchronizing the access to a set of shared
+ * QMI ports.
+ *
+ * Multiple #QmiDevices may be connected to the #QmiProxy at any given time. The
+ * #QmiProxy acts as a stateless proxy for non-CTL services (messages are
+ * transferred unmodified), and as a stateful proxy for the CTL service (all
+ * remote #QmiDevices will need to share the same CTL message sequence ID).
+ */
+
#include <glib-object.h>
#include <gio/gio.h>
@@ -37,10 +52,32 @@ typedef struct _QmiProxy QmiProxy;
typedef struct _QmiProxyClass QmiProxyClass;
typedef struct _QmiProxyPrivate QmiProxyPrivate;
+/**
+ * QMI_PROXY_SOCKET_PATH:
+ *
+ * Symbol defining the default abstract socket name where the #QmiProxy will listen.
+ *
+ * Since: 1.8
+ */
#define QMI_PROXY_SOCKET_PATH "qmi-proxy"
+/**
+ * QMI_PROXY_N_ClIENTS:
+ *
+ * Symbol defining the #QmiProxy:qmi-proxy-n-clients property.
+ *
+ * Since: 1.8
+ */
#define QMI_PROXY_N_CLIENTS "qmi-proxy-n-clients"
+/**
+ * QmiProxy:
+ *
+ * The #QmiProxy structure contains private data and should only be accessed
+ * using the provided API.
+ *
+ * Since: 1.8
+ */
struct _QmiProxy {
GObject parent;
QmiProxyPrivate *priv;
@@ -52,7 +89,28 @@ struct _QmiProxyClass {
GType qmi_proxy_get_type (void);
-QmiProxy *qmi_proxy_new (GError **error);
-guint qmi_proxy_get_n_clients (QmiProxy *self);
+/**
+ * qmi_proxy_new:
+ * @error: Return location for error or %NULL.
+ *
+ * Creates a #QmiProxy listening in the default proxy addess.
+ *
+ * Returns: A newly created #QmiProxy, or #NULL if @error is set.
+ *
+ * Since: 1.8
+ */
+QmiProxy *qmi_proxy_new (GError **error);
+
+/**
+ * qmi_proxy_get_n_clients:
+ * @self: a #QmiProxy.
+ *
+ * Get the number of clients currently connected to the proxy.
+ *
+ * Returns: a #guint.
+ *
+ * Since: 1.8
+ */
+guint qmi_proxy_get_n_clients (QmiProxy *self);
#endif /* QMI_PROXY_H */