mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-02-20 23:20:41 +01:00
2005-08-30 Dan Williams <dcbw@redhat.com>
* gnome/applet/applet-dbus-devices.c - Remove nmwa_dbus_get_hal_device_string_property(); unused git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@912 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
This commit is contained in:
parent
9871d317d9
commit
b051ee7a01
2 changed files with 5 additions and 50 deletions
|
|
@ -1,3 +1,8 @@
|
|||
2005-08-30 Dan Williams <dcbw@redhat.com>
|
||||
|
||||
* gnome/applet/applet-dbus-devices.c
|
||||
- Remove nmwa_dbus_get_hal_device_string_property(); unused
|
||||
|
||||
2005-08-30 Dan Williams <dcbw@redhat.com>
|
||||
|
||||
* gnome/applet/applet-dbus.[ch]
|
||||
|
|
|
|||
|
|
@ -149,56 +149,6 @@ static void nmwa_dbus_update_wireless_enabled (NMWirelessApplet *applet)
|
|||
}
|
||||
|
||||
|
||||
/*
|
||||
* nmwa_dbus_get_hal_device_string_property
|
||||
*
|
||||
* Get a string property from a device
|
||||
*
|
||||
*/
|
||||
static char *nmwa_dbus_get_hal_device_string_property (DBusConnection *connection, const char *udi, const char *property_name)
|
||||
{
|
||||
DBusError error;
|
||||
DBusMessage *message;
|
||||
DBusMessage *reply;
|
||||
char *dbus_property = NULL;
|
||||
char *property = NULL;
|
||||
|
||||
g_return_val_if_fail (connection != NULL, NULL);
|
||||
g_return_val_if_fail (udi != NULL, NULL);
|
||||
|
||||
if (!(message = dbus_message_new_method_call ("org.freedesktop.Hal", udi, "org.freedesktop.Hal.Device", "GetPropertyString")))
|
||||
return (NULL);
|
||||
|
||||
dbus_error_init (&error);
|
||||
dbus_message_append_args (message, DBUS_TYPE_STRING, &property_name, DBUS_TYPE_INVALID);
|
||||
reply = dbus_connection_send_with_reply_and_block (connection, message, -1, &error);
|
||||
dbus_message_unref (message);
|
||||
if (dbus_error_is_set (&error))
|
||||
{
|
||||
nm_warning ("nmwa_dbus_get_hal_device_string_property(): %s raised:\n %s\n\n", error.name, error.message);
|
||||
dbus_error_free (&error);
|
||||
return (NULL);
|
||||
}
|
||||
if (reply == NULL)
|
||||
{
|
||||
nm_warning ("nmwa_dbus_get_hal_device_string_property(): dbus reply message was NULL\n" );
|
||||
return (NULL);
|
||||
}
|
||||
|
||||
dbus_error_init (&error);
|
||||
if (!dbus_message_get_args (reply, &error, DBUS_TYPE_STRING, &dbus_property, DBUS_TYPE_INVALID))
|
||||
{
|
||||
if (dbus_error_is_set (&error))
|
||||
dbus_error_free (&error);
|
||||
}
|
||||
else
|
||||
property = g_strdup (dbus_property);
|
||||
|
||||
dbus_message_unref (reply);
|
||||
return (property);
|
||||
}
|
||||
|
||||
|
||||
typedef struct HalInfoCBData
|
||||
{
|
||||
NMWirelessApplet * applet;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue