From 773e7727ef54794efcde10c534de01554196e033 Mon Sep 17 00:00:00 2001 From: Frederik 'playya' Sdun Date: Wed, 29 Apr 2009 12:36:53 +0200 Subject: [PATCH] Now ListObjectPaths returns DBus.ObjectPath[] --- src/obj.vala | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/obj.vala b/src/obj.vala index 4491831..0f08395 100644 --- a/src/obj.vala +++ b/src/obj.vala @@ -125,12 +125,12 @@ public class Server : Object return names; } - public string[] ListObjectPaths( string? busname ) throws DBus.Error + public DBus.ObjectPath[] ListObjectPaths( string? busname ) throws DBus.Error { // // Check whether the given busname is present on the bus // - var paths = new List(); + var paths = new List(); var existing_busnames = this.ListBusNames(); bool found = false; foreach ( string name in existing_busnames ) @@ -145,13 +145,13 @@ public class Server : Object { message( "requested busname '%s' not found.", busname ); // FIXME return a dbus error? - return stringListToArray( paths ); + return objectPathListToArray( paths ); } - listObjectPaths( ref paths, busname, "/" ); - return stringListToArray( paths ); + listObjectPaths( ref paths, busname, (DBus.ObjectPath)"/" ); + return objectPathListToArray( paths ); } - private void listObjectPaths( ref List paths, string busname, string objname ) throws DBus.Error + private void listObjectPaths( ref List paths, string busname, DBus.ObjectPath objname ) throws DBus.Error { debug( "listObjectPaths: %s, %s", busname, objname ); dynamic DBus.Object obj = conn.get_object( busname, objname, DBUS_INTERFACE_INTROSPECTABLE ); @@ -161,10 +161,10 @@ public class Server : Object if ( data.nodes.length() > 0 ) foreach ( string node in data.nodes ) { - if ( objname == "/" ) - listObjectPaths( ref paths, busname, objname+node ); + if ( objname == (DBus.ObjectPath)"/" ) + listObjectPaths( ref paths, busname, (DBus.ObjectPath)((string)objname+node) ); else - listObjectPaths( ref paths, busname, objname+"/"+node ); + listObjectPaths( ref paths, busname, (DBus.ObjectPath)((string)objname+"/"+node) ); } } -- 2.11.4.GIT