hal: Branch 'master'
Danny Kukawka
dkukawka at kemper.freedesktop.org
Tue Feb 20 09:00:58 PST 2007
hald/create_cache.c | 19 -
hald/device.c | 14
hald/freebsd/probing/probe-smbios.c | 24 -
hald/hald.c | 29 --
hald/hald.h | 10
hald/hald_dbus.c | 354 ++++++++++++++-----------
hald/hald_dbus.h | 87 +++---
hald/ids.c | 97 ++++--
hald/linux/acpi.c | 128 ++++++---
hald/linux/addons/addon-acpi-buttons-toshiba.c | 25 +
hald/linux/addons/addon-cpufreq-userspace.c | 144 ++++++++--
hald/linux/addons/addon-cpufreq-userspace.h | 2
hald/linux/addons/addon-cpufreq.c | 196 ++++++++++++-
hald/linux/hotplug.h | 2
hald/linux/hotplug_helper.h | 16 -
hald/linux/pmu.c | 30 +-
hald/linux/probing/probe-smbios.c | 26 +
hald/logger.c | 63 ++--
hald/logger.h | 12
hald/rule.h | 19 -
hald/solaris/osspec.c | 9
hald/util.c | 129 ++++-----
hald/util.h | 2
hald/util_pm.c | 49 +--
libhal-storage/libhal-storage.c | 173 ++++++------
libhal-storage/libhal-storage.h | 6
partutil/partutil.h | 3
tools/hal-storage-mount.c | 2
tools/hal-system-power-pmu.c | 55 +--
tools/hal_find_by_capability.c | 22 -
tools/hal_find_by_property.c | 25 -
tools/hal_get_property.c | 32 --
tools/hal_set_property.c | 32 --
tools/lshal.c | 153 ++++++----
34 files changed, 1207 insertions(+), 782 deletions(-)
New commits:
diff-tree fbf31cf6300695958a3a936ed3a90619d5af84a2 (from d0e1baea517a8c4e538c73db77576a6d5c794657)
Author: Danny Kukawka <danny.kukawka at web.de>
Date: Tue Feb 20 17:59:36 2007 +0100
fix gtk-doc code documentation
This fixes the gtk-doc code documentation (why ever we switched from
docbook to gtk-doc - IMO docbook was more tolerant and better to use
and the change was not the best idea).
This needed also some smaller code changes.
diff --git a/hald/create_cache.c b/hald/create_cache.c
index 2b40d3d..7e561ac 100644
--- a/hald/create_cache.c
+++ b/hald/create_cache.c
@@ -68,8 +68,8 @@ _alphasort(const struct dirent **a, cons
}
-static enum
-rule_type get_rule_type (const char *str)
+static rule_type
+get_rule_type (const char *str)
{
if (strcmp (str, "match") == 0)
return RULE_MATCH;
@@ -88,8 +88,8 @@ rule_type get_rule_type (const char *str
return RULE_UNKNOWN;
}
-static enum
-match_type get_match_type(const char *str)
+static match_type
+get_match_type(const char *str)
{
if (strcmp (str, "string") == 0)
return MATCH_STRING;
@@ -132,8 +132,8 @@ match_type get_match_type(const char *st
return MATCH_UNKNOWN;
}
-static enum
-merge_type get_merge_type (const char *str)
+static merge_type
+get_merge_type (const char *str)
{
if (strcmp (str, "string") == 0)
return MERGE_STRING;
@@ -385,7 +385,7 @@ cdata (void *data, const char *s, int le
static void
end (void *data, const char *el){
struct fdi_context *fdi_ctx = data;
- enum rule_type rtype = get_rule_type(el);
+ rule_type rtype = get_rule_type(el);
if (rtype == RULE_UNKNOWN) return;
if (rtype == RULE_MATCH){
@@ -571,7 +571,10 @@ di_rules_init (void)
HAL_INFO (("Loading rules done (occupying %d bytes)", header.all_rules_size));
}
-/** Print out program usage.
+/**
+ * usage:
+ *
+ * Print out program usage.
*
*/
static void
diff --git a/hald/device.c b/hald/device.c
index 8b8c9e9..a28eb80 100644
--- a/hald/device.c
+++ b/hald/device.c
@@ -568,14 +568,16 @@ out:
;
}
-/** Merge all properties from source where the key starts with
+/**
+ * hal_device_merge_with_rewrite:
+ * @target: Device to put properties onto
+ * @source: Device to retrieve properties from
+ * @target_namespace: Replace source namespace with this namespace
+ * @source_namespace: Source namespace that property keys must match
+ *
+ * Merge all properties from source where the key starts with
* source_namespace and put them onto target replacing source_namespace
* with target_namespace
- *
- * @param target Device to put properties onto
- * @param source Device to retrieve properties from
- * @param target_namespace Replace source namespace with this namespace
- * @param source_namespace Source namespace that property keys must match
*/
void
hal_device_merge_with_rewrite (HalDevice *target,
diff --git a/hald/freebsd/probing/probe-smbios.c b/hald/freebsd/probing/probe-smbios.c
index 1c7647e..7d12773 100644
--- a/hald/freebsd/probing/probe-smbios.c
+++ b/hald/freebsd/probing/probe-smbios.c
@@ -48,13 +48,15 @@
#define strbegin(buf, str) (strncmp (buf, str, strlen (str)) == 0)
-/** Finds the start of a null terminated string and sets HAL
- * property if valid.
+/**
+ * setstr:
+ * @buf: The non tabbed prefixed, null terminated string
+ * @str: The strings to compare with e.g. "Vendor:"
+ * @prop: The HAL property to set
*
- * @param buf The non tabbed prefixed, null terminated string
- * @param str The strings to compare with e.g. "Vendor:"
- * @param prop The HAL property to set
- * @return TRUE is found, FALSE otherwise.
+ * Return TRUE is found, FALSE otherwise.
+ *
+ * Finds the start of a null terminated string and sets HAL property if valid.
*/
static int
setstr (char *buf, char *str, char *prop)
@@ -72,11 +74,13 @@ setstr (char *buf, char *str, char *prop
return FALSE;
}
-/** Main entry point
+/**
+ * main:
+ * @argc: Number of arguments given to program
+ * @argv: Arguments given to program
+ * Returns: Return code
*
- * @param argc Number of arguments given to program
- * @param argv Arguments given to program
- * @return Return code
+ * Main entry point
*/
int
main (int argc, char *argv[])
diff --git a/hald/hald.c b/hald/hald.c
index 2918558..c130ca8 100644
--- a/hald/hald.c
+++ b/hald/hald.c
@@ -66,12 +66,6 @@ static void delete_pid(void)
unlink(HALD_PID_FILE);
}
-/**
- * @defgroup HalDaemon HAL daemon
- * @brief The HAL daemon manages persistent device objects available through
- * a D-BUS network API
- */
-
static HalDeviceStore *global_device_list = NULL;
static HalDeviceStore *temporary_device_list = NULL;
@@ -198,15 +192,10 @@ hald_get_tdl (void)
return temporary_device_list;
}
-/**
- * @defgroup MainDaemon Basic functions
- * @ingroup HalDaemon
- * @brief Basic functions in the HAL daemon
- * @{
- */
-
-/** Print out program usage.
+/**
+ * usage:
*
+ * Print out program usage.
*/
static void
usage ()
@@ -361,11 +350,13 @@ out:
/*--------------------------------------------------------------------------------------------------*/
-/** Entry point for HAL daemon
+/**
+ * main:
+ * @argc: Number of arguments
+ * @argv: Array of arguments
+ * Returns: Exit code
*
- * @param argc Number of arguments
- * @param argv Array of arguments
- * @return Exit code
+ * Entry point for HAL daemon
*/
int
main (int argc, char *argv[])
@@ -713,5 +704,3 @@ osspec_probe_done (void)
#endif
}
-
-/** @} */
diff --git a/hald/hald.h b/hald/hald.h
index cb86cd7..a919537 100644
--- a/hald/hald.h
+++ b/hald/hald.h
@@ -32,12 +32,6 @@
#include "device_store.h"
-/**
- * @addtogroup HalDaemon
- *
- * @{
- */
-
HalDeviceStore *hald_get_gdl (void);
HalDeviceStore *hald_get_tdl (void);
@@ -58,8 +52,4 @@ extern dbus_bool_t hald_is_shutting_down
*/
/*#define HALD_MEMLEAK_DBG 10*/
-/**
- * @}
- */
-
#endif /* HALD_H */
diff --git a/hald/hald_dbus.c b/hald/hald_dbus.c
index ae70232..32a58b1 100644
--- a/hald/hald_dbus.c
+++ b/hald/hald_dbus.c
@@ -65,19 +65,14 @@ raise_error (DBusConnection *connection,
const char *error_name,
char *format, ...) __attribute__((format (printf, 4, 5)));
-/**
- * @defgroup DaemonErrors Error conditions
- * @ingroup HalDaemon
- * @brief Various error messages the HAL daemon can raise
- * @{
- */
-
-/** Raise HAL error
+/**
+ * raise_error:
+ * @connection: D-Bus connection
+ * @in_reply_to: message to report error on
+ * @error_name: D-Bus error name
+ * @format: printf-style format for error message
*
- * @param connection D-Bus connection
- * @param in_reply_to message to report error on
- * @param error_name D-Bus error name
- * @param format printf-style format for error message
+ * Raise HAL error
*/
static void
raise_error (DBusConnection *connection,
@@ -102,11 +97,13 @@ raise_error (DBusConnection *connection,
dbus_message_unref (reply);
}
-/** Raise the org.freedesktop.Hal.NoSuchDevice error
+/**
+ * raise_no_such_device:
+ * @connection: D-Bus connection
+ * @in_reply_to: message to report error on
+ * @udi: Unique device id given
*
- * @param connection D-Bus connection
- * @param in_reply_to message to report error on
- * @param udi Unique device id given
+ * Raise the org.freedesktop.Hal.NoSuchDevice error
*/
static void
raise_no_such_device (DBusConnection *connection,
@@ -120,12 +117,14 @@ raise_no_such_device (DBusConnection *co
);
}
-/** Raise the org.freedesktop.Hal.NoSuchProperty error
+/**
+ * raise_no_such_property:
+ * @connection: D-Bus connection
+ * @in_reply_to: message to report error on
+ * @device_id: Id of the device
+ * @key: Key of the property that didn't exist
*
- * @param connection D-Bus connection
- * @param in_reply_to message to report error on
- * @param device_id Id of the device
- * @param key Key of the property that didn't exist
+ * Raise the org.freedesktop.Hal.NoSuchProperty error
*/
static void
raise_no_such_property (DBusConnection *connection,
@@ -140,12 +139,14 @@ raise_no_such_property (DBusConnection *
);
}
-/** Raise the org.freedesktop.Hal.TypeMismatch error
+/**
+ * raise_property_type_error:
+ * @connection: D-Bus connection
+ * @in_reply_to: message to report error on
+ * @device_id: Id of the device
+ * @key: Key of the property
*
- * @param connection D-Bus connection
- * @param in_reply_to message to report error on
- * @param device_id Id of the device
- * @param key Key of the property
+ * Raise the org.freedesktop.Hal.TypeMismatch error
*/
static void
raise_property_type_error (DBusConnection *connection,
@@ -160,12 +161,14 @@ raise_property_type_error (DBusConnectio
);
}
-/** Raise the org.freedesktop.Hal.SyntaxError error
+/**
+ * raise_syntax:
+ * @connection: D-Bus connection
+ * @in_reply_to: message to report error on
+ * @method_name: Name of the method that was invoked with
+ * the wrong signature
*
- * @param connection D-Bus connection
- * @param in_reply_to message to report error on
- * @param method_name Name of the method that was invoked with
- * the wrong signature
+ * Raise the org.freedesktop.Hal.SyntaxError error
*/
static void
raise_syntax (DBusConnection *connection,
@@ -179,11 +182,13 @@ raise_syntax (DBusConnection *connection
);
}
-/** Raise the org.freedesktop.Hal.DeviceNotLocked error
+/**
+ * raise_device_not_locked:
+ * @connection: D-Bus connection
+ * @in_reply_to: message to report error on
+ * @device: device which isn't locked
*
- * @param connection D-Bus connection
- * @param in_reply_to message to report error on
- * @param device device which isn't locked
+ * Raise the org.freedesktop.Hal.DeviceNotLocked error
*/
static void
raise_device_not_locked (DBusConnection *connection,
@@ -198,11 +203,13 @@ raise_device_not_locked (DBusConnection
);
}
-/** Raise the org.freedesktop.Hal.DeviceAlreadyLocked error
+/**
+ * raise_device_already_locked:
+ * @connection: D-Bus connection
+ * @in_reply_to: message to report error on
+ * @device: device which isn't locked
*
- * @param connection D-Bus connection
- * @param in_reply_to message to report error on
- * @param device device which isn't locked
+ * Raise the org.freedesktop.Hal.DeviceAlreadyLocked error
*/
static void
raise_device_already_locked (DBusConnection *connection,
@@ -227,11 +234,13 @@ raise_device_already_locked (DBusConnect
dbus_message_unref (reply);
}
-/** Raise the org.freedesktop.Hal.PermissionDenied error
+/**
+ * raise_permission_denied:
+ * @connection: D-Bus connection
+ * @in_reply_to: message to report error on
+ * @message: what you're not allowed to do
*
- * @param connection D-Bus connection
- * @param in_reply_to message to report error on
- * @param message what you're not allowed to do
+ * Raise the org.freedesktop.Hal.PermissionDenied error
*/
static void
raise_permission_denied (DBusConnection *connection,
@@ -246,15 +255,6 @@ raise_permission_denied (DBusConnection
);
}
-/** @} */
-
-/**
- * @defgroup ManagerInterface D-BUS interface org.freedesktop.Hal.Manager
- * @ingroup HalDaemon
- * @brief D-BUS interface for querying device objects
- *
- * @{
- */
static gboolean
foreach_device_get_udi (HalDeviceStore *store, HalDevice *device,
@@ -269,15 +269,19 @@ foreach_device_get_udi (HalDeviceStore *
return TRUE;
}
-/** Get all devices.
+/**
+ * manager_get_all_devices:
+ * @connection: D-BUS connection
+ * @message: Message
+ *
+ * Returns: What to do with the message
+ *
+ * Get all devices.
*
* <pre>
* array{object_reference} Manager.GetAllDevices()
* </pre>
*
- * @param connection D-BUS connection
- * @param message Message
- * @return What to do with the message
*/
DBusHandlerResult
manager_get_all_devices (DBusConnection * connection,
@@ -371,7 +375,14 @@ foreach_device_match_get_udi_tdl (HalDev
return TRUE;
}
-/** Find devices in the GDL where a single string property matches a given
+/**
+ * manager_find_device_string_match:
+ * @connection: D-BUS connection
+ * @message: Message
+ *
+ * Returns: What to do with the message
+ *
+ * Find devices in the GDL where a single string property matches a given
* value. Also returns devices in the TDL that has a non-tmp UDI.
*
* <pre>
@@ -379,9 +390,6 @@ foreach_device_match_get_udi_tdl (HalDev
* string value)
* </pre>
*
- * @param connection D-BUS connection
- * @param message Message
- * @return What to do with the message
*/
DBusHandlerResult
manager_find_device_string_match (DBusConnection * connection,
@@ -461,15 +469,19 @@ foreach_device_by_capability (HalDeviceS
return TRUE;
}
-/** Find devices in the GDL with a given capability.
+/**
+ * manager_find_device_by_capability:
+ * @connection: D-BUS connection
+ * @message: Message
+ *
+ * Returns: What to do with the message
+ *
+ * Find devices in the GDL with a given capability.
*
* <pre>
* array{object_reference} Manager.FindDeviceByCapability(string capability)
* </pre>
*
- * @param connection D-BUS connection
- * @param message Message
- * @return What to do with the message
*/
DBusHandlerResult
manager_find_device_by_capability (DBusConnection * connection,
@@ -521,15 +533,19 @@ manager_find_device_by_capability (DBusC
}
-/** Determine if a device exists.
+/**
+ * manager_device_exists:
+ * @connection: D-BUS connection
+ * @message: Message
+ *
+ * Returns: What to do with the message
+ *
+ * Determine if a device exists.
*
* <pre>
* bool Manager.DeviceExists(string udi)
* </pre>
*
- * @param connection D-BUS connection
- * @param message Message
- * @return What to do with the message
*/
DBusHandlerResult
manager_device_exists (DBusConnection * connection, DBusMessage * message)
@@ -571,10 +587,13 @@ manager_device_exists (DBusConnection *
return DBUS_HANDLER_RESULT_HANDLED;
}
-/** Send signal DeviceAdded(string udi) on the org.freedesktop.Hal.Manager
+/**
+ * manager_send_signal_device_added:
+ * @device: The HalDevice added
+ *
+ * Send signal DeviceAdded(string udi) on the org.freedesktop.Hal.Manager
* interface on the object /org/freedesktop/Hal/Manager.
*
- * @param device The HalDevice added
*/
void
manager_send_signal_device_added (HalDevice *device)
@@ -604,10 +623,13 @@ out:
;
}
-/** Send signal DeviceRemoved(string udi) on the org.freedesktop.Hal.Manager
+/**
+ * manager_send_signal_device_removed:
+ * @device: The HalDevice removed
+ *
+ * Send signal DeviceRemoved(string udi) on the org.freedesktop.Hal.Manager
* interface on the object /org/freedesktop/Hal/Manager.
*
- * @param device The HalDevice removed
*/
void
manager_send_signal_device_removed (HalDevice *device)
@@ -636,12 +658,15 @@ out:
;
}
-/** Send signal NewCapability(string udi, string capability) on the
+/**
+ * manager_send_signal_new_capability:
+ * @device: HAL device
+ * @capability: Capability
+ *
+ * Send signal NewCapability(string udi, string capability) on the
* org.freedesktop.Hal.Manager interface on the object
* /org/freedesktop/Hal/Manager.
*
- * @param udi Unique Device Id
- * @param capability Capability
*/
void
manager_send_signal_new_capability (HalDevice *device,
@@ -672,15 +697,6 @@ out:
;
}
-/** @} */
-
-/**
- * @defgroup DeviceInterface D-BUS interface org.freedesktop.Hal.Device
- * @ingroup HalDaemon
- * @brief D-BUS interface for generic device operations
- * @{
- */
-
static void
foreach_property_append (HalDevice *device,
const char *key,
@@ -847,7 +863,14 @@ foreach_property_append (HalDevice *devi
-/** Get all properties on a device.
+/**
+ * device_get_all_properties:
+ * @connection: D-BUS connection
+ * @message: D-Bus Message
+ *
+ * Returns: What to do with the message
+ *
+ * Get all properties on a device.
*
* <pre>
* map{string, any} Device.GetAllProperties()
@@ -855,9 +878,6 @@ foreach_property_append (HalDevice *devi
* raises org.freedesktop.Hal.NoSuchDevice
* </pre>
*
- * @param connection D-BUS connection
- * @param message Message
- * @return What to do with the message
*/
DBusHandlerResult
device_get_all_properties (DBusConnection * connection,
@@ -1171,7 +1191,14 @@ out:
}
-/** Set multiple properties on a device in an atomic fashion.
+/** *
+ * device_set_multiple_properties:
+ * @connection: D-BUS connection
+ * @message: Message
+ *
+ * Returns: What to do with the message
+ *
+ * Set multiple properties on a device in an atomic fashion.
*
* <pre>
* Device.GetAllProperties(map{string, any} properties)
@@ -1179,9 +1206,6 @@ out:
* raises org.freedesktop.Hal.NoSuchDevice
* </pre>
*
- * @param connection D-BUS connection
- * @param message Message
- * @return What to do with the message
*/
static DBusHandlerResult
device_set_multiple_properties (DBusConnection *connection, DBusMessage *message, dbus_bool_t local_interface)
@@ -1323,7 +1347,14 @@ device_set_multiple_properties (DBusConn
}
-/** Get a property on a device.
+/**
+ * device_get_property:
+ * @connection: D-BUS connection
+ * @message: Message
+ *
+ * Returns: What to do with the message
+ *
+ * Get a property on a device.
*
* <pre>
* any Device.GetProperty(string key)
@@ -1336,9 +1367,6 @@ device_set_multiple_properties (DBusConn
* org.freedesktop.Hal.NoSuchProperty
* </pre>
*
- * @param connection D-BUS connection
- * @param message Message
- * @return What to do with the message
*/
DBusHandlerResult
device_get_property (DBusConnection * connection, DBusMessage * message)
@@ -1456,7 +1484,14 @@ device_get_property (DBusConnection * co
}
-/** Get the type of a property on a device.
+/**
+ * device_get_property_type:
+ * @connection: D-BUS connection
+ * @message: Message
+ *
+ * Returns: What to do with the message
+ *
+ * Get the type of a property on a device.
*
* <pre>
* int Device.GetPropertyType(string key)
@@ -1465,9 +1500,6 @@ device_get_property (DBusConnection * co
* org.freedesktop.Hal.NoSuchProperty
* </pre>
*
- * @param connection D-BUS connection
- * @param message Message
- * @return What to do with the message
*/
DBusHandlerResult
device_get_property_type (DBusConnection * connection,
@@ -1523,7 +1555,14 @@ device_get_property_type (DBusConnection
return DBUS_HANDLER_RESULT_HANDLED;
}
-/** Set a property on a device.
+/**
+ * device_set_property:
+ * @connection: D-BUS connection
+ * @message: Message
+ *
+ * Returns: What to do with the message
+ *
+ * Set a property on a device.
*
* <pre>
* void Device.SetProperty(string key, any value)
@@ -1536,10 +1575,6 @@ device_get_property_type (DBusConnection
* org.freedesktop.Hal.NoSuchProperty
* org.freedesktop.Hal.TypeMismatch
* </pre>
- *
- * @param connection D-BUS connection
- * @param message Message
- * @return What to do with the message
*/
DBusHandlerResult
device_set_property (DBusConnection * connection, DBusMessage * message, dbus_bool_t local_interface)
@@ -1643,7 +1678,14 @@ device_set_property (DBusConnection * co
return DBUS_HANDLER_RESULT_HANDLED;
}
-/** This function is used to modify the Capabilities property. The reason
+/**
+ * device_add_capability:
+ * @connection: D-BUS connection
+ * @message: Message
+ *
+ * Returns: What to do with the message
+ *
+ * This function is used to modify the Capabilities property. The reason
* for having a dedicated function is that the HAL daemon will broadcast
* a signal on the Manager interface to tell applications that the device
* have got a new capability.
@@ -1665,10 +1707,6 @@ device_set_property (DBusConnection * co
* raises org.freedesktop.Hal.NoSuchDevice,
* raises org.freedesktop.Hal.PermissionDenied,
* </pre>
- *
- * @param connection D-BUS connection
- * @param message Message
- * @return What to do with the message
*/
DBusHandlerResult
device_add_capability (DBusConnection * connection, DBusMessage * message, dbus_bool_t local_interface)
@@ -1827,7 +1865,14 @@ device_string_list_remove (DBusConnectio
-/** Remove a property on a device.
+/**
+ * device_remove_property:
+ * @connection: D-BUS connection
+ * @message: Message
+ *
+ * Returns: What to do with the message
+ *
+ * Remove a property on a device.
*
* <pre>
* void Device.RemoveProperty(string key)
@@ -1836,10 +1881,6 @@ device_string_list_remove (DBusConnectio
* org.freedesktop.Hal.NoSuchProperty
* org.freedesktop.Hal.PermissionDenied
* </pre>
- *
- * @param connection D-BUS connection
- * @param message Message
- * @return What to do with the message
*/
DBusHandlerResult
device_remove_property (DBusConnection * connection, DBusMessage * message, dbus_bool_t local_interface)
@@ -1894,17 +1935,20 @@ device_remove_property (DBusConnection *
}
-/** Determine if a property exists
+/**
+ * device_property_exists:
+ * @connection: D-BUS connection
+ * @message: Message
+ *
+ * Returns: What to do with the message
+ *
+ * Determine if a property exists
*
* <pre>
* bool Device.PropertyExists(string key)
*
* raises org.freedesktop.Hal.NoSuchDevice,
* </pre>
- *
- * @param connection D-BUS connection
- * @param message Message
- * @return What to do with the message
*/
DBusHandlerResult
device_property_exists (DBusConnection * connection, DBusMessage * message)
@@ -1954,7 +1998,14 @@ device_property_exists (DBusConnection *
}
-/** Determine if a device has a capability
+/**
+ * device_query_capability:
+ * @connection: D-BUS connection
+ * @message: Message
+ *
+ * Returns: What to do with the message
+ *
+ * Determine if a device has a capability
*
* <pre>
* bool Device.QueryCapability(string capability_name)
@@ -1962,9 +2013,6 @@ device_property_exists (DBusConnection *
* raises org.freedesktop.Hal.NoSuchDevice,
* </pre>
*
- * @param connection D-BUS connection
- * @param message Message
- * @return What to do with the message
*/
DBusHandlerResult
device_query_capability (DBusConnection * connection,
@@ -2026,7 +2074,14 @@ device_query_capability (DBusConnection
static GHashTable *services_with_locks = NULL;
-/** Grab an advisory lock on a device.
+/**
+ * device_lock:
+ * @connection: D-BUS connection
+ * @message: Message
+ *
+ * Returns: What to do with the message
+ *
+ * Grab an advisory lock on a device.
*
* <pre>
* bool Device.Lock(string reason)
@@ -2034,10 +2089,6 @@ static GHashTable *services_with_locks =
* raises org.freedesktop.Hal.NoSuchDevice,
* org.freedesktop.Hal.DeviceAlreadyLocked
* </pre>
- *
- * @param connection D-BUS connection
- * @param message Message
- * @return What to do with the message
*/
DBusHandlerResult
device_lock (DBusConnection * connection,
@@ -2108,23 +2159,26 @@ device_lock (DBusConnection * connection
return DBUS_HANDLER_RESULT_HANDLED;
}
-/** Release an advisory lock on a device.
+/**
+ * device_unlock:
+ * @connection: D-BUS connection
+ * @message: Message
*
- * <pre>
+ * Returns: What to do with the message
+ *
+ * Release an advisory lock on a device.
+ *
+ * </pre>
* bool Device.Unlock()
*
* raises org.freedesktop.Hal.NoSuchDevice,
* org.freedesktop.Hal.DeviceNotLocked,
* org.freedesktop.Hal.PermissionDenied
* </pre>
- *
- * @param connection D-BUS connection
- * @param message Message
- * @return What to do with the message
*/
DBusHandlerResult
-device_unlock (DBusConnection * connection,
- DBusMessage * message)
+device_unlock (DBusConnection *connection,
+ DBusMessage *message)
{
dbus_bool_t rc;
const char *udi;
@@ -2217,7 +2271,10 @@ typedef struct PendingUpdate_s {
static PendingUpdate *pending_updates_head = NULL;
-/** Begin an atomic update - this is useful for updating several properties
+/**
+ * device_property_atomic_update_begin:
+ *
+ * Begin an atomic update - this is useful for updating several properties
* in one go.
*
* Note that an atomic update is recursive - use with caution!
@@ -2228,7 +2285,10 @@ device_property_atomic_update_begin (voi
atomic_count++;
}
-/** End an atomic update.
+/**
+ * device_property_atomic_update_end:
+ *
+ * End an atomic update.
*
* Note that an atomic update is recursive - use with caution!
*/
@@ -2413,7 +2473,13 @@ out:
;
}
-/** Emits a condition on a device; the device has to be in the GDL for
+/**
+ * device_send_signal_condition:
+ * @device: The device
+ * @condition_name: Name of condition
+ * @condition_details: Details of the condition as e.g. the button name
+ *
+ * Emits a condition on a device; the device has to be in the GDL for
* this function to have effect.
*
* Is intended for non-continuous events on the device like
@@ -2424,13 +2490,6 @@ out:
* This function accepts a number of parameters that are passed along
* in the D-BUS message. The recipient is supposed to extract the parameters
* himself, by looking at the HAL specification.
- *
- * @param udi The UDI for this device
- * @param condition_name Name of condition
- * @param first_arg_type Type of the first argument
- * @param ... value of first argument, list of additional
- * type-value pairs. Must be terminated with
- * DBUS_TYPE_INVALID
*/
void
device_send_signal_condition (HalDevice *device, const char *condition_name, const char *condition_details)
@@ -4683,4 +4742,3 @@ hald_dbus_init (void)
return TRUE;
}
-/** @} */
diff --git a/hald/hald_dbus.h b/hald/hald_dbus.h
index 4efc3ff..d7f9acc 100644
--- a/hald/hald_dbus.h
+++ b/hald/hald_dbus.h
@@ -30,46 +30,53 @@
#include "device.h"
-DBusHandlerResult manager_get_all_devices (DBusConnection *conn,
- DBusMessage *msg);
-DBusHandlerResult manager_find_device_string_match (DBusConnection *conn,
- DBusMessage *msg);
-DBusHandlerResult manager_find_device_by_capability (DBusConnection *conn,
- DBusMessage *msg);
-DBusHandlerResult manager_device_exists (DBusConnection *conn,
- DBusMessage *msg);
-DBusHandlerResult device_get_all_properties (DBusConnection *conn,
- DBusMessage *msg);
-DBusHandlerResult device_get_property (DBusConnection *conn,
- DBusMessage *msg);
-DBusHandlerResult device_get_property_type (DBusConnection *conn,
- DBusMessage *msg);
-DBusHandlerResult device_set_property (DBusConnection *conn,
- DBusMessage *msg, dbus_bool_t local_interface);
-DBusHandlerResult device_add_capability (DBusConnection *conn,
- DBusMessage *msg, dbus_bool_t local_interface);
-DBusHandlerResult device_remove_capability (DBusConnection *conn,
- DBusMessage *msg, dbus_bool_t local_interface);
-DBusHandlerResult device_remove_property (DBusConnection *conn,
- DBusMessage *msg, dbus_bool_t local_interface);
-DBusHandlerResult device_property_exists (DBusConnection *conn,
- DBusMessage *msg);
-DBusHandlerResult device_query_capability (DBusConnection *conn,
- DBusMessage *msg);
-DBusHandlerResult device_lock (DBusConnection *conn,
- DBusMessage *msg);
-DBusHandlerResult device_unlock (DBusConnection *conn,
- DBusMessage *msg);
-DBusHandlerResult manager_new_device (DBusConnection *conn,
- DBusMessage *msg, dbus_bool_t local_interface);
-DBusHandlerResult manager_commit_to_gdl (DBusConnection *conn,
- DBusMessage *msg, dbus_bool_t local_interface);
-DBusHandlerResult manager_remove (DBusConnection *conn,
- DBusMessage *msg, dbus_bool_t local_interface);
-DBusHandlerResult merge_properties (DBusConnection *conn,
- DBusMessage *msg);
-DBusHandlerResult device_matches (DBusConnection *conn,
- DBusMessage *msg);
+DBusHandlerResult manager_get_all_devices (DBusConnection *connection,
+ DBusMessage *message);
+DBusHandlerResult manager_find_device_string_match (DBusConnection *connection,
+ DBusMessage *message);
+DBusHandlerResult manager_find_device_by_capability (DBusConnection *connection,
+ DBusMessage *message);
+DBusHandlerResult manager_device_exists (DBusConnection *connection,
+ DBusMessage *message);
+DBusHandlerResult device_get_all_properties (DBusConnection *connection,
+ DBusMessage *message);
+DBusHandlerResult device_get_property (DBusConnection *connection,
+ DBusMessage *message);
+DBusHandlerResult device_get_property_type (DBusConnection *connection,
+ DBusMessage *message);
+DBusHandlerResult device_set_property (DBusConnection *connection,
+ DBusMessage *message,
+ dbus_bool_t local_interface);
+DBusHandlerResult device_add_capability (DBusConnection *connection,
+ DBusMessage *message,
+ dbus_bool_t local_interface);
+DBusHandlerResult device_remove_capability (DBusConnection *connection,
+ DBusMessage *message,
+ dbus_bool_t local_interface);
+DBusHandlerResult device_remove_property (DBusConnection *connection,
+ DBusMessage *message,
+ dbus_bool_t local_interface);
+DBusHandlerResult device_property_exists (DBusConnection *connection,
+ DBusMessage *message);
+DBusHandlerResult device_query_capability (DBusConnection *connection,
+ DBusMessage *message);
+DBusHandlerResult device_lock (DBusConnection *connection,
+ DBusMessage *message);
+DBusHandlerResult device_unlock (DBusConnection *connection,
+ DBusMessage *message);
+DBusHandlerResult manager_new_device (DBusConnection *connection,
+ DBusMessage *message,
+ dbus_bool_t local_interface);
+DBusHandlerResult manager_commit_to_gdl (DBusConnection *connection,
+ DBusMessage *message,
+ dbus_bool_t local_interface);
+DBusHandlerResult manager_remove (DBusConnection *connection,
+ DBusMessage *message,
+ dbus_bool_t local_interface);
+DBusHandlerResult merge_properties (DBusConnection *connection,
+ DBusMessage *message);
+DBusHandlerResult device_matches (DBusConnection *connection,
+ DBusMessage *message);
void manager_send_signal_device_added (HalDevice *device);
void manager_send_signal_device_removed (HalDevice *device);
diff --git a/hald/ids.c b/hald/ids.c
index e28be8f..9949eab 100644
--- a/hald/ids.c
+++ b/hald/ids.c
@@ -64,12 +64,14 @@ pci_ids_line_iter_init ()
/** Maximum length of lines in pci.ids */
#define PCI_IDS_MAX_LINE_LEN 512
-/** Get the next line from pci.ids
+/**
+ * pci_ids_line_iter_get_line:
+ * @line_len: Pointer to where number of bytes in line will
+ * be stored
+ * Returns: Pointer to the line; only valid until the
+ * next invocation of this function
*
- * @param line_len Pointer to where number of bytes in line will
- * be stored
- * @return Pointer to the line; only valid until the
- * next invocation of this function
+ * Get the next line from pci.ids
*/
static char *
pci_ids_line_iter_get_line (unsigned int *line_len)
@@ -93,9 +95,12 @@ pci_ids_line_iter_get_line (unsigned int
return line;
}
-/** See if there are more lines to process in pci.ids
+/**
+ * pci_ids_line_iter_has_more:
*
- * @return #TRUE iff there are more lines to process
+ * Returns: #TRUE iff there are more lines to process
+ *
+ * See if there are more lines to process in pci.ids
*/
static dbus_bool_t
pci_ids_line_iter_has_more ()
@@ -104,19 +109,21 @@ pci_ids_line_iter_has_more ()
}
-/** Find the names for a PCI device.
+/**
+ * ids_find_pci:
+ * @vendor_id: PCI vendor id or 0 if unknown
+ * @product_id: PCI product id or 0 if unknown
+ * @subsys_vendor_id: PCI subsystem vendor id or 0 if unknown
+ * @subsys_product_id: PCI subsystem product id or 0 if unknown
+ * @vendor_name: Set to pointer of result or NULL
+ * @product_name: Set to pointer of result or NULL
+ * @subsys_vendor_name: Set to pointer of result or NULL
+ * @subsys_product_name: Set to pointer of result or NULL
+ *
+ * Find the names for a PCI device.
*
* The pointers returned are only valid until the next invocation of this
* function.
- *
- * @param vendor_id PCI vendor id or 0 if unknown
- * @param product_id PCI product id or 0 if unknown
- * @param subsys_vendor_id PCI subsystem vendor id or 0 if unknown
- * @param subsys_product_id PCI subsystem product id or 0 if unknown
- * @param vendor_name Set to pointer of result or NULL
- * @param product_name Set to pointer of result or NULL
- * @param subsys_vendor_name Set to pointer of result or NULL
- * @param subsys_product_name Set to pointer of result or NULL
*/
void
ids_find_pci (int vendor_id, int product_id,
@@ -265,12 +272,14 @@ ids_find_pci (int vendor_id, int product
}
-/** Load the PCI database used for mapping vendor, product, subsys_vendor
- * and subsys_product numbers into names.
+/**
+ * pci_ids_load:
+ * @path: Path of the pci.ids file, e.g. /usr/share/hwdata/pci.ids
+ *
+ * Returns: #TRUE if the file was succesfully loaded
*
- * @param path Path of the pci.ids file, e.g.
- * /usr/share/hwdata/pci.ids
- * @return #TRUE if the file was succesfully loaded
+ * Load the PCI database used for mapping vendor, product, subsys_vendor
+ * and subsys_product numbers into names.
*/
static dbus_bool_t
pci_ids_load (const char *path)
@@ -338,12 +347,14 @@ usb_ids_line_iter_init ()
/** Maximum length of lines in usb.ids */
#define USB_IDS_MAX_LINE_LEN 512
-/** Get the next line from usb.ids
+/**
+ * usb_ids_line_iter_get_line:
+ * @line_len: Pointer to where number of bytes in line will
+ * be stored
+ * Returns: Pointer to the line; only valid until the
+ * next invocation of this function
*
- * @param line_len Pointer to where number of bytes in line will
- * be stored
- * @return Pointer to the line; only valid until the
- * next invocation of this function
+ * Get the next line from usb.ids
*/
static char *
usb_ids_line_iter_get_line (unsigned int *line_len)
@@ -367,9 +378,12 @@ usb_ids_line_iter_get_line (unsigned int
return line;
}
-/** See if there are more lines to process in usb.ids
+/**
+ * usb_ids_line_iter_has_more:
+ *
+ * Returns: #TRUE iff there are more lines to process
*
- * @return #TRUE iff there are more lines to process
+ * See if there are more lines to process in usb.ids
*/
static dbus_bool_t
usb_ids_line_iter_has_more ()
@@ -377,15 +391,17 @@ usb_ids_line_iter_has_more ()
return usb_ids_iter_pos < usb_ids_len;
}
-/** Find the names for a USB device.
+/**
+ * ids_find_usb:
+ * @vendor_id: USB vendor id or 0 if unknown
+ * @product_id: USB product id or 0 if unknown
+ * @vendor_name: Set to pointer of result or NULL
+ * @product_name: Set to pointer of result or NULL
+ *
+ * Find the names for a USB device.
*
* The pointers returned are only valid until the next invocation of this
* function.
- *
- * @param vendor_id USB vendor id or 0 if unknown
- * @param product_id USB product id or 0 if unknown
- * @param vendor_name Set to pointer of result or NULL
- * @param product_name Set to pointer of result or NULL
*/
void
ids_find_usb (int vendor_id, int product_id,
@@ -478,12 +494,13 @@ ids_find_usb (int vendor_id, int product
}
}
-/** Load the USB database used for mapping vendor, product, subsys_vendor
- * and subsys_product numbers into names.
+/**
+ * usb_ids_load:
+ * @path: Path of the usb.ids file, e.g. /usr/share/hwdata/usb.ids
+ * Returns: #TRUE if the file was succesfully loaded
*
- * @param path Path of the usb.ids file, e.g.
- * /usr/share/hwdata/usb.ids
- * @return #TRUE if the file was succesfully loaded
+ * Load the USB database used for mapping vendor, product, subsys_vendor
+ * and subsys_product numbers into names.
*/
static dbus_bool_t
usb_ids_load (const char *path)
diff --git a/hald/linux/acpi.c b/hald/linux/acpi.c
index 38914d0..5ff403c 100644
--- a/hald/linux/acpi.c
+++ b/hald/linux/acpi.c
@@ -63,9 +63,11 @@ typedef struct ACPIDevHandler_s
gboolean (*refresh) (HalDevice *d, struct ACPIDevHandler_s *handler);
} ACPIDevHandler;
-/** Just sets the ac_adapter.present key when called
+/**
+ * ac_adapter_refresh_poll
+ * @d: valid ac_adaptor HalDevice
*
- * @param d valid ac_adaptor HalDevice
+ * Just sets the ac_adapter.present key when called
*/
static void
ac_adapter_refresh_poll (HalDevice *d)
@@ -243,13 +245,15 @@ battery_refresh_poll (HalDevice *d)
hal_device_property_remove (d, "battery.charge_level.percentage");
}
-/** Recalculates the battery.reporting.last_full key as this may drift
- * over time.
+/**
+ * battery_poll_infrequently:
+ * @data: Ignored
+ * Returns: TRUE if we updated values
*
- * @param data Ignored
- * @return TRUE if we updated values
+ * Recalculates the battery.reporting.last_full key as this may drift
+ * over time.
*
- * @note This is called 120x less often than battery_refresh_poll
+ * Note: This is called 120x less often than battery_refresh_poll
*/
static gboolean
battery_poll_infrequently (gpointer data) {
@@ -282,11 +286,14 @@ battery_poll_infrequently (gpointer data
}
-/** Fallback polling method to refresh battery objects is plugged in
+/**
+ * acpi_poll_battery:
*
* @return TRUE
*
- * @note This just calls battery_refresh_poll for each battery
+ * Fallback polling method to refresh battery objects is plugged in
+ *
+ * Note: This just calls battery_refresh_poll for each battery
*/
static gboolean
acpi_poll_battery (void)
@@ -317,11 +324,14 @@ acpi_poll_battery (void)
return TRUE;
}
-/** Fallback polling method to detect if the ac_adaptor is plugged in
+/**
+ * acpi_poll_acadap:
+ *
+ * Returns: TRUE
*
- * @return TRUE
+ * Fallback polling method to detect if the ac_adaptor is plugged in
*
- * @note This just calls ac_adapter_refresh_poll for each ac_adapter
+ * Note: This just calls ac_adapter_refresh_poll for each ac_adapter
*/
static gboolean
acpi_poll_acadap (void)
@@ -350,13 +360,16 @@ acpi_poll_acadap (void)
return TRUE;
}
-/** Fallback polling method called every minute.
+/**
+ * acpi_poll:
+ * @data: Ignored
*
- * @param data Ignored
- * @return TRUE
+ * Returns: TRUE
*
- * @note This just forces a poll refresh for *every* ac_adaptor
- * and primary battery in the system.
+ * Fallback polling method called every minute.
+ *
+ * Note: This just forces a poll refresh for *every* ac_adaptor
+ * and primary battery in the system.
*/
static gboolean
acpi_poll (gpointer data)
@@ -403,11 +416,13 @@ ac_adapter_refresh (HalDevice *d, ACPIDe
return TRUE;
}
-/** Removes all the possible battery.* keys.
+/**
+ * battery_refresh_remove:
+ * @d: Valid battery HalDevice
*
- * @param d Valid battery HalDevice
+ * Removes all the possible battery.* keys.
*
- * @note Removing a key that doesn't exist is OK.
+ * Note: Removing a key that doesn't exist is OK.
*/
static void
battery_refresh_remove (HalDevice *d)
@@ -449,10 +464,12 @@ battery_refresh_remove (HalDevice *d)
hal_device_property_remove (d, "battery.remaining_time");
}
-/** Adds all the possible battery.* keys and does coldplug (slowpath)
- * type calculations.
+/**
+ * battery_refresh_add:
+ * @d: Valid battery HalDevice
*
- * @param d Valid battery HalDevice
+ * Adds all the possible battery.* keys and does coldplug (slowpath)
+ * type calculations.
*/
static gboolean
battery_refresh_add (HalDevice *d, const char *path)
@@ -578,6 +595,15 @@ battery_refresh_add (HalDevice *d, const
return TRUE;
}
+/**
+ * battery_refresh:
+ * @d: Valid battery HalDevice
+ * @handler: The ACPIDevHandler.
+ *
+ * Returns: TRUE/FALSE
+ *
+ * Refresh the battery device information.
+ */
static gboolean
battery_refresh (HalDevice *d, ACPIDevHandler *handler)
{
@@ -626,6 +652,14 @@ battery_refresh (HalDevice *d, ACPIDevHa
return TRUE;
}
+/**
+ * get_processor_model_name:
+ * @proc_num: Number of processor
+ *
+ * Returns: Name of the processor model
+ *
+ * Give the model name of the processor.
+ */
static gchar *
get_processor_model_name (gint proc_num)
{
@@ -856,10 +890,12 @@ button_refresh (HalDevice *d, ACPIDevHan
return TRUE;
}
-/** Synthesizes a *specific* acpi object.
+/**
+ * acpi_synthesize_item:
+ * @fullpath: The ACPI path, e.g. "/proc/acpi/battery/BAT1"
+ * @acpi_type: The type of device, e.g. ACPI_TYPE_BATTERY
*
- * @param fullpath The ACPI path, e.g. "/proc/acpi/battery/BAT1"
- * @param acpi_type The type of device, e.g. ACPI_TYPE_BATTERY
+ * Synthesizes a *specific* acpi object.
*/
static void
acpi_synthesize_item (const gchar *fullpath, int acpi_type)
@@ -874,12 +910,14 @@ acpi_synthesize_item (const gchar *fullp
hotplug_event_enqueue (hotplug_event);
}
-/** Synthesizes generic acpi objects, i.e. registers all the objects of type
- * into HAL. This lets us have more than one type of device e.g. BATx
- * in the same battery class.
+/**
+ * acpi_synthesize:
+ * @path: The ACPI path, e.g. "/proc/acpi/battery"
+ * @acpi_type: The type of device, e.g. ACPI_TYPE_BATTERY
*
- * @param path The ACPI path, e.g. "/proc/acpi/battery"
- * @param acpi_type The type of device, e.g. ACPI_TYPE_BATTERY
+ * Synthesizes generic acpi objects, i.e. registers all the objects of type
+ * into HAL. This lets us have more than one type of device e.g. BATx
+ * in the same battery class.
*/
static void
acpi_synthesize (const gchar *path, int acpi_type)
@@ -931,12 +969,14 @@ acpi_synthesize (const gchar *path, int
g_dir_close (dir);
}
-/** If {procfs_path}/acpi/{vendor}/{display} is found, then add the
- * LaptopPanel device.
+/**
+ * acpi_synthesize_display:
+ * @vendor: The vendor name, e.g. sony
+ * @display: The *possible* name of the brightness file
+ * @method: The HAL enumerated type.
*
- * @param vendor The vendor name, e.g. sony
- * @param display The *possible* name of the brightness file
- * @param method The HAL enumerated type.
+ * If {procfs_path}/acpi/{vendor}/{display} is found, then add the
+ * LaptopPanel device.
*/
static void
acpi_synthesize_display (char *vendor, char *display, int method)
@@ -953,7 +993,10 @@ acpi_synthesize_display (char *vendor, c
static int sonypi_irq_list[] = { 11, 10, 9, 6, 5 };
-/** Synthesizes a sonypi object.
+/**
+ * acpi_synthesize_sonypi_display:
+ *
+ * Synthesizes a sonypi object.
*/
static void
acpi_synthesize_sonypi_display (void)
@@ -994,11 +1037,14 @@ acpi_synthesize_sonypi_display (void)
g_free (path);
}
-/** Scan the data structures exported by the kernel and add hotplug
- * events for adding ACPI objects.
+/**
+ * acpi_synthesize_hotplug_events:
+ *
+ * Returns: TRUE if, and only if, ACPI capabilities
+ * were detected
*
- * @return TRUE if, and only if, ACPI capabilities
- * were detected
+ * Scan the data structures exported by the kernel and add hotplug
+ * events for adding ACPI objects.
*/
gboolean
acpi_synthesize_hotplug_events (void)
diff --git a/hald/linux/addons/addon-acpi-buttons-toshiba.c b/hald/linux/addons/addon-acpi-buttons-toshiba.c
index eb833ef..f336992 100644
--- a/hald/linux/addons/addon-acpi-buttons-toshiba.c
+++ b/hald/linux/addons/addon-acpi-buttons-toshiba.c
@@ -49,7 +49,11 @@
static LibHalContext *ctx = NULL;
static char* udi;
-/** Flush keys from the Toshiba hotkey register */
+/**
+ * toshiba_key_flush:
+ *
+ * Flush keys from the Toshiba hotkey register
+ */
static void
toshiba_key_flush (void)
{
@@ -71,10 +75,13 @@ toshiba_key_flush (void)
fclose (fp);
}
-/** Check whether there is a new event in the hotkey register
+/**
+ * toshiba_key_ready:
+ * @value: The key id pressed, passed by reference
+ *
+ * Returns: TRUE if there is an event pending, FALSE if no event pending.
*
- * @param value The key id pressed, passed by reference
- * @returns TRUE if there is an event pending, FALSE if no event pending.
+ * Check whether there is a new event in the hotkey register
*/
static gboolean
toshiba_key_ready (int *value)
@@ -97,9 +104,12 @@ toshiba_key_ready (int *value)
return FALSE;
}
-/** Callback to poll hotkey register and report occuring events.
+/**
+ * toshiba_key_poll:
*
- * @returns TRUE on success, else FALSE.
+ * Returns: TRUE on success, else FALSE.
+ *
+ * Callback to poll hotkey register and report occuring events.
*/
static gboolean
toshiba_key_poll (void)
@@ -142,8 +152,7 @@ toshiba_key_poll (void)
return TRUE;
}
-/** Main program
- */
+/* Main program */
int
main (int argc, char **argv)
{
diff --git a/hald/linux/addons/addon-cpufreq-userspace.c b/hald/linux/addons/addon-cpufreq-userspace.c
index 953d46a..af1ef73 100644
--- a/hald/linux/addons/addon-cpufreq-userspace.c
+++ b/hald/linux/addons/addon-cpufreq-userspace.c
@@ -34,14 +34,14 @@
#include "addon-cpufreq-userspace.h"
#include "../../logger.h"
-/** at which load difference (in percent) we should immediately switch to
+/* at which load difference (in percent) we should immediately switch to
* the maximum possible frequency */
#define JUMP_CPUFREQ_LIMIT_MIN 20
-/** the load difference at which we jump up to the maximum freq
+/* the load difference at which we jump up to the maximum freq
* immediately is calculated by the UP_THRESHOLD multiplied with this
* relation value */
#define THRESHOLD_JUMP_LIMIT_RELATION 0.625
-/** how many frequency steps we should consider */
+/* how many frequency steps we should consider */
#define HYSTERESIS 5
#define DEFAULT_CONSIDER_NICE FALSE
#define PROC_STAT_FILE "/proc/stat"
@@ -52,7 +52,7 @@ const char SYSFS_SCALING_SETSPEED_FILE[]
const char SYSFS_SCALING_AVAILABLE_FREQS_FILE[] =
"/sys/devices/system/cpu/cpu%u/cpufreq/scaling_available_frequencies";
-/** shortcut for g_array_index */
+/* shortcut for g_array_index */
#define g_a_i(a,i) g_array_index(a, unsigned, i)
struct userspace_config {
@@ -79,7 +79,11 @@ static struct cpuload_data cpuload = { -
NULL,
NULL };
-/** frees data needed for CPU load calculation */
+/**
+ * free_cpu_load_data:
+ *
+ * frees data needed for CPU load calculation
+ */
void free_cpu_load_data(void)
{
if (cpuload.num_cpus != -1) {
@@ -93,7 +97,14 @@ void free_cpu_load_data(void)
}
}
-/** calculates current cpu load and stores it in cpuload_data object */
+/**
+ * calc_cpu_load:
+ * @consider_nice:
+ *
+ * Returns:
+ *
+ * calculates current cpu load and stores it in cpuload_data object
+ */
static int calc_cpu_load(const int consider_nice)
{
unsigned long total_elapsed, working_elapsed;
@@ -187,7 +198,14 @@ static int calc_cpu_load(const int consi
return 0;
}
-/** returns current cpuload which has been caluclated before */
+/**
+ * get_cpu_load:
+ * @cpu_id: The ID of the CPU
+ *
+ * Returns: returns current cpuload which has been caluclated before
+ *
+ * To get the current CPU load for a given CPU.
+ */
static int get_cpu_load(const int cpu_id)
{
if (cpu_id < -1) {
@@ -239,7 +257,15 @@ static void reinit_speed(struct userspac
HAL_DEBUG(("forced speed to %d kHz", g_a_i(iface->speeds_kHz, current_speed)));
}
-/** @brief set a speed with traversing all intermediary speeds */
+/**
+ * set_speed:
+ * @iface: struct with the userspace interface
+ * @target_speed the speed to set
+ *
+ * Returns: the current speed as integer value
+ *
+ * Set a speed with traversing all intermediary speeds
+ */
static int set_speed(struct userspace_interface *iface, int target_speed)
{
int delta;
@@ -261,12 +287,16 @@ static int set_speed(struct userspace_in
return current_speed;
}
-/** @brief set speed to the next higher supported value
+/**
+ * increase_speed:
+ * @iface: struct with the userspace interface
+ *
+ * Returns: integer with result of increase speed
+ * 0 if maximum is already reached
+ * 1 if new speed could be set
+ * -1 if mode is not userspace
*
- * @return integer with result of increase speed
- * @retval 0 if maximum is already reached
- * @retval 1 if new speed could be set
- * @retval -1 if mode is not userspace
+ * set speed to the next higher supported value
*/
static int increase_speed(struct userspace_interface *iface)
{
@@ -285,12 +315,13 @@ static int increase_speed(struct userspa
return new_speed;
}
-/** @brief set speed to the next lower supported value
+/**
+ * decrease_speed:
+ * @iface: struct with the userspace interface
+ *
+ * Returns: integer with result of decrease speed
*
- * @return integer with result of increase speed
- * @retval 0 if maximum is already reached
- * @retval 1 if new speed could be set
- * @retval -1 if mode is not userspace
+ * set speed to the next lower supported value
*/
static int decrease_speed(struct userspace_interface *iface)
{
@@ -310,7 +341,14 @@ static int decrease_speed(struct userspa
return new_speed;
}
-/** increases and decreases speeds */
+/**
+ * adjust_speed:
+ * @iface: struct with the userspace interface
+ *
+ * Returns: TRUE/FALSE
+ *
+ * increases and decreases speeds
+ */
static gboolean adjust_speed(struct userspace_interface *iface)
{
GSList *cpus = (GSList*)iface->cpus;
@@ -362,7 +400,7 @@ static gboolean adjust_speed(struct user
return TRUE;
}
-/** @brief create the hysteresis array */
+/* create the hysteresis array */
static void create_hysteresis_array(struct userspace_interface *iface)
{
g_array_free(iface->demotion, TRUE);
@@ -425,7 +463,14 @@ static gboolean read_frequencies(struct
return TRUE;
}
-/** calculates current cpu load and traverses all existing interfaces */
+/**
+ * userspace_adjust_speeds:
+ * @cpufreq_objs: List with with CPU Freq objects
+ *
+ * Returns: Result of the call (TRUE/FALSE)
+ *
+ * calculates current cpu load and traverses all existing interfaces
+ */
gboolean userspace_adjust_speeds(GSList *cpufreq_objs)
{
GSList *it = NULL;
@@ -445,8 +490,16 @@ gboolean userspace_adjust_speeds(GSList
return TRUE;
}
-/** inits one userspace interface with the given cores list. iface has to
- * be allocated before passing it to that fucntion */
+/**
+ * userspace_init:
+ * @iface: allocated struct with the userspace interface
+ * @cpus: list of CPU cores
+ *
+ * Returns: TRUE/FALSE
+ *
+ * Inits one userspace interface with the given cores list. iface has to
+ * be allocated before passing it to that fucntion
+ */
gboolean userspace_init(struct userspace_interface *iface, GSList *cpus)
{
if (iface == NULL)
@@ -473,7 +526,12 @@ gboolean userspace_init(struct userspace
return TRUE;
}
-/** frees the userspace data */
+/**
+ * userspace_free:
+ * @data: userspace interface object to free
+ *
+ * frees the userspace data
+ */
void userspace_free(void *data)
{
struct userspace_interface *iface = data;
@@ -482,8 +540,15 @@ void userspace_free(void *data)
g_array_free(iface->demotion, TRUE);
}
-/** sets the performance of the userspace governor. num has to be between
- * 1 and 100 */
+/**
+ * userspace_set_performance:
+ * @data: userspace interface struct
+ * @up_threshold: performance value for the userspace governor
+ *
+ * Returns: TRUE/FALSE
+ *
+ * Sets the performance of the userspace governor. num has to be between 1 and 100
+ */
gboolean userspace_set_performance(void *data, int up_threshold)
{
struct userspace_interface *iface = data;
@@ -502,14 +567,27 @@ gboolean userspace_set_performance(void
return TRUE;
}
-/** return the current performance setting */
+/**
+ * userspace_get_performance:
+ *
+ * Returns: current performance setting
+ *
+ * Return the current performance setting
+ */
int userspace_get_performance(void)
{
return config.up_threshold;
}
-/** sets whether niced processes should be considered when calculating CPU
- * load */
+/**
+ * userspace_set_consider_nice_
+ * @data: void pointer
+ * @consider: if process should be considered nice
+ *
+ * Returns: TRUE/FALSE
+ *
+ * sets whether niced processes should be considered when calculating CPU load
+*/
gboolean userspace_set_consider_nice(void *data, gboolean consider)
{
HAL_DEBUG(("consider nice set to %d for userspace", consider));
@@ -517,7 +595,13 @@ gboolean userspace_set_consider_nice(voi
return TRUE;
}
-/** return the current consider nice setting */
+/**
+ * userspace_get_consider_nice:
+ *
+ * Returns: TRUE/FALSE
+ *
+ * Return the current consider nice setting.
+ */
gboolean userspace_get_consider_nice(void)
{
return config.consider_nice;
diff --git a/hald/linux/addons/addon-cpufreq-userspace.h b/hald/linux/addons/addon-cpufreq-userspace.h
index 4424de2..3a67f82 100644
--- a/hald/linux/addons/addon-cpufreq-userspace.h
+++ b/hald/linux/addons/addon-cpufreq-userspace.h
@@ -45,7 +45,7 @@ gboolean userspace_init (struct usersp
GSList *cpus);
gboolean userspace_set_performance (void *data,
- int performance);
+ int up_threshold);
int userspace_get_performance (void);
diff --git a/hald/linux/addons/addon-cpufreq.c b/hald/linux/addons/addon-cpufreq.c
index 1a167a3..1b330c5 100644
--- a/hald/linux/addons/addon-cpufreq.c
+++ b/hald/linux/addons/addon-cpufreq.c
@@ -147,8 +147,16 @@ gboolean write_line(const char *filename
return TRUE;
}
-/** reads one line from filename, splits it by delim and returns a two
- * dimension array of strings or NULL on error */
+/**
+ * read_line_str_split:
+ * @filename: Filename
+ * @delim: The delimiter to split
+ *
+ * Returns: The splitted line as array
+ *
+ * Reads one line from filename, splits it by delim and returns a two
+ * dimension array of strings or NULL on error
+ */
static gchar **read_line_str_split(char *filename, gchar *delim)
{
gchar line[MAX_LINE_SIZE];
@@ -177,8 +185,17 @@ static gchar **read_line_str_split(char
return l;
}
-/** reads one line from filename, splits its integers by delim and stores
- * all items in the given list */
+/**
+ * read_line_int_split:
+ * @filename: Filename
+ * @delim: The delimiter to split
+ * @list: List with the splitted integers
+ *
+ * Returns: TRUE/FALSE
+ *
+ * Reads one line from filename, splits its integers by delim and stores
+ * all items in the given list
+ */
gboolean read_line_int_split(char *filename, gchar *delim, GSList **list)
{
gchar **l;
@@ -440,9 +457,17 @@ static void ondemand_free(void *data)
/********************* main interface *********************/
-/** sets the performance for all cpufreq objects
+/**
+ * set_performance:
+ * @connection: connection to D-Bus
+ * @message: Message
+ * @performance: performance value to set
+ *
+ * Returns: TRUE/FALSE
*
* @raises NoSuitableGoveror
+ *
+ * sets the performance for all cpufreq objects
*/
static gboolean set_performance(DBusConnection *connection, DBusMessage *message,
int performance)
@@ -481,9 +506,17 @@ static gboolean set_performance(DBusConn
return TRUE;
}
-/** sets the performance for all cpufreq objects
+/**
+ * get_performance:
+ * @connection: connection to D-Bus
+ * @message: Message
+ * @performance: pointer to return the current performance value
+ *
+ * Returns: TRUE/FALSE
*
* @raises (NoSuitableGoveror|GeneralError)
+ *
+ * sets the performance for all cpufreq objects
*/
static gboolean get_performance(DBusConnection *connection, DBusMessage *message,
int *performance)
@@ -523,9 +556,17 @@ static gboolean get_performance(DBusConn
return TRUE;
}
-/** sets the performance for all cpufreq objects
+/**
+ * set_consider_nice:
+ * @connection: connection to D-Bus
+ * @message: Message
+ * @consider: TRUE if should set consider nice
+ *
+ * Returns: TRUE/FALSE
*
* @raises NoSuitableGoveror
+ *
+ * sets consider nice to all cpufreq opjects.
*/
static gboolean set_consider_nice(DBusConnection *connection, DBusMessage *message,
gboolean consider)
@@ -545,9 +586,17 @@ static gboolean set_consider_nice(DBusCo
return TRUE;
}
-/** sets the performance for all cpufreq objects
+/**
+ * get_consider_nice:
+ * @connection: connection to D-Bus
+ * @message: Message
+ * @consider: pointer to return the current state of consider nice
+ *
+ * Returns: TRUE/FALSE
*
* @raises NoSuitableGoveror
+ *
+ * Gets consider nice state.
*/
static gboolean get_consider_nice(DBusConnection *connection, DBusMessage *message,
int *consider)
@@ -566,9 +615,17 @@ static gboolean get_consider_nice(DBusCo
return TRUE;
}
-/** stores a list of all available governors in the given list.
+/**
+ * get_available_governors:
+ * @connection: connection to D-Bus
+ * @message: Message
+ * @governors: to return the current available governors.
+ *
+ * Returns: TRUE/FALSE
*
* @raises GeneralError
+ *
+ * Gets the names of all availabe governors.
*/
static gboolean get_available_governors(DBusConnection *connection, DBusMessage *message,
gchar ***governors)
@@ -588,9 +645,17 @@ static gboolean get_available_governors(
return TRUE;
}
-/** sets a governor for all cpufreq objects
+/**
+ * set_governors:
+ * @connection: connection to D-Bus
+ * @message: Message
+ * @governor: name of the governor to set
*
- * @raises (GeneralError|UnknownGovernor|GovernorInitFailed)
+ * Returns: TRUE/FALSE
+ *
+ * @raises (GeneralError|UnknownGovernor|GovernorInitFailed)
+ *
+ * sets a governor for all cpufreq objects.
*/
static gboolean set_governors(DBusConnection *connection, DBusMessage *message,
const char *governor)
@@ -718,9 +783,17 @@ static gboolean set_governors(DBusConnec
return TRUE;
}
-/** gets the current governor which is set for all cpufreq objects
+/**
+ * get_governors:
+ * @connection: connection to D-Bus
+ * @message: Message
+ * @governor: pointer to the name of the current set governor
*
- * @raises GeneralError
+ * Returns: TRUE/FALSE
+ *
+ * @raises GeneralError
+ *
+ * gets the current governor which is set for all cpufreq objects
*/
static gboolean get_governors(DBusConnection *connection, DBusMessage *message,
char *governor)
@@ -747,8 +820,17 @@ static gboolean get_governors(DBusConnec
/********************* DBus stuff *********************/
-/** raises the NoSuitableGovernor error with the given method in the
- * detail field */
+/**
+ * dbus_raise_no_suitable_governor:
+ * @connection: connection to D-Bus
+ * @message: Message
+ * @method: name of the method
+ *
+ * Returns: TRUE/FALSE
+ *
+ * Raises the NoSuitableGovernor error with the given method in the
+ * detail field
+ */
static gboolean dbus_raise_no_suitable_governor(DBusConnection *connection,
DBusMessage *message,
char *method)
@@ -759,8 +841,17 @@ static gboolean dbus_raise_no_suitable_g
method);
}
-/** raises the GovernorInitFailed error with the given governor in the
- * detail field */
+/**
+ * dbus_raise_governor_init_failed:
+ * @connection: connection to D-Bus
+ * @message: Message
+ * @governor: name of the governor
+ *
+ * Returns: TRUE/FALSE
+ *
+ * Raises the GovernorInitFailed error with the given governor in the
+ * detail field
+ */
static gboolean dbus_raise_governor_init_failed(DBusConnection *connection,
DBusMessage *message,
char *governor)
@@ -771,7 +862,18 @@ static gboolean dbus_raise_governor_init
governor);
}
-/** raises the given error_name with the format in the detail field */
+/**
+ * dbus_raise_error:
+ * @connection: connection to D-Bus
+ * @message: Message
+ * @error_name: name of the error
+ * @format: to format the error message
+ * @...: more args
+ *
+ * Returns: TRUE/FALSE
+ *
+ * Raises the given error_name with the format in the detail field
+ */
static gboolean dbus_raise_error(DBusConnection *connection, DBusMessage *message,
const char *error_name, char *format, ...)
{
@@ -806,7 +908,16 @@ static gboolean dbus_raise_error(DBusCon
}
#ifdef HAVE_POLKIT
-/** checks if caller of message possesses the CPUFREQ_POLKIT_PRIVILGE */
+/**
+ * dbus_is_privileged:
+ * @connection: connection to D-Bus
+ * @message: Message
+ * @error: the error
+ *
+ * Returns: TRUE if the caller is privileged
+ *
+ * checks if caller of message possesses the CPUFREQ_POLKIT_PRIVILGE
+ */
static gboolean dbus_is_privileged(DBusConnection *connection, DBusMessage *message,
DBusError *error)
{
@@ -884,7 +995,17 @@ Error:
}
#endif
-/** sends a reply to message with the given data and its dbus_type */
+/**
+ * dbus_send_reply:
+ * @connection: connection to D-Bus
+ * @message: Message
+ * @type: the type of data param
+ * @data: data to send
+ *
+ * Returns: TRUE/FALSE
+ *
+ * sends a reply to message with the given data and its dbus_type
+ */
static gboolean dbus_send_reply(DBusConnection *connection, DBusMessage *message,
int dbus_type, void *data)
{
@@ -908,7 +1029,16 @@ static gboolean dbus_send_reply(DBusConn
return TRUE;
}
-/** sends a reply to message appending a list of strings */
+/**
+ * dbus_send_reply:
+ * @connection: connection to D-Bus
+ * @message: Message
+ * @list: list to send
+ *
+ * Returns: TRUE/FALSE
+ *
+ * sends a reply to message appending a list of strings
+ */
static gboolean dbus_send_reply_strlist(DBusConnection *connection, DBusMessage *message,
gchar **list)
{
@@ -944,9 +1074,17 @@ static gboolean dbus_send_reply_strlist(
return TRUE;
}
-/** gets one argument from message with the given dbus_type and stores it
- * in arg
+/**
+ * dbus_get_argument:
+ * @connection: connection to D-Bus
+ * @message: Message
+ * @dbus_error: the D-Bus error
+ * @type: the type of arg param
+ * @arg: the value to get from the message
*
+ * Returns: TRUE/FALSE
+ *
+ * gets one argument from message with the given dbus_type and stores it in arg
*/
static gboolean dbus_get_argument(DBusConnection *connection, DBusMessage *message,
DBusError *dbus_error, int dbus_type, void *arg)
@@ -975,9 +1113,17 @@ static DBusHandlerResult dbus_filter_fun
return DBUS_HANDLER_RESULT_HANDLED;
}
-/** dbus filter function
+/**
+ * dbus_filter_function:
+ * @connection: connection to D-Bus
+ * @message: message
+ * @user_data: pointer to the data
*
+ * Returns: the result
+ *
* @raises UnknownMethod
+ *
+ * D-Bus filter function
*/
static DBusHandlerResult dbus_filter_function(DBusConnection *connection,
DBusMessage *message,
@@ -1086,7 +1232,7 @@ static gboolean is_supported(void)
return TRUE;
}
-/** returns FALSE on success because it's used as a callback */
+/* returns FALSE on success because it's used as a callback */
gboolean dbus_init_local(void)
{
DBusConnection *dbus_connection;
diff --git a/hald/linux/hotplug.h b/hald/linux/hotplug.h
index 25eea1f..2daf982 100644
--- a/hald/linux/hotplug.h
+++ b/hald/linux/hotplug.h
@@ -61,7 +61,7 @@ typedef struct
struct {
char subsystem[HAL_NAME_MAX]; /* Kernel subsystem the device belongs to */
char sysfs_path[HAL_PATH_MAX]; /* Kernel device devpath */
- char device_file[HAL_PATH_MAX]; /* Device node for the device */
+ char device_file[HAL_PATH_MAX]; /* Device node for the device */
unsigned long long seqnum; /* kernel uevent sequence number */
int net_ifindex; /* Kernel ifindex for network devices */
diff --git a/hald/linux/hotplug_helper.h b/hald/linux/hotplug_helper.h
index 2767037..f92a4fe 100644
--- a/hald/linux/hotplug_helper.h
+++ b/hald/linux/hotplug_helper.h
@@ -32,14 +32,14 @@
struct hald_helper_msg
{
- unsigned int magic; /**< magic */
- unsigned long long seqnum; /**< Sequence number (may be 0 if for dev if udev has no support) */
- char action[HALD_HELPER_STRLEN]; /**< hotplug action */
- char subsystem[HALD_HELPER_STRLEN]; /**< subsystem e.g. usb, pci (only for hotplug msg) */
- char sysfs_path[HALD_HELPER_STRLEN]; /**< path into sysfs without sysfs mountpoint, e.g. /block/sda */
- char device_name[HALD_HELPER_STRLEN]; /**< absolute path of device node (only for device msg) */
- int net_ifindex; /**< For networking class devices only; the value of the ifindex file*/
- time_t time_stamp; /**< Time of day we received the hotplug event */
+ unsigned int magic; /* magic */
+ unsigned long long seqnum; /* Sequence number (may be 0 if for dev if udev has no support) */
+ char action[HALD_HELPER_STRLEN]; /* hotplug action */
+ char subsystem[HALD_HELPER_STRLEN]; /* subsystem e.g. usb, pci (only for hotplug msg) */
+ char sysfs_path[HALD_HELPER_STRLEN]; /* path into sysfs without sysfs mountpoint, e.g. /block/sda */
+ char device_name[HALD_HELPER_STRLEN]; /* absolute path of device node (only for device msg) */
+ int net_ifindex; /* For networking class devices only; the value of the ifindex file*/
+ time_t time_stamp; /* Time of day we received the hotplug event */
};
#endif /* HALD_HELPER_H */
diff --git a/hald/linux/pmu.c b/hald/linux/pmu.c
index 8d1a1e6..44c0c7c 100644
--- a/hald/linux/pmu.c
+++ b/hald/linux/pmu.c
@@ -203,11 +203,15 @@ lid_button_refresh (HalDevice *d, PMUDev
return TRUE;
}
-/** Refreshes a laptop screen connected to a PMU controller.
- * This is much simpler than ACPI as we have a *standard* ioctl to use.
+/**
+ * laptop_panel_refresh:
+ * @d: The hal device
+ * @handler: What to do
*
- * @param d The hal device
- * @param handler What to do
+ * Returns: TRUE/FALSE as result of the operation
+ *
+ * Refreshes a laptop screen connected to a PMU controller.
+ * This is much simpler than ACPI as we have a *standard* ioctl to use.
*/
static gboolean
laptop_panel_refresh (HalDevice *d, PMUDevHandler *handler)
@@ -294,10 +298,12 @@ pmu_poll (gpointer data)
return TRUE;
}
-/** Synthesizes a *specific* PMU object.
+/**
+ * pmu_synthesize_item:
+ * @fullpath: The PMU path, e.g. "/dev/pmu/info"
+ * @pmu_type: The type of device, e.g. PMU_TYPE_BATTERY
*
- * @param fullpath The PMU path, e.g. "/dev/pmu/info"
- * @param pmu_type The type of device, e.g. PMU_TYPE_BATTERY
+ * Synthesizes a *specific* PMU object.
*/
static void
pmu_synthesize_item (const gchar *fullpath, int pmu_type)
@@ -312,11 +318,13 @@ pmu_synthesize_item (const gchar *fullpa
hotplug_event_enqueue (hotplug_event);
}
-/** Scan the data structures exported by the kernel and add hotplug
- * events for adding PMU objects.
+/**
+ * pmu_synthesize_hotplug_events
*
- * @param TRUE if, and only if, PMU capabilities
- * were detected
+ * Returns: TRUE if, and only if, PMU capabilities were detected
+ *
+ * Scan the data structures exported by the kernel and add hotplug
+ * events for adding PMU objects.
*/
gboolean
pmu_synthesize_hotplug_events (void)
diff --git a/hald/linux/probing/probe-smbios.c b/hald/linux/probing/probe-smbios.c
index f74b2f0..4fb6aed 100644
--- a/hald/linux/probing/probe-smbios.c
+++ b/hald/linux/probing/probe-smbios.c
@@ -51,13 +51,16 @@
char *udi = NULL;
LibHalContext *ctx = NULL;
-/** Finds the start of a null terminated string and sets HAL
- * property if valid.
+/**
+ * setstr:
+ * @buf: The non tabbed prefixed, null terminated string
+ * @str: The strings to compare with e.g. "Vendor:"
+ * @prop: The HAL property to set
+ *
+ * Returns: TRUE is found, FALSE otherwise.
*
- * @param buf The non tabbed prefixed, null terminated string
- * @param str The strings to compare with e.g. "Vendor:"
- * @param prop The HAL property to set
- * @return TRUE is found, FALSE otherwise.
+ * Finds the start of a null terminated string and sets HAL
+ * property if valid.
*/
static int
setstr (char *buf, char *str, char *prop)
@@ -75,11 +78,14 @@ setstr (char *buf, char *str, char *prop
return FALSE;
}
-/** Main entry point
+/**
+ * main:
+ * @argc: Number of arguments given to program
+ * @argv: Arguments given to program
*
- * @param argc Number of arguments given to program
- * @param argv Arguments given to program
- * @return Return code
+ * Returns: Return code
+ *
+ * Main entry point
*/
int
main (int argc, char *argv[])
diff --git a/hald/logger.c b/hald/logger.c
index e067c19..a2d04b5 100644
--- a/hald/logger.c
+++ b/hald/logger.c
@@ -39,14 +39,6 @@
#include "logger.h"
-/**
- * @defgroup HalDaemonLogging Logging system
- * @ingroup HalDaemon
- * @brief Logging system for the HAL daemon
- * @{
- */
-
-
static int priority;
static const char *file;
static int line;
@@ -57,7 +49,10 @@ static int is_enabled = 1;
static int syslog_enabled = 0;
-/** Disable all logging
+/**
+ * logger_disable:
+ *
+ * Disable all logging
*
*/
void
@@ -66,7 +61,10 @@ logger_disable (void)
is_enabled = 0;
}
-/** Enable all logging
+/**
+ * logger_enable:
+ *
+ * Enable all logging
*
*/
void
@@ -75,7 +73,10 @@ logger_enable (void)
is_enabled = 1;
}
-/** enable usage of syslog for logging
+/**
+ * logger_enable_syslog:
+ *
+ * enable usage of syslog for logging
*
*/
void
@@ -84,7 +85,10 @@ logger_enable_syslog (void)
syslog_enabled = 1;
}
-/** disable usage of syslog for logging
+/**
+ * logger_disable_syslog:
+ *
+ * disable usage of syslog for logging
*
*/
void
@@ -93,7 +97,10 @@ logger_disable_syslog (void)
syslog_enabled = 0;
}
-/** allow setup logger from a addon/prober via the env
+/**
+ * setup_logger
+ *
+ * allow setup logger from a addon/prober via the env
*
*/
void
@@ -112,12 +119,14 @@ setup_logger (void)
syslog_enabled = 0;
}
-/** Setup logging entry
+/**
+ * logger_setup:
+ * @priority: Logging priority, one of HAL_LOGPRI_*
+ * @file: Name of file where the log entry originated
+ * @line: Line number of file
+ * @function: Name of function
*
- * @param priority Logging priority, one of HAL_LOGPRI_*
- * @param file Name of file where the log entry originated
- * @param line Line number of file
- * @param function Name of function
+ * Setup logging entry
*/
void
logger_setup (int _priority, const char *_file, int _line, const char *_function)
@@ -128,10 +137,12 @@ logger_setup (int _priority, const char
function = _function;
}
-/** Emit logging entry
+/**
+ * logger_emit:
+ * @format: Message format string, printf style
+ * @...: Parameters for message, printf style
*
- * @param format Message format string, printf style
- * @param ... Parameters for message, printf style
+ * Emit logging entry
*/
void
logger_emit (const char *format, ...)
@@ -206,8 +217,14 @@ logger_emit (const char *format, ...)
va_end (args);
}
+/**
+ * logger_forward_debug:
+ * @format: Message format string, printf style
+ * @...: Parameters for message, printf style
+ *
+ * Forward debug messages as e.g. from udev/libvolume_id.
+ */
void
-/* logger_forward_debug (const char *format, va_list args) */
logger_forward_debug (const char *format, ...)
{
va_list args;
@@ -238,5 +255,3 @@ logger_forward_debug (const char *format
va_end (args);
}
-
-/** @} */
diff --git a/hald/logger.h b/hald/logger.h
index 8e6cd96..f32216c 100644
--- a/hald/logger.h
+++ b/hald/logger.h
@@ -33,15 +33,7 @@ extern "C" {
#include <stdio.h>
#include <stdlib.h>
-/**
- * @addtogroup HalDaemonLogging
- *
- * @{
- */
-
-
-/** Logging levels for HAL daemon
- */
+/* Logging levels for HAL daemon */
enum {
HAL_LOGPRI_TRACE = (1 << 0), /**< function call sequences */
HAL_LOGPRI_DEBUG = (1 << 1), /**< debug statements in code */
@@ -86,8 +78,6 @@ void setup_logger (void);
/** Macro for terminating the program on an unrecoverable error */
#define DIE(expr) do {printf("*** [DIE] %s:%s():%d : ", __FILE__, __FUNCTION__, __LINE__); printf expr; printf("\n"); exit(1); } while(0)
-/** @} */
-
#endif /* LOGGER_H */
#ifdef __cplusplus
diff --git a/hald/rule.h b/hald/rule.h
index b386fc9..b0c8ed3 100644
--- a/hald/rule.h
+++ b/hald/rule.h
@@ -31,7 +31,7 @@
#define __RULE__H__
/* rule type to process */
-enum rule_type {
+typedef enum {
RULE_UNKNOWN,
RULE_MATCH,
RULE_MERGE,
@@ -41,10 +41,10 @@ enum rule_type {
RULE_CLEAR,
RULE_SPAWN,
RULE_EOF,
-};
+} rule_type;
/* type of merge command */
-enum merge_type {
+typedef enum {
MERGE_UNKNOWN,
MERGE_STRING,
MERGE_BOOLEAN,
@@ -54,11 +54,10 @@ enum merge_type {
MERGE_COPY_PROPERTY,
MERGE_STRLIST,
MERGE_REMOVE,
-};
+} merge_type;
/* type of match command */
-enum
-match_type {
+typedef enum {
MATCH_UNKNOWN,
MATCH_STRING,
MATCH_INT,
@@ -79,16 +78,16 @@ match_type {
MATCH_COMPARE_GT,
MATCH_COMPARE_GE,
MATCH_SIBLING_CONTAINS
-};
+} match_type;
/* a "rule" structure that is a generic node of the fdi file */
struct rule {
size_t rule_size; /* offset to next rule in the list (aligned to 4 bytes) */
u_int32_t jump_position; /* the rule to jumo position (aligned to 4 bytes) */
- enum rule_type rtype; /* type of rule */
- enum match_type type_match;
- enum merge_type type_merge;
+ rule_type rtype; /* type of rule */
+ match_type type_match;
+ merge_type type_merge;
u_int32_t value_offset; /* offset to keys value (aligned to 4 bytes) */
size_t value_len; /* length of keys value */
diff --git a/hald/solaris/osspec.c b/hald/solaris/osspec.c
index f3c0fdb..eca1d11 100644
--- a/hald/solaris/osspec.c
+++ b/hald/solaris/osspec.c
@@ -90,10 +90,13 @@ osspec_filter_function (DBusConnection *
return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
}
-/** Find the closest ancestor by looking at devfs paths
+/**
+ * hal_util_find_closest_ancestor:
+ * @devfs_path: Path into devfs, e.g. /pci at 0,0/pci1025,57 at 10,2/storage at 1
*
- * @param devfs_path Path into devfs, e.g. /pci at 0,0/pci1025,57 at 10,2/storage at 1
- * @return Parent Hal Device Object or #NULL if there is none
+ * Returns: Parent Hal Device Object or #NULL if there is none
+ *
+ * Find the closest ancestor by looking at devfs paths
*/
HalDevice *
hal_util_find_closest_ancestor (const gchar *devfs_path, gchar **ancestor_devfs_path, gchar **hotplug_devfs_path)
diff --git a/hald/util.c b/hald/util.c
index ecff7dc..0356943 100644
--- a/hald/util.c
+++ b/hald/util.c
@@ -459,22 +459,21 @@ hal_util_grep_discard_existing_data (voi
_grep_can_reuse = FALSE;
}
-/** Given a directory and filename, open the file and search for the
+/**
+ * hal_util_grep_file:
+ * @directory: Directory, e.g. "/proc/acpi/battery/BAT0"
+ * @file: File, e.g. "info"
+ * @linestart: Start of line, e.g. "serial number"
+ * @reuse: Whether we should reuse the file contents if the file is the same; can be
+ * cleared with hal_util_grep_discard_existing_data()
+ * Returns: NULL if not found, otherwise the remainder of the line, e.g.
+ * ": 21805" if the file /proc/acpi/battery/BAT0 contains
+ * this line "serial number: 21805". The string is only valid
+ * until the next invocation of this function.
+ *
+ * Given a directory and filename, open the file and search for the
* first line that starts with the given linestart string. Returns
* the rest of the line as a string if found.
- *
- * @param directory Directory, e.g. "/proc/acpi/battery/BAT0"
- * @param file File, e.g. "info"
- * @param linestart Start of line, e.g. "serial number"
- * @param reuse Whether we should reuse the file contents
- * if the file is the same; can be cleared
- * with hal_util_grep_discard_existing_data()
- * @return NULL if not found, otherwise the remainder
- * of the line, e.g. ": 21805" if
- * the file /proc/acpi/battery/BAT0 contains
- * this line "serial number: 21805"
- * The string is only valid until the next
- * invocation of this function.
*/
gchar *
hal_util_grep_file (const gchar *directory, const gchar *file, const gchar *linestart, gboolean reuse)
@@ -548,20 +547,19 @@ out:
return result;
}
-/** Given a directory and filename, open the file and search for the
+/**
+ * hal_util_grep_file_next_line:
+ * @directory: Directory, e.g. "/proc/acpi/battery/BAT0"
+ * @file: File, e.g. "info"
+ * @linestart: Start of line, e.g. "serial number"
+ * @reuse: Whether we should reuse the file contents if the file is the same; can be
+ * cleared with hal_util_grep_discard_existing_data()
+ * Returns: NULL if not found, otherwise the next line. The string is only valid
+ * until the next invocation of this function.
+ *
+ * Given a directory and filename, open the file and search for the
* first line that starts with the given linestart string. Returns
* the next line as a string if found.
- *
- * @param directory Directory, e.g. "/proc/acpi/battery/BAT0"
- * @param file File, e.g. "info"
- * @param linestart Start of line, e.g. "serial number"
- * @param reuse Whether we should reuse the file contents
- * if the file is the same; can be cleared
- * with hal_util_grep_discard_existing_data()
- * @return NULL if not found, otherwise the next
- * line.
- * The string is only valid until the next
- * invocation of this function.
*/
gchar *
hal_util_grep_file_next_line (const gchar *directory, const gchar *file, const gchar *linestart, gboolean reuse)
@@ -716,7 +714,21 @@ out:
return value;
}
-/** Get a string value from a formatted text file and assign it to
+/**
+ * hal_util_set_string_elem_from_file:
+ * @d: Device object
+ * @key: Property name
+ * @directory: Directory, e.g. "/proc/acpi/battery/BAT0"
+ * @file: File, e.g. "info"
+ * @linestart: Start of line, e.g. "design voltage"
+ * @elem: Element number after linestart to extract
+ * excluding whitespace and ':' characters.
+ * If set to G_MAXUINT then all elements are set
+ *
+ * Returns: TRUE, if, and only if, the value could be
+ * extracted and the property was set
+ *
+ * Get a string value from a formatted text file and assign it to
* a property on a device object.
*
* Example: Given that the file /proc/acpi/battery/BAT0/info contains
@@ -727,17 +739,6 @@ out:
* then hal_util_set_string_elem_from_file (d, "battery.foo",
* "/proc/acpi/battery/BAT0", "info", "design voltage", 1) will assign
* the string "mV" to the property "battery.foo" on d.
- *
- * @param d Device object
- * @param key Property name
- * @param directory Directory, e.g. "/proc/acpi/battery/BAT0"
- * @param file File, e.g. "info"
- * @param linestart Start of line, e.g. "design voltage"
- * @param elem Element number after linestart to extract
- * excluding whitespace and ':' characters.
- * If set to G_MAXUINT then all elements are set
- * @return TRUE, if, and only if, the value could be
- * extracted and the property was set
*/
gboolean
hal_util_set_string_elem_from_file (HalDevice *d, const gchar *key,
@@ -757,7 +758,20 @@ out:
return res;
}
-/** Get an integer value from a formatted text file and assign it to
+/**
+ * hal_util_set_int_elem_from_file:
+ * @d: Device object
+ * @key: Property name
+ * @directory: Directory, e.g. "/proc/acpi/battery/BAT0"
+ * @file: File, e.g. "info"
+ * @linestart: Start of line, e.g. "design voltage"
+ * @elem : Element number after linestart to extract
+ * excluding whitespace and ':' characters.
+ *
+ * Returns: TRUE, if, and only if, the value could be
+ * extracted and the property was set
+ *
+ * Get an integer value from a formatted text file and assign it to
* a property on a device object.
*
* Example: Given that the file /proc/acpi/battery/BAT0/info contains
@@ -768,16 +782,6 @@ out:
* then hal_util_set_int_elem_from_file (d, "battery.foo",
* "/proc/acpi/battery/BAT0", "info", "design voltage", 0) will assign
* the integer 10800 to the property "battery.foo" on d.
- *
- * @param d Device object
- * @param key Property name
- * @param directory Directory, e.g. "/proc/acpi/battery/BAT0"
- * @param file File, e.g. "info"
- * @param linestart Start of line, e.g. "design voltage"
- * @param elem Element number after linestart to extract
- * excluding whitespace and ':' characters.
- * @return TRUE, if, and only if, the value could be
- * extracted and the property was set
*/
gboolean
hal_util_set_int_elem_from_file (HalDevice *d, const gchar *key,
@@ -806,7 +810,21 @@ out:
}
-/** Get a value from a formatted text file, test it against a given
+/**
+ * hal_util_set_bool_elem_from_file:
+ * @d: Device object
+ * @key: Property name
+ * @directory: Directory, e.g. "/proc/acpi/battery/BAT0"
+ * @file: File, e.g. "info"
+ * @linestart: Start of line, e.g. "design voltage"
+ * @elem: Element number after linestart to extract
+ * excluding whitespace and ':' characters.
+ * @expected: Value to test against
+ *
+ * Returns: TRUE, if, and only if, the value could be
+ * extracted and the property was set
+ *
+ * Get a value from a formatted text file, test it against a given
* value, and set a boolean property on a device object with the
* test result.
*
@@ -824,17 +842,6 @@ out:
* "present: no"
*
* the value assigned will be FALSE.
- *
- * @param d Device object
- * @param key Property name
- * @param directory Directory, e.g. "/proc/acpi/battery/BAT0"
- * @param file File, e.g. "info"
- * @param linestart Start of line, e.g. "design voltage"
- * @param elem Element number after linestart to extract
- * excluding whitespace and ':' characters.
- * @param expected Value to test against
- * @return TRUE, if, and only if, the value could be
- * extracted and the property was set
*/
gboolean
hal_util_set_bool_elem_from_file (HalDevice *d, const gchar *key,
diff --git a/hald/util.h b/hald/util.h
index 93f05c8..5265b6d 100644
--- a/hald/util.h
+++ b/hald/util.h
@@ -71,7 +71,7 @@ gboolean hal_util_path_ascend (gchar *pa
void hal_util_grep_discard_existing_data (void);
-gchar *hal_util_grep_file (const gchar *directory, const gchar *file, const gchar *linestart, gboolean reuse_file);
+gchar *hal_util_grep_file (const gchar *directory, const gchar *file, const gchar *linestart, gboolean reuse);
gchar *hal_util_grep_file_next_line (const gchar *directory, const gchar *file, const gchar *linestart, gboolean reuse);
gint hal_util_grep_int_elem_from_file (const gchar *directory, const gchar *file,
diff --git a/hald/util_pm.c b/hald/util_pm.c
index 0bc62e8..ffbc021 100644
--- a/hald/util_pm.c
+++ b/hald/util_pm.c
@@ -44,14 +44,16 @@ typedef struct {
GHashTable *saved_battery_info = NULL;
-/** Convert the hardware reported value into a few sane choices
+/**
+ * util_get_battery_technology_
+ * @type: The battery type recieved from the hardware
+ *
+ * Returns: The battery technology which is one of: unknown, lithium-ion or lead-acid
+ *
+ * Convert the hardware reported value into a few sane choices
*
* This is needed as ACPI does not specify the description text for a
* battery, and so we have to calculate it from the hardware output
- *
- * @param type The battery type recieved from the hardware
- * @return The battery technology which is one of:
- * unknown, lithium-ion or lead-acid
*/
const char *
util_get_battery_technology (const char *type)
@@ -77,13 +79,15 @@ util_get_battery_technology (const char
return "unknown";
}
-/** Given all the required parameters, this function will return the percentage
- * charge remaining. There are lots of checks here as ACPI is often broken.
+/**
+ * util_compute_percentage_charge:
+ * @id: Optional ID given to this battery. Unused at present.
+ * @chargeLevel: The current charge level of the battery (typically mWh)
+ * @chargeLastFull: The last "full" charge of the battery (typically mWh)
+ * Returns: Percentage, -1 if invalid
*
- * @param id Optional ID given to this battery. Unused at present.
- * @param chargeLevel The current charge level of the battery (typically mWh)
- * @param chargeLastFull The last "full" charge of the battery (typically mWh)
- * @return Percentage, -1 if invalid
+ * Given all the required parameters, this function will return the percentage
+ * charge remaining. There are lots of checks here as ACPI is often broken.
*/
int
util_compute_percentage_charge (const char *id,
@@ -116,18 +120,21 @@ util_compute_percentage_charge (const ch
return percentage;
}
-/** Given all the required parameters, this function will return the number
+/**
+ * util_compute_time_remaining:
+ * @id: Optional ID given to this battery. Unused at present.
+ * @chargeRate: The "rate" (typically mW)
+ * @chargeLevel: The current charge level of the battery (typically mWh)
+ * @chargeLastFull: The last "full" charge of the battery (typically mWh)
+ * @isDischarging: If battery is discharging
+ * @isCharging: If battery is charging
+ * @guessChargeRate: If ignore chargeRate and guess them.
+ *
+ * Returns: Number of seconds, or -1 if invalid
+ *
+ * Given all the required parameters, this function will return the number
* of seconds until the battery is charged (if charging) or the number
* of seconds until empty (if discharging)
- *
- * @param id Optional ID given to this battery. Unused at present.
- * @param chargeRate The "rate" (typically mW)
- * @param chargeLevel The current charge level of the battery (typically mWh)
- * @param chargeLastFull The last "full" charge of the battery (typically mWh)
- * @param isDischarging If battery is discharging
- * @param isCharging If battery is charging
- * @param guessChargeRate If ignore chargeRate and guess them.
- * @return Number of seconds, or -1 if invalid
*/
int
util_compute_time_remaining (const char *id,
diff --git a/libhal-storage/libhal-storage.c b/libhal-storage/libhal-storage.c
index 5c62803..087dfeb 100644
--- a/libhal-storage/libhal-storage.c
+++ b/libhal-storage/libhal-storage.c
@@ -586,21 +586,22 @@ out:
return NULL;
}
-/** Policy function to determine if a volume should be visible in a desktop
+/**
+ * libhal_volume_policy_should_be_visible:
+ * @drive: Drive that the volume is stemming from
+ * @volume: Volume
+ * @policy: Policy object
+ * @target_mount_point: The mount point that the volume is expected to
+ * be mounted at if not already mounted. This may
+ * e.g. stem from /etc/fstab. If this is NULL the
+ * then mount point isn't taking into account when
+ * evaluating whether the volume should be visible
+ * Returns: Whether the volume should be shown in a desktop
+ * environment.
+ * Policy function to determine if a volume should be visible in a desktop
* environment. This is useful to hide certain system volumes as bootstrap
* partitions, the /usr partition, swap partitions and other volumes that
* a unprivileged desktop user shouldn't know even exists.
- *
- * @param drive Drive that the volume is stemming from
- * @param volume Volume
- * @param policy Policy object
- * @param target_mount_point The mount point that the volume is expected to
- * be mounted at if not already mounted. This may
- * e.g. stem from /etc/fstab. If this is NULL the
- * then mount point isn't taking into account when
- * evaluating whether the volume should be visible
- * @return Whether the volume should be shown in a desktop
- * environment.
*/
dbus_bool_t
libhal_volume_policy_should_be_visible (LibHalDrive *drive, LibHalVolume *volume, LibHalStoragePolicy *policy,
@@ -789,9 +790,11 @@ libhal_drive_get_dedicated_icon_volume (
return drive->dedicated_icon_volume;
}
-/** Free all resources used by a LibHalDrive object.
+/**
+ * libhal_drive_free:
+ * @drive: Object to free
*
- * @param drive Object to free
+ * Free all resources used by a LibHalDrive object.
*/
void
libhal_drive_free (LibHalDrive *drive)
@@ -818,35 +821,37 @@ libhal_drive_free (LibHalDrive *drive)
}
-/** Free all resources used by a LibHalVolume object.
+/**
+ * libhal_volume_free:
+ * @volume: Object to free
*
- * @param vol Object to free
+ * Free all resources used by a LibHalVolume object.
*/
void
-libhal_volume_free (LibHalVolume *vol)
+libhal_volume_free (LibHalVolume *volume)
{
- if (vol == NULL )
+ if (volume == NULL )
return;
- free (vol->udi);
- libhal_free_string (vol->device_file);
- libhal_free_string (vol->volume_label);
- libhal_free_string (vol->fstype);
- libhal_free_string (vol->mount_point);
- libhal_free_string (vol->fsversion);
- libhal_free_string (vol->uuid);
- libhal_free_string (vol->desired_mount_point);
- libhal_free_string (vol->mount_filesystem);
- libhal_free_string (vol->crypto_backing_volume);
- libhal_free_string (vol->storage_device);
-
- libhal_free_string (vol->partition_scheme);
- libhal_free_string (vol->partition_type);
- libhal_free_string (vol->partition_label);
- libhal_free_string (vol->partition_uuid);
- libhal_free_string_array (vol->partition_flags);
+ free (volume->udi);
+ libhal_free_string (volume->device_file);
+ libhal_free_string (volume->volume_label);
+ libhal_free_string (volume->fstype);
+ libhal_free_string (volume->mount_point);
+ libhal_free_string (volume->fsversion);
+ libhal_free_string (volume->uuid);
+ libhal_free_string (volume->desired_mount_point);
+ libhal_free_string (volume->mount_filesystem);
+ libhal_free_string (volume->crypto_backing_volume);
+ libhal_free_string (volume->storage_device);
+
+ libhal_free_string (volume->partition_scheme);
+ libhal_free_string (volume->partition_type);
+ libhal_free_string (volume->partition_label);
+ libhal_free_string (volume->partition_uuid);
+ libhal_free_string_array (volume->partition_flags);
- free (vol);
+ free (volume);
}
@@ -883,13 +888,16 @@ out:
#define LIBHAL_PROP_EXTRACT_BOOL_BITFIELD(_property_, _where_, _field_) else if (strcmp (key, _property_) == 0 && type == LIBHAL_PROPERTY_TYPE_BOOLEAN) _where_ |= libhal_psi_get_bool (&it) ? _field_ : 0
#define LIBHAL_PROP_EXTRACT_STRLIST(_property_, _where_) else if (strcmp (key, _property_) == 0 && type == LIBHAL_PROPERTY_TYPE_STRLIST) _where_ = my_strvdup (libhal_psi_get_strlist (&it))
-/** Given a UDI for a HAL device of capability 'storage', this
+/**
+ * libhal_drive_from_udi:
+ * @hal_ctx: libhal context
+ * @udi: HAL UDI
+ *
+ * Returns: LibHalDrive object or NULL if UDI is invalid
+ *
+ * Given a UDI for a HAL device of capability 'storage', this
* function retrieves all the relevant properties into convenient
* in-process data structures.
- *
- * @param hal_ctx libhal context
- * @param udi HAL UDI
- * @return LibHalDrive object or NULL if UDI is invalid
*/
LibHalDrive *
libhal_drive_from_udi (LibHalContext *hal_ctx, const char *udi)
@@ -1077,13 +1085,16 @@ libhal_drive_requires_eject (LibHalDrive
return drive->requires_eject;
}
-/** Given a UDI for a LIBHAL device of capability 'volume', this
+/**
+ * libhal_volume_from_udi:
+ * @hal_ctx: libhal context
+ * @udi: HAL UDI
+ *
+ * Returns: LibHalVolume object or NULL if UDI is invalid
+ *
+ * Given a UDI for a LIBHAL device of capability 'volume', this
* function retrieves all the relevant properties into convenient
* in-process data structures.
- *
- * @param hal_ctx libhal context
- * @param udi HAL UDI
- * @return LibHalVolume object or NULL if UDI is invalid
*/
LibHalVolume *
libhal_volume_from_udi (LibHalContext *hal_ctx, const char *udi)
@@ -1248,13 +1259,16 @@ error:
}
-/** If the volume is on a drive with a MSDOS style partition table, return
+/**
+ * libhal_volume_get_msdos_part_table_type:
+ * @volume: Volume object
+ *
+ * Returns: The partition type or -1 if volume is not
+ * a partition or the media the volume stems from
+ * isn't partition with a MS DOS style table
+ *
+ * If the volume is on a drive with a MSDOS style partition table, return
* the partition table id.
- *
- * @param volume Volume object
- * @return The partition type or -1 if volume is not
- * a partition or the media the volume stems from
- * isn't partition with a MS DOS style table
*/
int
libhal_volume_get_msdos_part_table_type (LibHalVolume *volume)
@@ -1262,13 +1276,16 @@ libhal_volume_get_msdos_part_table_type
return volume->msdos_part_table_type;
}
-/** If the volume is on a drive with a MSDOS style partition table, return
- * the partition start offset according to the partition table.
+/**
+ * libhal_volume_get_msdos_part_table_start:
+ * @volume: Volume object
*
- * @param volume Volume object
- * @return The partition start offset or -1 if volume isnt
- * a partition or the media the volume stems from
- * isn't partition with a MS DOS style table
+ * Returns: The partition start offset or -1 if volume isnt
+ * a partition or the media the volume stems from
+ * isn't partition with a MS DOS style table
+ *
+ * If the volume is on a drive with a MSDOS style partition table, return
+ * the partition start offset according to the partition table.
*/
dbus_uint64_t
libhal_volume_get_msdos_part_table_start (LibHalVolume *volume)
@@ -1276,13 +1293,16 @@ libhal_volume_get_msdos_part_table_start
return volume->msdos_part_table_start;
}
-/** If the volume is on a drive with a MSDOS style partition table, return
- * the partition size according to the partition table.
+/**
+ * libhal_volume_get_msdos_part_table_size:
+ * @volume: Volume object
*
- * @param volume Volume object
- * @return The partition size or -1 if volume is not
- * a partition or the media the volume stems from
- * isn't partition with a MS DOS style table
+ * Returns: The partition size or -1 if volume is not
+ * a partition or the media the volume stems from
+ * isn't partition with a MS DOS style table
+ *
+ * If the volume is on a drive with a MSDOS style partition table, return
+ * the partition size according to the partition table.
*/
dbus_uint64_t
libhal_volume_get_msdos_part_table_size (LibHalVolume *volume)
@@ -1292,12 +1312,15 @@ libhal_volume_get_msdos_part_table_size
/***********************************************************************/
-/** Get the drive object that either is (when given e.g. /dev/sdb) or contains
- * (when given e.g. /dev/sdb1) the given device file.
+/**
+ * libhal_drive_from_device_file:
+ * @hal_ctx: libhal context to use
+ * @device_file: Name of special device file, e.g. '/dev/hdc'
+ *
+ * Returns: LibHalDrive object or NULL if it doesn't exist
*
- * @param hal_ctx libhal context to use
- * @param device_file Name of special device file, e.g. '/dev/hdc'
- * @return LibHalDrive object or NULL if it doesn't exist
+ * Get the drive object that either is (when given e.g. /dev/sdb) or contains
+ * (when given e.g. /dev/sdb1) the given device file.
*/
LibHalDrive *
libhal_drive_from_device_file (LibHalContext *hal_ctx, const char *device_file)
@@ -1403,11 +1426,13 @@ out:
return result;
}
-/** Get the volume object for a given device file.
+/**
+ * libhal_volume_from_device_file:
+ * @hal_ctx: libhal context to use
+ * @device_file: Name of special device file, e.g. '/dev/hda5'
+ * Returns: LibHalVolume object or NULL if it doesn't exist
*
- * @param hal_ctx libhal context to use
- * @param device_file Name of special device file, e.g. '/dev/hda5'
- * @return LibHalVolume object or NULL if it doesn't exist
+ * Get the volume object for a given device file.
*/
LibHalVolume *
libhal_volume_from_device_file (LibHalContext *hal_ctx, const char *device_file)
@@ -2080,5 +2105,3 @@ libhal_drive_no_partitions_hint (LibHalD
{
return drive->no_partitions_hint;
}
-
-/** @} */
diff --git a/libhal-storage/libhal-storage.h b/libhal-storage/libhal-storage.h
index 39fec6d..a78759c 100644
--- a/libhal-storage/libhal-storage.h
+++ b/libhal-storage/libhal-storage.h
@@ -322,9 +322,9 @@ dbus_bool_t libhal_volume_disc_
dbus_bool_t libhal_volume_disc_is_appendable (LibHalVolume *volume);
LibHalVolumeDiscType libhal_volume_get_disc_type (LibHalVolume *volume);
-int libhal_volume_get_msdos_part_table_type (LibHalVolume *volume) LIBHAL_DEPRECATED;
-dbus_uint64_t libhal_volume_get_msdos_part_table_start (LibHalVolume *volume) LIBHAL_DEPRECATED;
-dbus_uint64_t libhal_volume_get_msdos_part_table_size (LibHalVolume *volume) LIBHAL_DEPRECATED;
+int libhal_volume_get_msdos_part_table_type (LibHalVolume *volume) LIBHAL_DEPRECATED;
+dbus_uint64_t libhal_volume_get_msdos_part_table_start (LibHalVolume *volume) LIBHAL_DEPRECATED;
+dbus_uint64_t libhal_volume_get_msdos_part_table_size (LibHalVolume *volume) LIBHAL_DEPRECATED;
dbus_bool_t libhal_volume_should_ignore (LibHalVolume *volume);
diff --git a/partutil/partutil.h b/partutil/partutil.h
index 61dec2f..9b6a9c5 100644
--- a/partutil/partutil.h
+++ b/partutil/partutil.h
@@ -342,7 +342,8 @@ gboolean part_add_partition
int geometry_hps, int geometry_spt);
/**
- * @device: name of device file for entire disk, e.g. /dev/sda
+ * part_change_partition:
+ * @device_file: name of device file for entire disk, e.g. /dev/sda
* @start: start offset of existing partition, in bytes
* @new_start: new start offset of partition, in bytes
* @new_size: new size of partition, in bytes
diff --git a/tools/hal-storage-mount.c b/tools/hal-storage-mount.c
index 4abeaa2..9cfe687 100644
--- a/tools/hal-storage-mount.c
+++ b/tools/hal-storage-mount.c
@@ -603,7 +603,7 @@ handle_mount (LibHalContext *hal_ctx,
} else {
/* fallback - use "disk" */
- g_snprintf (mount_point, sizeof (mount_point), "disk");
+ g_snprintf (mount_point, sizeof (mount_point), "%s", "disk");
}
/* sanitize computed mount point name, e.g. replace invalid chars with '-' */
diff --git a/tools/hal-system-power-pmu.c b/tools/hal-system-power-pmu.c
index b81abe3..4ebffa1 100644
--- a/tools/hal-system-power-pmu.c
+++ b/tools/hal-system-power-pmu.c
@@ -43,18 +43,12 @@
#define PMUDEV "/dev/pmu"
#define __u32 unsigned int
-/**
- * @defgroup HalSystemPowerPmu Use PMU specific ioctls
- * @ingroup HalMisc
+/**
+ * pmac_sleep:
*
- * @brief A commandline tool for running PMU specific ioctl's. Uses libhal
+ * Returns: Success, TRUE or FALSE
*
- * @{
- */
-
-/** Issues a sleep ioctl
- *
- * @return Success, TRUE or FALSE
+ * Issues a sleep ioctl
*/
static int
pmac_sleep (void)
@@ -83,10 +77,13 @@ pmac_sleep (void)
#endif /* ! __FreeBSD__ */
}
-/** Gets the LCD brightness
+/**
+ * pmac_get_lcd_brightness:
+ * @val: The returned brightness value, 0..15
+ *
+ * Returns: Success, TRUE or FALSE
*
- * @param val The returned brightness value, 0..15
- * @return Success, TRUE or FALSE
+ * Gets the LCD brightness
*/
static int
pmac_get_lcd_brightness (int *val)
@@ -115,10 +112,13 @@ pmac_get_lcd_brightness (int *val)
#endif /* ! __FreeBSD__ */
}
-/** Sets the LCD brightness
+/**
+ * pmac_set_lcd_brightness:
+ * @val: The brightness value we want to set, 0..15
+ *
+ * Returns: Success, TRUE or FALSE
*
- * @param val The brightness value we want to set, 0..15
- * @return Success, TRUE or FALSE
+ * Sets the LCD brightness
*/
static int
pmac_set_lcd_brightness (int val)
@@ -147,10 +147,12 @@ pmac_set_lcd_brightness (int val)
#endif /* ! __FreeBSD__ */
}
-/** Print out program usage.
+/**
+ * usage:
+ * @argc: Number of arguments given to program
+ * @argv: Arguments given to program
*
- * @param argc Number of arguments given to program
- * @param argv Arguments given to program
+ * Print out program usage.
*/
static void
usage (int argc, char *argv[])
@@ -168,11 +170,14 @@ usage (int argc, char *argv[])
"This program calls PMU specific ioctls from within scripts run by HAL.\n");
}
-/** Entry point
+/**
+ * main:
+ * @argc: Number of arguments given to program
+ * @argv: Arguments given to program
*
- * @param argc Number of arguments given to program
- * @param argv Arguments given to program
- * @return Return code
+ * @return Return code
+ *
+ * Main entry point
*/
int
main (int argc, char *argv[])
@@ -214,7 +219,3 @@ main (int argc, char *argv[])
usage (argc, argv);
return EXIT_SUCCESS;
}
-
-/**
- * @}
- */
diff --git a/tools/hal_find_by_capability.c b/tools/hal_find_by_capability.c
index 8433003..77de3f3 100644
--- a/tools/hal_find_by_capability.c
+++ b/tools/hal_find_by_capability.c
@@ -36,10 +36,12 @@
#include <libhal.h>
-/** Print out program usage.
+/**
+ * usage:
+ * @argc: Number of arguments given to program
+ * @argv: Arguments given to program
*
- * @param argc Number of arguments given to program
- * @param argv Arguments given to program
+ * Print out program usage.
*/
static void
usage (int argc, char *argv[])
@@ -62,11 +64,14 @@ usage (int argc, char *argv[])
"\n");
}
-/** Entry point
+/**
+ * main:
+ * @argc: Number of arguments given to program
+ * @argv: Arguments given to program
*
- * @param argc Number of arguments given to program
- * @param argv Arguments given to program
- * @return Return code
+ * Returns: Return code
+ *
+ * Main entry point
*/
int
main (int argc, char *argv[])
@@ -181,6 +186,3 @@ main (int argc, char *argv[])
return 0;
}
-/**
- * @}
- */
diff --git a/tools/hal_find_by_property.c b/tools/hal_find_by_property.c
index ad3af56..66e0e93 100644
--- a/tools/hal_find_by_property.c
+++ b/tools/hal_find_by_property.c
@@ -36,10 +36,12 @@
#include <libhal.h>
-/** Print out program usage.
+/**
+ * usage:
+ * @argc: Number of arguments given to program
+ * @argv: Arguments given to program
*
- * @param argc Number of arguments given to program
- * @param argv Arguments given to program
+ * Print out program usage.
*/
static void
usage (int argc, char *argv[])
@@ -49,7 +51,7 @@ usage (int argc, char *argv[])
"usage : hal-find-by-property --key <key> --string <value>\n"
" [--help] [--verbose] [--version]\n");
-/** @todo support other property types a'la hal-[get|set]-property */
+/* @todo support other property types a'la hal-[get|set]-property */
fprintf (stderr,
"\n"
@@ -66,11 +68,14 @@ usage (int argc, char *argv[])
"\n");
}
-/** Entry point
+/**
+ * main:
+ * @argc: Number of arguments given to program
+ * @argv: Arguments given to program
*
- * @param argc Number of arguments given to program
- * @param argv Arguments given to program
- * @return Return code
+ * Returns: Return code
+ *
+ * Main entry point.
*/
int
main (int argc, char *argv[])
@@ -187,7 +192,3 @@ main (int argc, char *argv[])
return 0;
}
-
-/**
- * @}
- */
diff --git a/tools/hal_get_property.c b/tools/hal_get_property.c
index ca902e3..0160924 100644
--- a/tools/hal_get_property.c
+++ b/tools/hal_get_property.c
@@ -35,21 +35,14 @@
#include <libhal.h>
-/**
- * @defgroup HalGetProperty Get HAL device property
- * @ingroup HalMisc
- *
- * @brief A commandline tool getting a property of a device. Uses libhal
- *
- * @{
- */
-
static LibHalContext *hal_ctx;
-/** Print out program usage.
+/**
+ * usage:
+ * @argc: Number of arguments given to program
+ * @argv: Arguments given to program
*
- * @param argc Number of arguments given to program
- * @param argv Arguments given to program
+ * Print out program usage.
*/
static void
usage (int argc, char *argv[])
@@ -73,11 +66,14 @@ usage (int argc, char *argv[])
"\n");
}
-/** Entry point
+/**
+ * main:
+ * @argc: Number of arguments given to program
+ * @argv: Arguments given to program
*
- * @param argc Number of arguments given to program
- * @param argv Arguments given to program
- * @return Return code
+ * Returns: Return code
+ *
+ * Main entry point
*/
int
main (int argc, char *argv[])
@@ -244,7 +240,3 @@ main (int argc, char *argv[])
return 0;
}
-
-/**
- * @}
- */
diff --git a/tools/hal_set_property.c b/tools/hal_set_property.c
index 8df3040..a99b059 100644
--- a/tools/hal_set_property.c
+++ b/tools/hal_set_property.c
@@ -50,19 +50,12 @@ enum property_op {
PROP_INVALID
};
-/**
- * @defgroup HalSetProperty Set HAL device property
- * @ingroup HalMisc
+/**
+ * usage:
+ * @argc: Number of arguments given to program
+ * @argv: Arguments given to program
*
- * @brief A commandline tool setting a property of a device. Uses libhal
- *
- * @{
- */
-
-/** Print out program usage.
- *
- * @param argc Number of arguments given to program
- * @param argv Arguments given to program
+ * Print out program usage.
*/
static void
usage (int argc, char *argv[])
@@ -97,11 +90,14 @@ usage (int argc, char *argv[])
"with an exit code different from 0\n" "\n");
}
-/** Entry point
+/**
+ * main:
+ * @argc: Number of arguments given to program
+ * @argv: Arguments given to program
*
- * @param argc Number of arguments given to program
- * @param argv Arguments given to program
- * @return Return code
+ * Returns: Return code
+ *
+ * Main entry point
*/
int
main (int argc, char *argv[])
@@ -282,7 +278,3 @@ main (int argc, char *argv[])
return rc ? 0 : 1;
}
-
-/**
- * @}
- */
diff --git a/tools/lshal.c b/tools/lshal.c
index 1d3443c..fdb7e98 100644
--- a/tools/lshal.c
+++ b/tools/lshal.c
@@ -44,17 +44,7 @@
#define __FUNCTION__ __func__
#endif
-/**
- * @defgroup HalLsHal List HAL devices
- * @ingroup HalMisc
- *
- * @brief A commandline tool, lshal, for displaying and, optionally,
- * monitor the devices managed by the HAL daemon. Uses libhal.
- *
- * @{
- */
-
-/** Macro for terminating the program on an unrecoverable error */
+/* Macro for terminating the program on an unrecoverable error */
#define DIE(expr) do {printf("*** [DIE] %s:%s():%d : ", __FILE__, __FUNCTION__, __LINE__); printf expr; printf("\n"); exit(1); } while(0)
#define UDI_BASE "/org/freedesktop/Hal/devices/"
@@ -70,9 +60,13 @@ struct Device {
char *parent;
};
-/** Generate a short name for a device
+/**
+ * short_name:
+ * @udi: Universal Device Id
+ *
+ * Returns: short name of a device
*
- * @param udi Universal Device Id
+ * Generate a short name for a device
*/
static const char *
short_name (const char *udi)
@@ -80,11 +74,12 @@ short_name (const char *udi)
return &udi[sizeof(UDI_BASE) - 1];
}
-/** Print all properties of a device
+/**
+ * print_props:
+ * @udi: Universal Device Id
*
- * @param udi Universal Device Id
+ * Print all properties of a device
*/
-
static void
print_props (const char *udi)
{
@@ -170,11 +165,12 @@ print_props (const char *udi)
libhal_free_property_set (props);
}
-/** Dumps information about a single device
+/**
+ * dump_device:
+ * @udi: Universal Device Id
*
- * @param udi Universal Device Id
+ * Dumps information about a single device
*/
-
static void
dump_device (const char *udi)
{
@@ -197,14 +193,15 @@ dump_device (const char *udi)
printf ("%s\n", short_name (udi));
}
-/** Dump all children of device
+/**
+ * dump_children:
+ * @udi: Universal Device Id of parent
+ * @num_devices: Total number of devices in device list
+ * @devices: List of devices
+ * @depth: Current recursion depth
*
- * @param udi Universal Device Id of parent
- * @param num_devices Total number of devices in device list
- * @param devices List of devices
- * @param depth Current recursion depth
+ * Dump all children of device
*/
-
static void
dump_children (char *udi, int num_devices, struct Device *devices, int depth)
{
@@ -242,8 +239,10 @@ dump_children (char *udi, int num_device
}
}
-/** Dump all devices to stdout
- *
+/**
+ * dump_devices:
+ *
+ * Dump all devices to stdout
*/
static void
dump_devices (void)
@@ -307,10 +306,13 @@ dump_devices (void)
}
}
-/** Invoked when a device is added to the Global Device List. Simply prints
- * a message on stdout.
+/**
+ * device_added:
+ * @ctx: The HAL Context
+ * @udi: Universal Device Id
*
- * @param udi Universal Device Id
+ * Invoked when a device is added to the Global Device List. Simply prints
+ * a message on stdout.
*/
static void
device_added (LibHalContext *ctx,
@@ -326,10 +328,13 @@ device_added (LibHalContext *ctx,
printf ("%s added\n", short_name (udi));
}
-/** Invoked when a device is removed from the Global Device List. Simply
- * prints a message on stdout.
+/**
+ * device_removed:
+ * @ctx: The HAL Context
+ * @udi: Universal Device Id
*
- * @param udi Universal Device Id
+ * Invoked when a device is removed from the Global Device List. Simply
+ * prints a message on stdout.
*/
static void
device_removed (LibHalContext *ctx,
@@ -344,11 +349,14 @@ device_removed (LibHalContext *ctx,
printf ("%s removed\n", short_name (udi));
}
-/** Invoked when device in the Global Device List acquires a new capability.
- * Prints the name of the capability to stdout.
+/**
+ * device_new_capability:
+ * @ctx: The HAL Context
+ * @udi: Universal Device Id
+ * @capability: Name of capability
*
- * @param udi Universal Device Id
- * @param capability Name of capability
+ * Invoked when device in the Global Device List acquires a new capability.
+ * Prints the name of the capability to stdout.
*/
static void
device_new_capability (LibHalContext *ctx,
@@ -366,11 +374,14 @@ device_new_capability (LibHalContext *ct
capability);
}
-/** Invoked when device in the Global Device List loses a capability.
- * Prints the name of the capability to stdout.
- *
- * @param udi Universal Device Id
- * @param capability Name of capability
+/**
+ * device_lost_capability:
+ * @ctx: The HAL Context
+ * @udi: Universal Device Id
+ * @capability: Name of capability
+ *
+ * Invoked when device in the Global Device List loses a capability.
+ * Prints the name of the capability to stdout.
*/
static void
device_lost_capability (LibHalContext *ctx,
@@ -388,10 +399,12 @@ device_lost_capability (LibHalContext *c
capability);
}
-/** Acquires and prints the value of of a property to stdout.
+/**
+ * print_property:
+ * @udi: Universal Device Id
+ * @key: Key of property
*
- * @param udi Universal Device Id
- * @param key Key of property
+ * Acquires and prints the value of of a property to stdout.
*/
static void
print_property (const char *udi, const char *key)
@@ -465,11 +478,16 @@ print_property (const char *udi, const c
dbus_error_free (&error);
}
-/** Invoked when a property of a device in the Global Device List is
- * changed, and we have we have subscribed to changes for that device.
- *
- * @param udi Univerisal Device Id
- * @param key Key of property
+/**
+ * property_modified:
+ * @ctx: The HAL Context
+ * @udi: Univerisal Device Id
+ * @key: Key of property
+ * @is_removed: if the property was removed
+ * @is_added: if the property was added
+ *
+ * Invoked when a property of a device in the Global Device List is
+ * changed, and we have we have subscribed to changes for that device.
*/
static void
property_modified (LibHalContext *ctx,
@@ -506,12 +524,15 @@ property_modified (LibHalContext *ctx,
}
-/** Invoked when a property of a device in the Global Device List is
- * changed, and we have we have subscribed to changes for that device.
+/**
+ * device_condition:
+ * @ctx: The HAL Context
+ * @udi: Univerisal Device Id
+ * @condition_name: Name of condition
+ * @message: D-BUS message with parameters
*
- * @param udi Univerisal Device Id
- * @param condition_name Name of condition
- * @param message D-BUS message with parameters
+ * Invoked when a property of a device in the Global Device List is
+ * changed, and we have we have subscribed to changes for that device.
*/
static void
device_condition (LibHalContext *ctx,
@@ -534,10 +555,12 @@ device_condition (LibHalContext *ctx,
}
-/** Print out program usage.
+/**
+ * usage:
+ * @argc: Number of arguments given to program
+ * @argv: Arguments given to program
*
- * @param argc Number of arguments given to program
- * @param argv Arguments given to program
+ * Print out program usage.
*/
static void
usage (int argc, char *argv[])
@@ -564,11 +587,14 @@ usage (int argc, char *argv[])
"\n");
}
-/** Entry point
+/**
+ * main:
+ * @argc: Number of arguments given to program
+ * @argv: Arguments given to program
+ *
+ * Returns: Return code
*
- * @param argc Number of arguments given to program
- * @param argv Arguments given to program
- * @return Return code
+ * Main entry point
*/
int
main (int argc, char *argv[])
@@ -731,6 +757,3 @@ main (int argc, char *argv[])
return 0;
}
-/**
- * @}
- */
More information about the hal-commit
mailing list