java dbus bindings and network manager issues

Greg DeAngelis gdeangel at gmail.com
Fri Mar 13 13:34:35 PDT 2009


Matt--

I have attached two NetworkManager stubs, NetworkManager.java and
NetworkManagerSettings.java. NMJavaDBusIssues.java shows the issues
I'm experiencing. Marshalling.patch is the hack I made to at least
allow me to retrieve paths that don't exist/exist on a different
interface. I explain my need for this below.

First Issue:

I had trouble finding an example of how to define a stub with
properties and the CreateInterface tool ignores properties so I was
just requesting a remote DBus.Properties object on a path and
interface. I hope that right but either way, the ActiveConnections
function in NMJavaDBusIssues.java shows my problem retrieving a list
of path objects. Unlike the path issues below, these paths do exist
and are exposed on the same interface so its really an ObjectPath/Path
issue. It could be something I messed up but I'm not sure. Any
suggestions?

Second Issue:

If you take a look at the getActiveConnection function in
NMJavaDBusIssues.java you will see the Connection, ServiceName, and
SpecificObject properties. I have included a set of sample values
below.

Active Connections
/org/freedesktop/NetworkManager/ActiveConnection/0
  ServiceName: org.freedesktop.NetworkManagerSystemSettings
  Connection: /org/freedesktop/NetworkManagerSettings/0
  SpecificObject: /
  Devices:
   /org/freedesktop/Hal/devices/net_00_1a_a0_0b_a1_c5
/org/freedesktop/NetworkManager/ActiveConnection/4
  ServiceName: org.freedesktop.NetworkManagerSystemSettings
  Connection: /org/freedesktop/NetworkManagerSettings/1
  SpecificObject: /org/freedesktop/NetworkManager/AccessPoint/12
  Devices:
   /org/freedesktop/Hal/devices/net_00_1c_10_6d_3f_69

The "/" SpecificObject isn't valid because the path does not exist but
neither is either of the Connection property values because they are
exposed the interface "pointed to" by the ServiceName property and not
the org.freedesktop.NetworkManager interface the path was obtained
from. Both of these cases throw the same DBusExecutionException. The
problem with just not doing this is that I need that Connection path
to determine what connection is activated therefore making an
exception an unacceptable response. At the same time, I doubt my hack
patch is valid either. Is there a way to disable automatic proxy
creation that I'm missing?

Thanks for your time.


Greg
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Marshalling.patch
Type: text/x-patch
Size: 765 bytes
Desc: not available
Url : http://lists.freedesktop.org/archives/dbus/attachments/20090313/522f9a14/attachment.bin 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: NetworkManager.java
Type: text/x-java
Size: 10197 bytes
Desc: not available
Url : http://lists.freedesktop.org/archives/dbus/attachments/20090313/522f9a14/attachment.java 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: NetworkManagerSettings.java
Type: text/x-java
Size: 2456 bytes
Desc: not available
Url : http://lists.freedesktop.org/archives/dbus/attachments/20090313/522f9a14/attachment-0001.java 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: NMJavaDBusIssues.java
Type: text/x-java
Size: 3050 bytes
Desc: not available
Url : http://lists.freedesktop.org/archives/dbus/attachments/20090313/522f9a14/attachment-0002.java 


More information about the dbus mailing list