hal/libhal libhal.c,1.36,1.37 libhal.h,1.21,1.22
David Zeuthen
david at freedesktop.org
Mon Feb 14 10:20:07 PST 2005
- Previous message: hal/tools hal_get_property.c,1.8,1.9 hal_set_property.c,1.8,1.9
- Next message: hal/hald device.c, 1.12, 1.13 device_info.c, 1.21, 1.22 hald_dbus.c,
1.21, 1.22 hald_test.c, 1.2, 1.3 hald_test_libhal.c, 1.2,
1.3 property.c, 1.10, 1.11 property.h, 1.6, 1.7 util.c, 1.3, 1.4
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvs/hal/hal/libhal
In directory gabe:/tmp/cvs-serv18090/libhal
Modified Files:
libhal.c libhal.h
Log Message:
2005-02-14 David Zeuthen <davidz at redhat.com>
* configure.in: Require dbus >= 0.30
2005-02-11 John (J5) Palmieri <johnp at redhat.com>
* hald/device.c, hald/device_info.c, hald/property.c, hald/property.h,
tools/hal_set_property.c, tools/hal_get_property.c:
s/HAL_PROPERTY_TYPE_NIL/HAL_PROPERTY_TYPE_INVALID
* hald/hald_dbus.c: ported to new dbus-0.30 API
(foreach_property_append): implemented real string lists
and got rid of the \tval\tval\tval\t hack
* libhal/libhal.c: ported to new dbus-0.30 API
s/HAL_PROPERTY_TYPE_NIL/HAL_PROPERTY_TYPE_INVALID
(libhal_get_string_array_from_iter): new helper function to create
string arrays from dbus arrays
(libhal_property_fill_value_from_variant): new helper function
that fills in properties from variants. Used when getting
a hash of properties from hald
* libhal/libhal.h: s/HAL_PROPERTY_TYPE_NIL/HAL_PROPERTY_TYPE_INVALID
HAL_PROPERTY_TYPE_INVALID = DBUS_TYPE_INVALID
* hald/hald_test_libhal.c: ported to new dbus-0.30 API
Added success messages and more detailed failed messages
* hald/util.c (hal_util_compute_udi): Change all illegal characters
to underscores '_'
* tools/device-manager/DeviceManager.py
(DeviceManager::__init__, add_device_signal_recv):
change add_signal_receiver calls to add expand_args=False parameter.
(DeviceManager::device_changed, gdl_changed): changed handlers
to conform with the new way we call signal handlers
Index: libhal.c
===================================================================
RCS file: /cvs/hal/hal/libhal/libhal.c,v
retrieving revision 1.36
retrieving revision 1.37
diff -u -d -r1.36 -r1.37
--- libhal.c 11 Feb 2005 22:01:08 -0000 1.36
+++ libhal.c 14 Feb 2005 18:20:05 -0000 1.37
@@ -53,6 +53,13 @@
# define N_(String) (String)
#endif
+char **libhal_get_string_array_from_iter (DBusMessageIter *iter);
+
+dbus_bool_t libhal_property_fill_value_from_variant (LibHalProperty *p,
+ DBusMessageIter *var_iter);
+
+
+
/**
[...1395 lines suppressed...]
DBusMessage *reply;
dbus_bool_t result;
@@ -2859,8 +2830,14 @@
if (reply == NULL)
return FALSE;
- dbus_message_iter_init (reply, &iter);
- result = dbus_message_iter_get_boolean (&iter);
+ dbus_message_iter_init (reply, &reply_iter);
+ if (dbus_message_iter_get_arg_type (&reply_iter) !=
+ DBUS_TYPE_BOOLEAN) {
+ dbus_message_unref (message);
+ dbus_message_unref (reply);
+ return FALSE;
+ }
+ dbus_message_iter_get_basic (&reply_iter, &result);
dbus_message_unref (reply);
Index: libhal.h
===================================================================
RCS file: /cvs/hal/hal/libhal/libhal.h,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -d -r1.21 -r1.22
--- libhal.h 11 Feb 2005 22:01:08 -0000 1.21
+++ libhal.h 14 Feb 2005 18:20:05 -0000 1.22
@@ -44,7 +44,7 @@
/** Possible types for properties on hal device objects */
typedef enum {
/** Used to report error condition */
- LIBHAL_PROPERTY_TYPE_NIL = DBUS_TYPE_NIL,
+ LIBHAL_PROPERTY_TYPE_INVALID = DBUS_TYPE_INVALID,
/** Type for 32-bit signed integer property */
LIBHAL_PROPERTY_TYPE_INT32 = DBUS_TYPE_INT32,
@@ -157,8 +157,6 @@
dbus_bool_t libhal_device_exists (LibHalContext *ctx, const char *udi, DBusError *error);
dbus_bool_t libhal_device_print (LibHalContext *ctx, const char *udi, DBusError *error);
-
-
dbus_bool_t libhal_device_property_exists (LibHalContext *ctx,
const char *udi,
const char *key,
- Previous message: hal/tools hal_get_property.c,1.8,1.9 hal_set_property.c,1.8,1.9
- Next message: hal/hald device.c, 1.12, 1.13 device_info.c, 1.21, 1.22 hald_dbus.c,
1.21, 1.22 hald_test.c, 1.2, 1.3 hald_test_libhal.c, 1.2,
1.3 property.c, 1.10, 1.11 property.h, 1.6, 1.7 util.c, 1.3, 1.4
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the hal-commit
mailing list