From 41a369c333a2b60deaed307c22c88395f4d12cf6 Mon Sep 17 00:00:00 2001 From: Owen Fraser-Green Date: Mon, 7 Jun 2004 11:40:20 +0000 Subject: Changes in-line with new object_path param changes. Also bumped required mono version and use new -pkg flag. --- mono/DBusType/ObjectPath.cs | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'mono/DBusType') diff --git a/mono/DBusType/ObjectPath.cs b/mono/DBusType/ObjectPath.cs index 40460bbf..f82c6804 100644 --- a/mono/DBusType/ObjectPath.cs +++ b/mono/DBusType/ObjectPath.cs @@ -12,7 +12,7 @@ namespace DBus.DBusType public class ObjectPath : IDBusType { public const char Code = 'o'; - private string pathName = null; + private string path = null; private object val = null; private Service service = null; @@ -29,25 +29,25 @@ namespace DBus.DBusType public ObjectPath(IntPtr iter, Service service) { - this.pathName = Marshal.PtrToStringAnsi(dbus_message_iter_get_object_path(iter)); + this.path = Marshal.PtrToStringAnsi(dbus_message_iter_get_object_path(iter)); this.service = service; } - private string PathName + private string Path { get { - if (this.pathName == null && this.val != null) { + if (this.path == null && this.val != null) { Handler handler = this.service.GetHandler(this.val); - this.pathName = handler.PathName; + this.path = handler.Path; } - return this.pathName; + return this.path; } } public void Append(IntPtr iter) { - if (!dbus_message_iter_append_object_path(iter, Marshal.StringToHGlobalAnsi(PathName))) + if (!dbus_message_iter_append_object_path(iter, Marshal.StringToHGlobalAnsi(Path))) throw new ApplicationException("Failed to append OBJECT_PATH argument:" + val); } @@ -84,7 +84,7 @@ namespace DBus.DBusType public object Get(System.Type type) { try { - return this.service.GetObject(type, PathName); + return this.service.GetObject(type, Path); } catch(Exception ex) { throw new ArgumentException("Cannot cast object pointed to by Object Path to type '" + type.ToString() + "': " + ex); } @@ -94,6 +94,6 @@ namespace DBus.DBusType private extern static IntPtr dbus_message_iter_get_object_path(IntPtr iter); [DllImport("dbus-1")] - private extern static bool dbus_message_iter_append_object_path(IntPtr iter, IntPtr pathName); + private extern static bool dbus_message_iter_append_object_path(IntPtr iter, IntPtr path); } } -- cgit