summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Hughes <richard@hughsie.com>2010-01-26 11:59:09 +0000
committerRichard Hughes <richard@hughsie.com>2010-01-26 11:59:09 +0000
commit21012c7d2ee72c16f818857169184de7972587aa (patch)
tree1692266bb4e80f3a4eb1c716e2521f9c115435c8
parentaf56b087952aa8b722b2497a1405abcfad56c4a9 (diff)
trivial: add some more gtk-doc markup to the new objects
-rw-r--r--devkit-power-gobject/dkp-enum.h8
-rw-r--r--libupower-glib/up-history-item.c10
-rw-r--r--libupower-glib/up-qos-item.c14
-rw-r--r--libupower-glib/up-stats-item.c10
-rw-r--r--libupower-glib/up-types.c10
-rw-r--r--libupower-glib/up-types.h8
-rw-r--r--libupower-glib/up-wakeup-item.c10
-rw-r--r--src/up-qos.c26
8 files changed, 68 insertions, 28 deletions
diff --git a/devkit-power-gobject/dkp-enum.h b/devkit-power-gobject/dkp-enum.h
index 146dd3a..0f370a1 100644
--- a/devkit-power-gobject/dkp-enum.h
+++ b/devkit-power-gobject/dkp-enum.h
@@ -111,10 +111,10 @@ typedef DkpQosType UpQosType;
#define UP_DEVICE_TECHNOLOGY_NICKEL_CADMIUM DKP_DEVICE_TECHNOLOGY_NICKEL_CADMIUM
#define UP_DEVICE_TECHNOLOGY_NICKEL_METAL_HYDRIDE DKP_DEVICE_TECHNOLOGY_NICKEL_METAL_HYDRIDE
#define UP_DEVICE_TECHNOLOGY_LAST DKP_DEVICE_TECHNOLOGY_LAST
-#define UP_QOS_TYPE_UNKNOWN DKP_QOS_TYPE_UNKNOWN
-#define UP_QOS_TYPE_NETWORK DKP_QOS_TYPE_NETWORK
-#define UP_QOS_TYPE_CPU_DMA DKP_QOS_TYPE_CPU_DMA
-#define UP_QOS_TYPE_LAST DKP_QOS_TYPE_LAST
+#define UP_QOS_KIND_UNKNOWN DKP_QOS_TYPE_UNKNOWN
+#define UP_QOS_KIND_NETWORK DKP_QOS_TYPE_NETWORK
+#define UP_QOS_KIND_CPU_DMA DKP_QOS_TYPE_CPU_DMA
+#define UP_QOS_KIND_LAST DKP_QOS_TYPE_LAST
const gchar *dkp_device_type_to_text (DkpDeviceType type_enum);
const gchar *dkp_device_state_to_text (DkpDeviceState state_enum);
diff --git a/libupower-glib/up-history-item.c b/libupower-glib/up-history-item.c
index fb547c0..604b244 100644
--- a/libupower-glib/up-history-item.c
+++ b/libupower-glib/up-history-item.c
@@ -19,6 +19,16 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
+/**
+ * SECTION:up-history-item
+ * @short_description: Helper object representing one item of historical data.
+ *
+ * This object represents one item of data which may be returned from the
+ * daemon in response to a query.
+ *
+ * See also: #UpDevice, #UpClient
+ */
+
#include "config.h"
#include <glib.h>
diff --git a/libupower-glib/up-qos-item.c b/libupower-glib/up-qos-item.c
index 5867f37..1bd5f24 100644
--- a/libupower-glib/up-qos-item.c
+++ b/libupower-glib/up-qos-item.c
@@ -19,6 +19,16 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
+/**
+ * SECTION:up-qos-item
+ * @short_description: Helper object representing one item of QOS data.
+ *
+ * This object represents one item of data which may be returned from the
+ * daemon in response to a query.
+ *
+ * See also: #UpDevice, #UpClient
+ */
+
#include "config.h"
#include <glib.h>
@@ -545,7 +555,7 @@ up_qos_item_class_init (UpQosItemClass *klass)
g_object_class_install_property (object_class,
PROP_TYPE,
g_param_spec_uint ("type", NULL, NULL,
- 0, G_MAXUINT, UP_QOS_TYPE_UNKNOWN,
+ 0, G_MAXUINT, UP_QOS_KIND_UNKNOWN,
G_PARAM_READWRITE));
/**
* UpQosItem:value:
@@ -577,7 +587,7 @@ up_qos_item_init (UpQosItem *qos_item)
qos_item->priv->cookie = 0;
qos_item->priv->timespec = 0;
qos_item->priv->persistent = FALSE;
- qos_item->priv->type = UP_QOS_TYPE_UNKNOWN;
+ qos_item->priv->type = UP_QOS_KIND_UNKNOWN;
qos_item->priv->value = 0;
}
diff --git a/libupower-glib/up-stats-item.c b/libupower-glib/up-stats-item.c
index 291b7de..786f185 100644
--- a/libupower-glib/up-stats-item.c
+++ b/libupower-glib/up-stats-item.c
@@ -19,6 +19,16 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
+/**
+ * SECTION:up-stats-item
+ * @short_description: Helper object representing one item of statistics data.
+ *
+ * This object represents one item of data which may be returned from the
+ * daemon in response to a query.
+ *
+ * See also: #UpDevice, #UpClient
+ */
+
#include "config.h"
#include <glib.h>
diff --git a/libupower-glib/up-types.c b/libupower-glib/up-types.c
index f7e24ed..8663cbd 100644
--- a/libupower-glib/up-types.c
+++ b/libupower-glib/up-types.c
@@ -261,9 +261,9 @@ up_device_technology_from_string (const gchar *technology)
const gchar *
up_qos_kind_to_string (UpQosKind type)
{
- if (type == UP_QOS_TYPE_NETWORK)
+ if (type == UP_QOS_KIND_NETWORK)
return "network";
- if (type == UP_QOS_TYPE_CPU_DMA)
+ if (type == UP_QOS_KIND_CPU_DMA)
return "cpu_dma";
return NULL;
}
@@ -281,9 +281,9 @@ UpQosKind
up_qos_kind_from_string (const gchar *type)
{
if (g_strcmp0 (type, "network") == 0)
- return UP_QOS_TYPE_NETWORK;
+ return UP_QOS_KIND_NETWORK;
if (g_strcmp0 (type, "cpu_dma") == 0)
- return UP_QOS_TYPE_CPU_DMA;
- return UP_QOS_TYPE_UNKNOWN;
+ return UP_QOS_KIND_CPU_DMA;
+ return UP_QOS_KIND_UNKNOWN;
}
diff --git a/libupower-glib/up-types.h b/libupower-glib/up-types.h
index 607fe18..a5a54e6 100644
--- a/libupower-glib/up-types.h
+++ b/libupower-glib/up-types.h
@@ -86,10 +86,10 @@ typedef enum {
* The type of QOS request.
**/
typedef enum {
- UP_QOS_TYPE_UNKNOWN,
- UP_QOS_TYPE_NETWORK,
- UP_QOS_TYPE_CPU_DMA,
- UP_QOS_TYPE_LAST
+ UP_QOS_KIND_UNKNOWN,
+ UP_QOS_KIND_NETWORK,
+ UP_QOS_KIND_CPU_DMA,
+ UP_QOS_KIND_LAST
} UpQosKind;
const gchar *up_device_kind_to_string (UpDeviceKind type_enum);
diff --git a/libupower-glib/up-wakeup-item.c b/libupower-glib/up-wakeup-item.c
index 58e40b4..91413b1 100644
--- a/libupower-glib/up-wakeup-item.c
+++ b/libupower-glib/up-wakeup-item.c
@@ -19,6 +19,16 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
+/**
+ * SECTION:up-wakeup-item
+ * @short_description: Helper object representing one item of wakeup data.
+ *
+ * This object represents one item of data which may be returned from the
+ * daemon in response to a query.
+ *
+ * See also: #UpDevice, #UpClient
+ */
+
#include "config.h"
#include <glib.h>
diff --git a/src/up-qos.c b/src/up-qos.c
index 1042ddf..9b44b1f 100644
--- a/src/up-qos.c
+++ b/src/up-qos.c
@@ -59,9 +59,9 @@ static void up_qos_finalize (GObject *object);
struct UpQosPrivate
{
GPtrArray *data;
- gint fd[UP_QOS_TYPE_LAST];
- gint last[UP_QOS_TYPE_LAST];
- gint minimum[UP_QOS_TYPE_LAST];
+ gint fd[UP_QOS_KIND_LAST];
+ gint last[UP_QOS_KIND_LAST];
+ gint minimum[UP_QOS_KIND_LAST];
UpPolkit *polkit;
DBusGConnection *connection;
DBusGProxy *proxy;
@@ -256,7 +256,7 @@ up_qos_request_latency (UpQos *qos, const gchar *type_text, gint value, gboolean
/* get correct data */
type = up_qos_type_from_text (type_text);
- if (type == UP_QOS_TYPE_UNKNOWN) {
+ if (type == UP_QOS_KIND_UNKNOWN) {
error = g_error_new (UP_DAEMON_ERROR, UP_DAEMON_ERROR_GENERAL, "type invalid: %s", type_text);
dbus_g_method_return_error (context, error);
goto out;
@@ -411,7 +411,7 @@ up_qos_get_latency (UpQos *qos, const gchar *type_text, gint *value, GError **er
/* get correct data */
type = up_qos_type_from_text (type_text);
- if (type == UP_QOS_TYPE_UNKNOWN) {
+ if (type == UP_QOS_KIND_UNKNOWN) {
g_set_error (error, UP_DAEMON_ERROR, UP_DAEMON_ERROR_GENERAL, "type invalid: %s", type_text);
return FALSE;
}
@@ -432,7 +432,7 @@ up_qos_set_minimum_latency (UpQos *qos, const gchar *type_text, gint value, DBus
/* type valid? */
type = up_qos_type_from_text (type_text);
- if (type == UP_QOS_TYPE_UNKNOWN) {
+ if (type == UP_QOS_KIND_UNKNOWN) {
error = g_error_new (UP_DAEMON_ERROR, UP_DAEMON_ERROR_GENERAL, "type invalid: %s", type_text);
dbus_g_method_return_error (context, error);
return;
@@ -560,18 +560,18 @@ up_qos_init (UpQos *qos)
/* TODO: need to load persistent values */
/* setup lowest */
- for (i=0; i<UP_QOS_TYPE_LAST; i++)
+ for (i=0; i<UP_QOS_KIND_LAST; i++)
qos->priv->last[i] = up_qos_get_lowest (qos, i);
/* setup minimum */
- for (i=0; i<UP_QOS_TYPE_LAST; i++)
+ for (i=0; i<UP_QOS_KIND_LAST; i++)
qos->priv->minimum[i] = -1;
- qos->priv->fd[UP_QOS_TYPE_CPU_DMA] = open ("/dev/cpu_dma_latency", O_WRONLY);
- if (qos->priv->fd[UP_QOS_TYPE_CPU_DMA] < 0)
+ qos->priv->fd[UP_QOS_KIND_CPU_DMA] = open ("/dev/cpu_dma_latency", O_WRONLY);
+ if (qos->priv->fd[UP_QOS_KIND_CPU_DMA] < 0)
egg_warning ("cannot open cpu_dma device file");
- qos->priv->fd[UP_QOS_TYPE_NETWORK] = open ("/dev/network_latency", O_WRONLY);
- if (qos->priv->fd[UP_QOS_TYPE_NETWORK] < 0)
+ qos->priv->fd[UP_QOS_KIND_NETWORK] = open ("/dev/network_latency", O_WRONLY);
+ if (qos->priv->fd[UP_QOS_KIND_NETWORK] < 0)
egg_warning ("cannot open network device file");
qos->priv->connection = dbus_g_bus_get (DBUS_BUS_SYSTEM, &error);
@@ -609,7 +609,7 @@ up_qos_finalize (GObject *object)
qos->priv = UP_QOS_GET_PRIVATE (qos);
/* close files */
- for (i=0; i<UP_QOS_TYPE_LAST; i++) {
+ for (i=0; i<UP_QOS_KIND_LAST; i++) {
if (qos->priv->fd[i] > 0)
close (qos->priv->fd[i]);
}