1N/A/*************************************************************************** 1N/A * Copyright (C) 2003 David Zeuthen, <david@fubar.dk> 1N/A * Copyright (C) 2007 Codethink Ltd. Author Rob Taylor <rob.taylor@codethink.co.uk> 1N/A * Licensed under the Academic Free License version 2.1 1N/A * This program is free software; you can redistribute it and/or modify 1N/A * it under the terms of the GNU General Public License as published by 1N/A * the Free Software Foundation; either version 2 of the License, or 1N/A * (at your option) any later version. 1N/A * This program is distributed in the hope that it will be useful, 1N/A * but WITHOUT ANY WARRANTY; without even the implied warranty of 1N/A * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 1N/A * GNU General Public License for more details. 1N/A * You should have received a copy of the GNU General Public License 1N/A * along with this program; if not, write to the Free Software 1N/A * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 1N/A **************************************************************************/ 1N/A/* Stubs that do something close enough. */ 1N/A * LIBHAL_CHECK_PARAM_VALID: 1N/A * @_param_: the prameter to check for 1N/A * @_name_: the name of the prameter (for debug output) 1N/A * @_ret_: what to use for return value if the prameter is NULL 1N/A * Handy macro for checking whether a parameter is valid and not NULL. 1N/A "%s %d : invalid parameter. %s is NULL.\n", \
1N/A * libhal_free_string_array: 1N/A * @str_array: the array to be freed 1N/A * Frees a NULL-terminated array of strings. If passed NULL, does nothing. 1N/A * libhal_get_string_array_from_iter: 1N/A * @iter: the message iterator to extract the strings from 1N/A * @num_elements: pointer to an integer where to store number of elements (can be NULL) 1N/A * Creates a NULL terminated array of strings from a dbus message iterator. 1N/A * Returns: pointer to the string array 1N/A * libhal_free_string: 1N/A * @str: the nul-terminated sting to free 1N/A * Used to free strings returned by libhal. 1N/A * LibHalPropertySet: 1N/A * Represents a set of properties. Opaque; use the 1N/A * libhal_property_set_*() family of functions to access it. 1N/A /**< Pointer to first property or NULL 1N/A * if there are no properties */ 1N/A * Represents a property. Opaque. 1N/A char *
key;
/**< ASCII string */ 1N/A /** Possible values of the property */ 1N/A /**< 32-bit signed integer */ 1N/A /**< 64-bit unsigned integer */ 1N/A * Context for connection to the HAL daemon. Opaque, use the 1N/A * libhal_ctx_*() family of functions to access it. 1N/A /** Device removed */ 1N/A /** Device got a new capability */ 1N/A /** Device got a new capability */ 1N/A /** A property of a device changed */ 1N/A /** A non-continous event on the device occured */ 1N/A * libhal_ctx_set_user_data: 1N/A * @ctx: the context for the connection to hald 1N/A * @user_data: user data 1N/A * Set user data for the context. 1N/A * Returns: TRUE if user data was successfully set, FALSE if otherwise 1N/A * libhal_ctx_get_user_data: 1N/A * @ctx: the context for the connection to hald 1N/A * Get user data for the context. 1N/A * Returns: opaque pointer stored through libhal_ctx_set_user_data() or NULL if not set. 1N/A * libhal_property_fill_value_from_variant: 1N/A * @p: the property to fill in 1N/A * @var_iter: variant iterator to extract the value from 1N/A * Fills in the value for the LibHalProperty given a variant iterator. 1N/A * Returns: Whether the value was put in. 1N/A /** @todo report error */ 1N/A * libhal_device_get_all_properties: 1N/A * @ctx: the context for the connection to hald 1N/A * @udi: the Unique id of device 1N/A * @error: pointer to an initialized dbus error object for returning errors or NULL 1N/A * Retrieve all the properties on a device. 1N/A * Returns: An object represent all properties. Must be freed with libhal_free_property_set(). 1N/A "org.freedesktop.Hal.Device",
1N/A "GetAllProperties");
1N/A "%s %d : Couldn't allocate D-BUS message\n",
1N/A result->properties = malloc(sizeof(LibHalProperty)*result->num_properties); 1N/A if( result->properties==NULL ) 1N/A "%s %d : error allocating memory\n",
1N/A /** @todo FIXME cleanup */ 1N/A * libhal_free_property_set: 1N/A * @set: property-set to free 1N/A * Free a property set earlier obtained with libhal_device_get_all_properties(). 1N/A * libhal_property_set_get_num_elems: 1N/A * @set: property set to consider 1N/A * Get the number of properties in a property set. 1N/A * Returns: number of properties in given property set 1N/A * libhal_ps_get_type: 1N/A * @set: property set 1N/A * @key: name of property to inspect 1N/A * Get the type of a given property. 1N/A * Returns: the #LibHalPropertyType of the given property, 1N/A * LIBHAL_PROPERTY_TYPE_INVALID if property is not in the set 1N/A * libhal_ps_get_string: 1N/A * @set: property set 1N/A * @key: name of property to inspect 1N/A * Get the value of a property of type string. 1N/A * Returns: UTF8 nul-terminated string. This pointer is only valid 1N/A * until libhal_free_property_set() is invoked on the property set 1N/A * this property belongs to. NULL if property is not in the set or not a string 1N/A * libhal_ps_get_int: 1N/A * @set: property set 1N/A * @key: name of property to inspect 1N/A * Get the value of a property of type signed integer. 1N/A * Returns: property value (32-bit signed integer) 1N/A * libhal_ps_get_uint64: 1N/A * @set: property set 1N/A * @key: name of property to inspect 1N/A * Get the value of a property of type unsigned integer. 1N/A * Returns: property value (64-bit unsigned integer) 1N/A * libhal_ps_get_double: 1N/A * @set: property set 1N/A * @key: name of property to inspect 1N/A * Get the value of a property of type double. 1N/A * Returns: property value (IEEE754 double precision float) 1N/A * libhal_ps_get_bool: 1N/A * @set: property set 1N/A * @key: name of property to inspect 1N/A * Get the value of a property of type bool. 1N/A * Returns: property value (bool) 1N/A * libhal_ps_get_strlist: 1N/A * @set: property set 1N/A * @key: name of property to inspect 1N/A * Get the value of a property of type string list. 1N/A * Returns: pointer to array of strings, this is owned by the property set 1N/A * @iter: iterator object 1N/A * @set: property set to iterate over 1N/A * Initialize a property set iterator. 1N/A * libhal_psi_has_more: 1N/A * @iter: iterator object 1N/A * Determine whether there are more properties to iterate over. 1N/A * Returns: TRUE if there are more properties, FALSE otherwise. 1N/A * @iter: iterator object 1N/A * Advance iterator to next property. 1N/A * libhal_psi_get_type: 1N/A * @iter: iterator object 1N/A * Get type of property. 1N/A * Returns: the property type at the iterator's position 1N/A * libhal_psi_get_key: 1N/A * @iter: iterator object 1N/A * Get the key of a property. 1N/A * Returns: ASCII nul-terminated string. This pointer is only valid 1N/A * until libhal_free_property_set() is invoked on the property set 1N/A * this property belongs to. 1N/A * libhal_psi_get_string: 1N/A * @iter: iterator object 1N/A * Get the value of a property of type string. 1N/A * Returns: UTF8 nul-terminated string. This pointer is only valid 1N/A * until libhal_free_property_set() is invoked on the property set 1N/A * this property belongs to. 1N/A * libhal_psi_get_int: 1N/A * @iter: iterator object 1N/A * Get the value of a property of type signed integer. 1N/A * Returns: property value (32-bit signed integer) 1N/A * libhal_psi_get_uint64: 1N/A * @iter: iterator object 1N/A * Get the value of a property of type unsigned integer. 1N/A * Returns: property value (64-bit unsigned integer) 1N/A * libhal_psi_get_double: 1N/A * @iter: iterator object 1N/A * Get the value of a property of type double. 1N/A * Returns: property value (IEEE754 double precision float) 1N/A * libhal_psi_get_bool: 1N/A * @iter: iterator object 1N/A * Get the value of a property of type bool. 1N/A * Returns: property value (bool) 1N/A * libhal_psi_get_strlist: 1N/A * @iter: iterator object 1N/A * Get the value of a property of type string list. 1N/A * Returns: pointer to array of strings 1N/A /*printf("*** in filter_func, object_path=%s\n", object_path);*/ 1N/A/* for i18n purposes */ 1N/A * libhal_get_all_devices: 1N/A * @ctx: the context for the connection to hald 1N/A * @num_devices: the number of devices will be stored here 1N/A * @error: pointer to an initialized dbus error object for returning errors or NULL 1N/A * Get all devices in the Global Device List (GDL). 1N/A * Returns: An array of device identifiers terminated with NULL. It is 1N/A * the responsibility of the caller to free with 1N/A * libhal_free_string_array(). If an error occurs NULL is returned. 1N/A "org.freedesktop.Hal.Manager",
1N/A /* now analyze reply */ 1N/A * libhal_device_get_property_type: 1N/A * @ctx: the context for the connection to hald 1N/A * @udi: the Unique Device Id 1N/A * @key: name of the property 1N/A * @error: pointer to an initialized dbus error object for returning errors or NULL 1N/A * Query a property type of a device. 1N/A * Returns: A LibHalPropertyType. LIBHAL_PROPERTY_TYPE_INVALID is 1N/A * return if the property doesn't exist. 1N/A "org.freedesktop.Hal.Device",
1N/A * libhal_device_get_property_strlist: 1N/A * @ctx: the context for the connection to hald 1N/A * @udi: unique Device Id 1N/A * @key: name of the property 1N/A * @error: pointer to an initialized dbus error object for returning errors or NULL 1N/A * Get the value of a property of type string list. 1N/A * Returns: Array of pointers to UTF8 nul-terminated strings 1N/A * terminated by NULL. The caller is responsible for freeing this 1N/A * string array with the function libhal_free_string_array(). Returns 1N/A * NULL if the property didn't exist or we are OOM 1N/A "org.freedesktop.Hal.Device",
1N/A "GetPropertyStringList");
1N/A "%s %d : Couldn't allocate D-BUS message\n",
1N/A /* now analyse reply */ 1N/A * libhal_device_get_property_string: 1N/A * @ctx: the context for the connection to hald 1N/A * @udi: the Unique Device Id 1N/A * @key: the name of the property 1N/A * @error: pointer to an initialized dbus error object for returning errors or NULL 1N/A * Get the value of a property of type string. 1N/A * Returns: UTF8 nul-terminated string. The caller is responsible for 1N/A * freeing this string with the function libhal_free_string(). Returns 1N/A * NULL if the property didn't exist or we are OOM. 1N/A "org.freedesktop.Hal.Device",
1N/A "GetPropertyString");
1N/A "%s %d : Couldn't allocate D-BUS message\n",
1N/A /* now analyze reply */ 1N/A /** @todo FIXME cleanup */ 1N/A * libhal_device_get_property_int: 1N/A * @ctx: the context for the connection to hald 1N/A * @udi: the Unique Device Id 1N/A * @key: name of the property 1N/A * @error: pointer to an initialized dbus error object for returning errors or NULL 1N/A * Get the value of a property of type integer. 1N/A * Returns: Property value (32-bit signed integer) 1N/A "org.freedesktop.Hal.Device",
1N/A "GetPropertyInteger");
1N/A "%s %d : Couldn't allocate D-BUS message\n",
1N/A /* now analyze reply */ 1N/A "%s %d : property '%s' for device '%s' is not " 1N/A * libhal_device_get_property_uint64: 1N/A * @ctx: the context for the connection to hald 1N/A * @udi: the Unique Device Id 1N/A * @key: name of the property 1N/A * @error: pointer to an initialized dbus error object for returning errors or NULL 1N/A * Get the value of a property of type signed integer. 1N/A * Returns: Property value (64-bit unsigned integer) 1N/A "org.freedesktop.Hal.Device",
1N/A "GetPropertyInteger");
1N/A "%s %d : Couldn't allocate D-BUS message\n",
1N/A /* now analyze reply */ 1N/A "%s %d : property '%s' for device '%s' is not " 1N/A * libhal_device_get_property_double: 1N/A * @ctx: the context for the connection to hald 1N/A * @udi: the Unique Device Id 1N/A * @key: name of the property 1N/A * @error: pointer to an initialized dbus error object for returning errors or NULL 1N/A * Get the value of a property of type double. 1N/A * Returns: Property value (IEEE754 double precision float) 1N/A "org.freedesktop.Hal.Device",
1N/A "GetPropertyDouble");
1N/A "%s %d : Couldn't allocate D-BUS message\n",
1N/A /* now analyze reply */ 1N/A "%s %d : property '%s' for device '%s' is not " 1N/A * libhal_device_get_property_bool: 1N/A * @ctx: the context for the connection to hald 1N/A * @udi: the Unique Device Id 1N/A * @key: name of the property 1N/A * @error: pointer to an initialized dbus error object for returning errors or NULL 1N/A * Get the value of a property of type bool. 1N/A * Returns: Property value (boolean) 1N/A "org.freedesktop.Hal.Device",
1N/A "GetPropertyBoolean");
1N/A "%s %d : Couldn't allocate D-BUS message\n",
1N/A /* now analyze reply */ 1N/A "%s %d : property '%s' for device '%s' is not " 1N/A /** @todo sanity check incoming params */ 1N/A /* cannot happen; is not callable from outside this file */ 1N/A "org.freedesktop.Hal.Device",
1N/A "%s %d : Couldn't allocate D-BUS message\n",
1N/A * libhal_device_set_property_string: 1N/A * @ctx: the context for the connection to hald 1N/A * @udi: the Unique Device Id 1N/A * @key: name of the property 1N/A * @value: value of the property; a UTF8 string 1N/A * @error: pointer to an initialized dbus error object for returning errors or NULL 1N/A * Set a property of type string. 1N/A * Returns: TRUE if the property was set, FALSE if the device didn't 1N/A * exist or the property had a different type. 1N/A * libhal_device_set_property_int: 1N/A * @ctx: the context for the connection to hald 1N/A * @udi: the Unique Device Id 1N/A * @key: name of the property 1N/A * @value: value of the property 1N/A * @error: pointer to an initialized dbus error object for returning errors or NULL 1N/A * Set a property of type signed integer. 1N/A * Returns: TRUE if the property was set, FALSE if the device didn't 1N/A * exist or the property had a different type. 1N/A * libhal_device_set_property_uint64: 1N/A * @ctx: the context for the connection to hald 1N/A * @udi: the Unique Device Id 1N/A * @key: name of the property 1N/A * @value: value of the property 1N/A * @error: pointer to an initialized dbus error object for returning errors or NULL 1N/A * Set a property of type unsigned integer. 1N/A * Returns: TRUE if the property was set, FALSE if the device didn't 1N/A * exist or the property had a different type. 1N/A * libhal_device_set_property_double: 1N/A * @ctx: the context for the connection to hald 1N/A * @udi: the Unique Device Id 1N/A * @key: name of the property 1N/A * @value: value of the property 1N/A * @error: pointer to an initialized dbus error object for returning errors or NULL 1N/A * Set a property of type double. 1N/A * Returns: TRUE if the property was set, FALSE if the device didn't 1N/A * exist or the property had a different type. 1N/A * libhal_device_set_property_bool: 1N/A * @ctx: the context for the connection to hald 1N/A * @udi: the Unique Device Id 1N/A * @key: name of the property 1N/A * @value: value of the property 1N/A * @error: pointer to an initialized dbus error object for returning errors or NULL 1N/A * Set a property of type bool. 1N/A * Returns: TRUE if the property was set, FALSE if the device didn't 1N/A * exist or the property had a different type. 1N/A * libhal_device_remove_property: 1N/A * @ctx: the context for the connection to hald 1N/A * @udi: the Unique Device Id 1N/A * @key: name of the property 1N/A * @error: pointer to an initialized dbus error object for returning errors or NULL 1N/A * Remove a property. 1N/A * Returns: TRUE if the property was set, FALSE if the device didn't 1N/A /* DBUS_TYPE_INVALID means remove */ 1N/A * libhal_device_property_strlist_append: 1N/A * @ctx: the context for the connection to hald 1N/A * @udi: the Unique Device Id 1N/A * @key: name of the property 1N/A * @value: value to append to property 1N/A * @error: pointer to an initialized dbus error object for returning errors or NULL 1N/A * Append to a property of type strlist. 1N/A * Returns: TRUE if the value was appended, FALSE if the device didn't 1N/A * exist or the property had a different type. 1N/A "org.freedesktop.Hal.Device",
1N/A "StringListAppend");
1N/A "%s %d : Couldn't allocate D-BUS message\n",
1N/A * libhal_device_property_strlist_prepend: 1N/A * @ctx: the context for the connection to hald 1N/A * @udi: the Unique Device Id 1N/A * @key: name of the property 1N/A * @value: value to prepend to property 1N/A * @error: pointer to an initialized dbus error object for returning errors or NULL 1N/A * Prepend to a property of type strlist. 1N/A * Returns: TRUE if the value was prepended, FALSE if the device 1N/A * didn't exist or the property had a different type. 1N/A "org.freedesktop.Hal.Device",
1N/A "StringListPrepend");
1N/A "%s %d : Couldn't allocate D-BUS message\n",
1N/A * libhal_device_property_strlist_remove_index: 1N/A * @ctx: the context for the connection to hald 1N/A * @udi: the Unique Device Id 1N/A * @key: name of the property 1N/A * @idx: index of string to remove in the strlist 1N/A * @error: pointer to an initialized dbus error object for returning errors or NULL 1N/A * Remove a specified string from a property of type strlist. 1N/A * Returns: TRUE if the string was removed, FALSE if the device didn't 1N/A * exist or the property had a different type. 1N/A "org.freedesktop.Hal.Device",
1N/A "StringListRemoveIndex");
1N/A "%s %d : Couldn't allocate D-BUS message\n",
1N/A * libhal_device_property_strlist_remove: 1N/A * @ctx: the context for the connection to hald 1N/A * @udi: the Unique Device Id 1N/A * @key: name of the property 1N/A * @value: the string to remove 1N/A * @error: pointer to an initialized dbus error object for returning errors or NULL 1N/A * Remove a specified string from a property of type strlist. 1N/A * Returns: TRUE if the string was removed, FALSE if the device didn't 1N/A * exist or the property had a different type. 1N/A "org.freedesktop.Hal.Device",
1N/A "StringListRemove");
1N/A "%s %d : Couldn't allocate D-BUS message\n",
1N/A * libhal_device_lock: 1N/A * @ctx: the context for the connection to hald 1N/A * @udi: the Unique Device Id 1N/A * @reason_to_lock: a user-presentable reason why the device is locked. 1N/A * @reason_why_locked: a pointer to store the reason why the device cannot be locked on failure, or NULL 1N/A * @error: pointer to an initialized dbus error object for returning errors or NULL 1N/A * Take an advisory lock on the device. 1N/A * Returns: TRUE if the lock was obtained, FALSE otherwise 1N/A "org.freedesktop.Hal.Device",
1N/A "%s %d : Couldn't allocate D-BUS message\n",
1N/A "org.freedesktop.Hal.DeviceAlreadyLocked") == 0) {
1N/A * libhal_device_unlock: 1N/A * @ctx: the context for the connection to hald 1N/A * @udi: the Unique Device Id 1N/A * @error: pointer to an initialized dbus error object for returning errors or NULL 1N/A * Release an advisory lock on the device. 1N/A * Returns: TRUE if the device was successfully unlocked, 1N/A "org.freedesktop.Hal.Device",
1N/A "%s %d : Couldn't allocate D-BUS message\n",
1N/A * libhal_new_device: 1N/A * @ctx: the context for the connection to hald 1N/A * @error: pointer to an initialized dbus error object for returning errors or NULL 1N/A * Create a new device object which will be hidden from applications 1N/A * until the CommitToGdl(), ie. libhal_device_commit_to_gdl(), method 1N/A * is called. Note that the program invoking this method needs to run 1N/A * with super user privileges. 1N/A * Returns: Temporary device unique id or NULL if there was a 1N/A * problem. This string must be freed by the caller. 1N/A "org.freedesktop.Hal.Manager",
1N/A "%s %d : Couldn't allocate D-BUS message\n",
1N/A /* now analyze reply */ 1N/A "%s %d : expected a string in reply to NewDevice\n",
1N/A * libhal_device_commit_to_gdl: 1N/A * @ctx: the context for the connection to hald 1N/A * @temp_udi: the temporary unique device id as returned by libhal_new_device() 1N/A * @udi: the new unique device id. 1N/A * @error: pointer to an initialized dbus error object for returning errors or NULL 1N/A * When a hidden device has been built using the NewDevice method, 1N/A * ie. libhal_new_device(), and the org.freedesktop.Hal.Device 1N/A * interface this function will commit it to the global device list. 1N/A * This means that the device object will be visible to applications 1N/A * and the HAL daemon will possibly attempt to boot the device 1N/A * (depending on the property RequireEnable). 1N/A * Note that the program invoking this method needs to run with super 1N/A * Returns: FALSE if the given unique device id is already in use. 1N/A "org.freedesktop.Hal.Manager",
1N/A "%s %d : Couldn't allocate D-BUS message\n",
1N/A * libhal_remove_device: 1N/A * @ctx: the context for the connection to hald 1N/A * @udi: the Unique device id. 1N/A * @error: pointer to an initialized dbus error object for returning errors or NULL 1N/A * This method can be invoked when a device is removed. The HAL daemon 1N/A * will shut down the device. Note that the device may still be in the 1N/A * device list if the Persistent property is set to true. 1N/A * Note that the program invoking this method needs to run with super 1N/A * Returns: TRUE if the device was removed, FALSE otherwise 1N/A "org.freedesktop.Hal.Manager",
1N/A "%s %d : Couldn't allocate D-BUS message\n",
1N/A * libhal_device_exists: 1N/A * @ctx: the context for the connection to hald 1N/A * @udi: the Unique device id. 1N/A * @error: pointer to an initialized dbus error object for returning errors or NULL 1N/A * Determine if a device exists. 1N/A * Returns: TRUE if the device exists 1N/A "org.freedesktop.Hal.Manager",
1N/A "%s %d : Couldn't allocate D-BUS message\n",
1N/A /* now analyze reply */ 1N/A "%s %d : expected a bool in reply to DeviceExists\n",
1N/A * libhal_device_property_exists: 1N/A * @ctx: the context for the connection to hald 1N/A * @udi: the Unique device id. 1N/A * @key: name of the property 1N/A * @error: pointer to an initialized dbus error object for returning errors or NULL 1N/A * Determine if a property on a device exists. 1N/A * Returns: TRUE if the device exists, FALSE otherwise 1N/A "org.freedesktop.Hal.Device",
1N/A "%s %d : Couldn't allocate D-BUS message\n",
1N/A /* now analyse reply */ 1N/A * libhal_merge_properties: 1N/A * @ctx: the context for the connection to hald 1N/A * @target_udi: the Unique device id of target device to merge to 1N/A * @source_udi: the Unique device id of device to merge from 1N/A * @error: pointer to an initialized dbus error object for returning errors or NULL 1N/A * Merge properties from one device to another. 1N/A * Returns: TRUE if the properties were merged, FALSE otherwise 1N/A "org.freedesktop.Hal.Manager",
1N/A "%s %d : Couldn't allocate D-BUS message\n",
1N/A * libhal_device_matches: 1N/A * @ctx: the context for the connection to hald 1N/A * @udi1: the Unique Device Id for device 1 1N/A * @udi2: the Unique Device Id for device 2 1N/A * @property_namespace: the namespace for set of devices, e.g. "usb" 1N/A * @error: pointer to an initialized dbus error object for returning errors or NULL 1N/A * Check a set of properties for two devices matches. 1N/A * Checks that all properties where keys, starting with a given value 1N/A * (namespace), of the first device is in the second device and that 1N/A * they got the same value and type. 1N/A * Note that the other inclusion isn't tested, so there could be 1N/A * properties (from the given namespace) in the second device not 1N/A * present in the first device. 1N/A * Returns: TRUE if all properties starting with the given namespace 1N/A * parameter from one device is in the other and have the same value. 1N/A "org.freedesktop.Hal.Manager",
1N/A "%s %d : Couldn't allocate D-BUS message\n",
1N/A /* now analyse reply */ 1N/A "%s %d : expected a bool in reply to DeviceMatches\n",
1N/A * libhal_device_print: 1N/A * @ctx: the context for the connection to hald 1N/A * @udi: the Unique Device Id 1N/A * @error: pointer to an initialized dbus error object for returning errors or NULL 1N/A * Print a device to stdout; useful for debugging. 1N/A * Returns: TRUE if device's information could be obtained, FALSE otherwise 1N/A * libhal_manager_find_device_string_match: 1N/A * @ctx: the context for the connection to hald 1N/A * @key: name of the property 1N/A * @value: the value to match 1N/A * @num_devices: pointer to store number of devices 1N/A * @error: pointer to an initialized dbus error object for returning errors or NULL 1N/A * Find a device in the GDL where a single string property matches a 1N/A * Returns: UDI of devices; free with libhal_free_string_array() 1N/A "org.freedesktop.Hal.Manager",
1N/A "FindDeviceStringMatch");
1N/A "%s %d : Couldn't allocate D-BUS message\n",
1N/A /* now analyse reply */ 1N/A * libhal_device_add_capability: 1N/A * @ctx: the context for the connection to hald 1N/A * @udi: the Unique Device Id 1N/A * @capability: the capability name to add 1N/A * @error: pointer to an initialized dbus error object for returning errors or NULL 1N/A * Assign a capability to a device. 1N/A * Returns: TRUE if the capability was added, FALSE if the device didn't exist 1N/A "org.freedesktop.Hal.Device",
1N/A "%s %d : Couldn't allocate D-BUS message\n",
1N/A * libhal_device_query_capability: 1N/A * @ctx: the context for the connection to hald 1N/A * @udi: the Unique Device Id 1N/A * @capability: the capability name 1N/A * @error: pointer to an initialized dbus error object for returning errors or NULL 1N/A * Check if a device has a capability. The result is undefined if the 1N/A * device doesn't exist. 1N/A * Returns: TRUE if the device has the capability, otherwise FALSE 1N/A * libhal_find_device_by_capability: 1N/A * @ctx: the context for the connection to hald 1N/A * @capability: the capability name 1N/A * @num_devices: pointer to store number of devices 1N/A * @error: pointer to an initialized dbus error object for returning errors or NULL 1N/A * Find devices with a given capability. 1N/A * Returns: UDI of devices; free with libhal_free_string_array() 1N/A "org.freedesktop.Hal.Manager",
1N/A "FindDeviceByCapability");
1N/A "%s %d : Couldn't allocate D-BUS message\n",
1N/A /* now analyse reply */ 1N/A * libhal_device_property_watch_all: 1N/A * @ctx: the context for the connection to hald 1N/A * @error: pointer to an initialized dbus error object for returning errors or NULL 1N/A * Watch all devices, ie. the device_property_changed callback is 1N/A * invoked when the properties on any device changes. 1N/A * Returns: TRUE only if the operation succeeded 1N/A "interface='org.freedesktop.Hal.Device'," 1N/A * libhal_device_add_property_watch: 1N/A * @ctx: the context for the connection to hald 1N/A * @udi: the Unique Device Id 1N/A * @error: pointer to an initialized dbus error object for returning errors or NULL 1N/A * Add a watch on a device, so the device_property_changed callback is 1N/A * invoked when the properties on the given device changes. 1N/A * The application itself is responsible for deleting the watch, using 1N/A * libhal_device_remove_property_watch, if the device is removed. 1N/A * Returns: TRUE only if the operation succeeded 1N/A "interface='org.freedesktop.Hal.Device'," 1N/A "sender='org.freedesktop.Hal'," "path=%s",
udi);
1N/A * libhal_device_remove_property_watch: 1N/A * @ctx: the context for the connection to hald 1N/A * @udi: the Unique Device Id 1N/A * @error: pointer to an initialized dbus error object for returning errors or NULL 1N/A * Remove a watch on a device. 1N/A * Returns: TRUE only if the operation succeeded 1N/A "interface='org.freedesktop.Hal.Device'," 1N/A "sender='org.freedesktop.Hal'," "path=%s",
udi);
1N/A * Create a new LibHalContext 1N/A * Returns: a new uninitialized LibHalContext object 1N/A "%s %d : Failed to allocate %d bytes\n",
1N/A * libhal_ctx_set_cache: 1N/A * @use_cache: whether or not to use cache 1N/A * Enable or disable caching. Note: Caching is not actually 1N/A * libhal_ctx_set_dbus_connection: 1N/A * @ctx: context to set connection for 1N/A * @conn: DBus connection to use 1N/A * Set DBus connection to use to talk to hald. 1N/A * Returns: TRUE if connection was successfully set, FALSE otherwise 1N/A * libhal_ctx_get_dbus_connection: 1N/A * @ctx: context to get connection for 1N/A * Get DBus connection used for talking to hald. 1N/A * Returns: DBus connection to use or NULL 1N/A * @ctx: Context for connection to hald (D-BUS connection should be set with libhal_ctx_set_dbus_connection) 1N/A * @error: pointer to an initialized dbus error object for returning errors or NULL 1N/A * Initialize the connection to hald. 1N/A * Returns: TRUE if initialization succeeds, FALSE otherwise 1N/A "interface='org.freedesktop.Hal.Manager'," 1N/A "sender='org.freedesktop.Hal'," 1N/A * libhal_ctx_init_direct: 1N/A * @error: pointer to an initialized dbus error object for returning errors or NULL 1N/A * Create an already initialized connection to hald. This function should only be used by HAL helpers. 1N/A * Returns: A pointer to an already initialized LibHalContext 1N/A * libhal_ctx_shutdown: 1N/A * @ctx: the context for the connection to hald 1N/A * @error: pointer to an initialized dbus error object for returning errors or NULL 1N/A * Shut down a connection to hald. 1N/A * Returns: TRUE if connection successfully shut down, FALSE otherwise 1N/A /* for some reason dbus_connection_set_exit_on_disconnect doesn't work yet so don't unref */ 1N/A /*dbus_connection_unref (ctx->connection);*/ 1N/A "interface='org.freedesktop.Hal.Manager'," 1N/A "sender='org.freedesktop.Hal'," 1N/A /** @todo clean up */ 1N/A /* TODO: remove other matches */ 1N/A * @ctx: pointer to a LibHalContext 1N/A * Free a LibHalContext resource. 1N/A * libhal_ctx_set_device_added: 1N/A * @ctx: the context for the connection to hald 1N/A * @callback: the function to call when a device is added 1N/A * Set the callback for when a device is added 1N/A * Returns: TRUE if callback was successfully set, FALSE otherwise 1N/A * libhal_ctx_set_device_removed: 1N/A * @ctx: the context for the connection to hald 1N/A * @callback: the function to call when a device is removed 1N/A * Set the callback for when a device is removed. 1N/A * Returns: TRUE if callback was successfully set, FALSE otherwise 1N/A * libhal_ctx_set_device_new_capability: 1N/A * @ctx: the context for the connection to hald 1N/A * @callback: the function to call when a device gains a new capability 1N/A * Set the callback for when a device gains a new capability. 1N/A * Returns: TRUE if callback was successfully set, FALSE otherwise 1N/A * libhal_ctx_set_device_lost_capability: 1N/A * @ctx: the context for the connection to hald 1N/A * @callback: the function to call when a device loses a capability 1N/A * Set the callback for when a device loses a capability 1N/A * Returns: TRUE if callback was successfully set, FALSE otherwise 1N/A * libhal_ctx_set_device_property_modified: 1N/A * @ctx: the context for the connection to hald 1N/A * @callback: the function to call when a property is modified on a device 1N/A * Set the callback for when a property is modified on a device. 1N/A * Returns: TRUE if callback was successfully set, FALSE otherwise 1N/A * libhal_ctx_set_device_condition: 1N/A * @ctx: the context for the connection to hald 1N/A * @callback: the function to call when a device emits a condition 1N/A * Set the callback for when a device emits a condition 1N/A * Returns: TRUE if callback was successfully set, FALSE otherwise 1N/A * libhal_string_array_length: 1N/A * @str_array: array of strings to consider 1N/A * Get the length of an array of strings. 1N/A * Returns: Number of strings in array 1N/A * libhal_device_rescan: 1N/A * @ctx: the context for the connection to hald 1N/A * @udi: the Unique id of device 1N/A * @error: pointer to an initialized dbus error object for returning errors or NULL 1N/A * Returns: Whether the operation succeeded 1N/A "org.freedesktop.Hal.Device",
1N/A "%s %d : Couldn't allocate D-BUS message\n",
1N/A * libhal_device_reprobe: 1N/A * @ctx: the context for the connection to hald 1N/A * @udi: the Unique id of device 1N/A * @error: pointer to an initialized dbus error object for returning errors or NULL 1N/A * Returns: Whether the operation succeeded 1N/A "org.freedesktop.Hal.Device",
1N/A "%s %d : Couldn't allocate D-BUS message\n",
1N/A * libhal_device_emit_condition: 1N/A * @ctx: the context for the connection to hald 1N/A * @udi: the Unique Device Id 1N/A * @condition_name: user-readable name of condition 1N/A * @condition_details: user-readable details of condition 1N/A * @error: pointer to an initialized dbus error object for returning errors or NULL 1N/A * Emit a condition from a device. Can only be used from hald helpers. 1N/A * Returns: TRUE if condition successfully emitted, 1N/A "org.freedesktop.Hal.Device",
1N/A "%s %d : Couldn't allocate D-BUS message\n",
1N/A * libhal_device_addon_is_ready: 1N/A * @ctx: the context for the connection to hald 1N/A * @udi: the Unique Device Id 1N/A * @error: pointer to an initialized dbus error object for returning errors or NULL 1N/A * HAL addon's must call this method when they are done initializing the device object. The HAL 1N/A * daemon will wait for all addon's to call this. 1N/A * Can only be used from hald helpers. 1N/A * Returns: TRUE if the HAL daemon received the message, FALSE otherwise 1N/A "org.freedesktop.Hal.Device",
1N/A "%s %d : Couldn't allocate D-BUS message\n",
1N/A * libhal_device_claim_interface: 1N/A * @ctx: the context for the connection to hald 1N/A * @udi: the Unique Device Id 1N/A * @interface_name: Name of interface to claim, e.g. org.freedesktop.Hal.Device.FoobarKindOfThing 1N/A * @introspection_xml: Introspection XML containing what would be inside the interface XML tag 1N/A * @error: pointer to an initialized dbus error object for returning errors or NULL 1N/A * Claim an interface for a device. All messages to this interface 1N/A * will be forwarded to the helper. Can only be used from hald 1N/A * Returns: TRUE if interface was claimed, FALSE otherwise 1N/A "org.freedesktop.Hal.Device",
1N/A "%s %d : Couldn't allocate D-BUS message\n",
1N/A * libhal_device_new_changeset: 1N/A * @udi: unique device identifier 1N/A * Request a new changeset object. Used for changing multiple properties at once. Useful when 1N/A * performance is critical and also for atomically updating several properties. 1N/A * Returns: A new changeset object or NULL on error 1N/A * libhal_device_set_property_string: 1N/A * @changeset: the changeset 1N/A * @key: key of property 1N/A * @value: the value to set 1N/A * Returns: FALSE on OOM 1N/A * libhal_device_set_property_int: 1N/A * @changeset: the changeset 1N/A * @key: key of property 1N/A * @value: the value to set 1N/A * Returns: FALSE on OOM 1N/A * libhal_device_set_property_uint64: 1N/A * @changeset: the changeset 1N/A * @key: key of property 1N/A * @value: the value to set 1N/A * Returns: FALSE on OOM 1N/A * libhal_device_set_property_double: 1N/A * @changeset: the changeset 1N/A * @key: key of property 1N/A * @value: the value to set 1N/A * Returns: FALSE on OOM 1N/A * libhal_device_set_property_bool: 1N/A * @changeset: the changeset 1N/A * @key: key of property 1N/A * @value: the value to set 1N/A * Returns: FALSE on OOM 1N/A * libhal_device_set_property_strlist: 1N/A * @changeset: the changeset 1N/A * @key: key of property 1N/A * @value: the value to set - NULL terminated array of strings 1N/A * Returns: FALSE on OOM 1N/A for (j = 0; j < i; j++) {
1N/A * libhal_device_commit_changeset: 1N/A * @ctx: the context for the connection to hald 1N/A * @changeset: the changeset to commit 1N/A * @error: pointer to an initialized dbus error object for returning errors or NULL 1N/A * Commit a changeset to the daemon. 1N/A * Returns: True if the changeset was committed on the daemon side 1N/A "org.freedesktop.Hal.Device",
1N/A "SetMultipleProperties");
1N/A * libhal_device_free_changeset: 1N/A * @changeset: the changeset to free 1N/A /* explicit fallthrough */