Re: problem with networkmanager dbus api

2008-10-29 Thread Dan Williams
On Tue, 2008-10-28 at 22:45 +0100, Sebastian Dransfeld wrote:
 Sebastian Dransfeld wrote:
  Sebastian Dransfeld wrote:
  Hi,
 
  I try to use the org.freedesktop.DBus.Properties.GetAll() method call 
  with networkmanager like this (change device to one you got):
 
  dbus-send --system --print-reply --type=method_call \
  --dest=org.freedesktop.NetworkManager \
  /org/freedesktop/Hal/devices/net_00_01_6c_ea_69_1b \
  org.freedesktop.DBus.Properties.GetAll \
  string:org.freedesktop.NetworkManager.Device
 
  This will return nothing, as libdbus-glib maps dbus properties to 
  gobject properties. In networkmanager these do not match:
 
  gobjectdbus
  udiUdi
  interfaceInterface
  driverDriver
  capabilitiesCapabilities
  ip4-addressIp4Address
  etc.
 
  The gobject properties do however have a nick which matches the dbus 
  property name.
 
  Where should this problem be solved? networkmamager or dbus-glib?
 
  If someone can suggest a solution, I can try to create a patch.
  
  And of course:
  OS:
  - Ubuntu 8.10
  Packages:
  - libdbus-glib-1-2  0.76-1
  - network-manager   0.7~~svn20081018t105859-0ubuntu1
 
 And fixed it. Missing _dbus_gutils_wincaps_to_uscore() in dbus-glib's 
 getall implementation. Where should I send this patch?

It's been in dbus-glib since June, right after the release of 0.76:

http://gitweb.freedesktop.org/?p=dbus/dbus-glib.git;a=blobdiff;h=ee760113af2d89ac526ac247f25552f90239972f;hp=3744d8439b461957040df4dd1ba555906bbedc54;hb=d1b80d803a0268bd4b3dd5b9a9522230461f2947;f=dbus/dbus-gobject.c

maybe that means time for another dbus-glib release Colin?

Dan


___
NetworkManager-list mailing list
NetworkManager-list@gnome.org
http://mail.gnome.org/mailman/listinfo/networkmanager-list


Re: problem with networkmanager dbus api

2008-10-29 Thread Colin Walters
On Wed, Oct 29, 2008 at 6:50 AM, Dan Williams [EMAIL PROTECTED] wrote:

 It's been in dbus-glib since June, right after the release of 0.76:

 http://gitweb.freedesktop.org/?p=dbus/dbus-glib.git;a=blobdiff;h=ee760113af2d89ac526ac247f25552f90239972f;hp=3744d8439b461957040df4dd1ba555906bbedc54;hb=d1b80d803a0268bd4b3dd5b9a9522230461f2947;f=dbus/dbus-gobject.c

 maybe that means time for another dbus-glib release Colin?

There are a couple of patches queued that would be good to get in
first, but should be soon.
___
NetworkManager-list mailing list
NetworkManager-list@gnome.org
http://mail.gnome.org/mailman/listinfo/networkmanager-list


problem with networkmanager dbus api

2008-10-28 Thread Sebastian Dransfeld

Hi,

I try to use the org.freedesktop.DBus.Properties.GetAll() method call 
with networkmanager like this (change device to one you got):


dbus-send --system --print-reply --type=method_call \
--dest=org.freedesktop.NetworkManager \
/org/freedesktop/Hal/devices/net_00_01_6c_ea_69_1b \
org.freedesktop.DBus.Properties.GetAll \
string:org.freedesktop.NetworkManager.Device

This will return nothing, as libdbus-glib maps dbus properties to 
gobject properties. In networkmanager these do not match:


gobject dbus
udi Udi
interface   Interface
driver  Driver
capabilitiesCapabilities
ip4-address Ip4Address
etc.

The gobject properties do however have a nick which matches the dbus 
property name.


Where should this problem be solved? networkmamager or dbus-glib?

If someone can suggest a solution, I can try to create a patch.

Best regards
Sebastian Dransfeld

___
NetworkManager-list mailing list
NetworkManager-list@gnome.org
http://mail.gnome.org/mailman/listinfo/networkmanager-list


Re: problem with networkmanager dbus api

2008-10-28 Thread Sebastian Dransfeld

Sebastian Dransfeld wrote:

Hi,

I try to use the org.freedesktop.DBus.Properties.GetAll() method call 
with networkmanager like this (change device to one you got):


dbus-send --system --print-reply --type=method_call \
--dest=org.freedesktop.NetworkManager \
/org/freedesktop/Hal/devices/net_00_01_6c_ea_69_1b \
org.freedesktop.DBus.Properties.GetAll \
string:org.freedesktop.NetworkManager.Device

This will return nothing, as libdbus-glib maps dbus properties to 
gobject properties. In networkmanager these do not match:


gobjectdbus
udiUdi
interfaceInterface
driverDriver
capabilitiesCapabilities
ip4-addressIp4Address
etc.

The gobject properties do however have a nick which matches the dbus 
property name.


Where should this problem be solved? networkmamager or dbus-glib?

If someone can suggest a solution, I can try to create a patch.


And of course:
OS:
- Ubuntu 8.10
Packages:
- libdbus-glib-1-2  0.76-1
- network-manager   0.7~~svn20081018t105859-0ubuntu1

Best regards
Sebastian Dransfeld
___
NetworkManager-list mailing list
NetworkManager-list@gnome.org
http://mail.gnome.org/mailman/listinfo/networkmanager-list


Re: problem with networkmanager dbus api

2008-10-28 Thread Sebastian Dransfeld

Sebastian Dransfeld wrote:

Sebastian Dransfeld wrote:

Hi,

I try to use the org.freedesktop.DBus.Properties.GetAll() method call 
with networkmanager like this (change device to one you got):


dbus-send --system --print-reply --type=method_call \
--dest=org.freedesktop.NetworkManager \
/org/freedesktop/Hal/devices/net_00_01_6c_ea_69_1b \
org.freedesktop.DBus.Properties.GetAll \
string:org.freedesktop.NetworkManager.Device

This will return nothing, as libdbus-glib maps dbus properties to 
gobject properties. In networkmanager these do not match:


gobjectdbus
udiUdi
interfaceInterface
driverDriver
capabilitiesCapabilities
ip4-addressIp4Address
etc.

The gobject properties do however have a nick which matches the dbus 
property name.


Where should this problem be solved? networkmamager or dbus-glib?

If someone can suggest a solution, I can try to create a patch.


And of course:
OS:
- Ubuntu 8.10
Packages:
- libdbus-glib-1-2  0.76-1
- network-manager   0.7~~svn20081018t105859-0ubuntu1


And fixed it. Missing _dbus_gutils_wincaps_to_uscore() in dbus-glib's 
getall implementation. Where should I send this patch?


Best regards
Sebastian Dransfeld
--- dbus/dbus-gobject.c.orig	2008-10-28 22:42:36.0 +0100
+++ dbus/dbus-gobject.c	2008-10-28 22:42:39.0 +0100
@@ -796,6 +796,7 @@
 {
   const char *prop_ifname;
   const char *prop_name;
+  char *gobject_prop_name;
   GParamSpec *pspec;
   GType value_gtype;
   GValue value = {0, };
@@ -815,7 +816,9 @@
 p++;
   p++;
 
-  pspec = g_object_class_find_property (G_OBJECT_GET_CLASS (object), prop_name);
+  gobject_prop_name = _dbus_gutils_wincaps_to_uscore (prop_name);
+  pspec = g_object_class_find_property (G_OBJECT_GET_CLASS (object), gobject_prop_name);
+  g_free (gobject_prop_name);
   if (pspec == NULL)
 {
   g_warning (introspection data references non-existing property %s, prop_name);
___
NetworkManager-list mailing list
NetworkManager-list@gnome.org
http://mail.gnome.org/mailman/listinfo/networkmanager-list