dbus/mono Handler.cs,1.5,1.6 Makefile.am,1.8,1.9

Owen Fraser-Green ow3n at pdx.freedesktop.org
Mon Jun 7 04:40:22 PDT 2004


Update of /cvs/dbus/dbus/mono
In directory pdx:/tmp/cvs-serv15109/mono

Modified Files:
	Handler.cs Makefile.am 
Log Message:
Changes in-line with new object_path param changes. Also bumped required mono version and use new -pkg flag.


Index: Handler.cs
===================================================================
RCS file: /cvs/dbus/dbus/mono/Handler.cs,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- a/Handler.cs	23 May 2004 21:33:14 -0000	1.5
+++ b/Handler.cs	7 Jun 2004 11:40:20 -0000	1.6
@@ -15,8 +15,7 @@
 
   internal class Handler : IDisposable
   {
-    private string[] path = null;
-    private string pathName = null;
+    private string path = null;
     private Introspector introspector = null;
     private object handledObject = null;
     private DBusObjectPathVTable vTable;
@@ -69,7 +68,7 @@
 	service = null;
 
 	// Clean up unmanaged resources
-	if (Connection != null && Connection.RawConnection != IntPtr.Zero && path != null) {
+	if (Connection != null && Connection.RawConnection != IntPtr.Zero && Path != null) {
 	  dbus_connection_unregister_object_path(Connection.RawConnection,
 						 Path);
 	}	
@@ -88,17 +87,13 @@
     }
 
     public Handler(object handledObject, 
-		   string pathName, 
+		   string path, 
 		   Service service)
     {
       Service = service;
       Connection = service.Connection;
       HandledObject = handledObject;
-
-      // Strip the leading / off if there is one and get the path as an array
-      pathName = pathName.TrimStart('/');
-      this.path = pathName.Split('/');
-      this.pathName = "/" + pathName;
+      this.path = path;
       
       // Create the vTable and register the path
       vTable = new DBusObjectPathVTable(new DBusObjectPathUnregisterFunction(Unregister_Called), 
@@ -115,7 +110,7 @@
 
     private void RegisterSignalHandlers()
     {
-      ProxyBuilder proxyBuilder = new ProxyBuilder(Service, HandledObject.GetType(), this.pathName);
+      ProxyBuilder proxyBuilder = new ProxyBuilder(Service, HandledObject.GetType(), Path);
 
       foreach (DictionaryEntry interfaceEntry in this.introspector.InterfaceProxies) {
 	InterfaceProxy interfaceProxy = (InterfaceProxy) interfaceEntry.Value;
@@ -195,7 +190,7 @@
       return Result.Handled;
     }
 
-    internal string[] Path 
+    internal string Path 
     {
       get 
 	{
@@ -203,14 +198,6 @@
 	}
     }
 
-    public string PathName
-    {
-      get
-	{
-	  return pathName;
-	}
-    }
-
     internal Connection Connection 
     {
       get
@@ -238,10 +225,10 @@
     }
 
     [DllImport ("dbus-1")]
-    private extern static bool dbus_connection_register_object_path (IntPtr rawConnection, string[] path, ref DBusObjectPathVTable vTable, IntPtr userData);
+    private extern static bool dbus_connection_register_object_path (IntPtr rawConnection, string path, ref DBusObjectPathVTable vTable, IntPtr userData);
 
     [DllImport ("dbus-1")]
-    private extern static void dbus_connection_unregister_object_path (IntPtr rawConnection, string[] path);
+    private extern static void dbus_connection_unregister_object_path (IntPtr rawConnection, string path);
 
   }
 }

Index: Makefile.am
===================================================================
RCS file: /cvs/dbus/dbus/mono/Makefile.am,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- a/Makefile.am	15 May 2004 19:31:12 -0000	1.8
+++ b/Makefile.am	7 Jun 2004 11:40:20 -0000	1.9
@@ -54,7 +54,7 @@
 	$(CSC) --unsafe --target library -o dbus-sharp.dll $(DBUS_SHARP_FILES) AssemblyInfo.cs
 
 test-dbus-sharp.exe: $(TEST_DBUS_SHARP_FILES)
-	$(CSC) --unsafe --target exe -L . -r dbus-sharp.dll -r gtk-sharp.dll -o test-dbus-sharp.exe $(TEST_DBUS_SHARP_FILES)
+	$(CSC) --unsafe --target exe -L . -r dbus-sharp.dll -pkg:gtk-sharp -o test-dbus-sharp.exe $(TEST_DBUS_SHARP_FILES)
 
 clean:
 	rm -f $(TARGET) $(NOINST_EXES)




More information about the dbus-commit mailing list