Commit graph

57 commits

Author SHA1 Message Date
Colin Walters
6fe36d8791 2005-06-16 Colin Walters <walters@verbum.org>
* dbus/Makefile.am:
	* mono/doc/Makefile.am:
	* test/glib/Makefile.am:

	Fix srcdir != builddir issues (Patch from Chris Wilson, #3477)
2005-06-16 04:32:50 +00:00
Joe Shaw
bcdd185483 2005-03-15 Joe Shaw <joeshaw@novell.com>
* mono/ProxyBuilder.cs (BuildFinalizer): Fix some invalid IL when
	generating the finalizer.  Fixes from Ben Maurer.
2005-03-15 23:30:55 +00:00
Joe Shaw
42287b94d1 2005-03-13 Joe Shaw <joeshaw@novell.com>
* mono/ProxyBuilder.cs (BuildConstructor): Decalre a local
	variable for storing our callback in.  Update the allocation
	comments.
2005-03-13 05:07:35 +00:00
Joe Shaw
dfa00f175b 2005-03-12 Joe Shaw <joeshaw@novell.com>
* mono/BusDriver.cs: Update method names: ListServices
	becomes ListNames; GetOwner becomes GetNameOwner.
2005-03-13 02:15:09 +00:00
Joe Shaw
2452ac5cdf 2005-03-12 Joe Shaw <joeshaw@novell.com>
* mono/ProxyBuilder.cs (BuildFinalizer): Need to load arg 0
	onto the eval stack when removing the delegate.
2005-03-13 02:05:56 +00:00
Joe Shaw
727073e691 2005-03-12 Joe Shaw <joeshaw@novell.com>
* mono/dbus-sharp.dll.config.in: Don't hardcode 0 for
	LT_CURRENT.  Set it to the autoconf variable.
2005-03-13 01:56:29 +00:00
Joe Shaw
79bc662439 *** empty log message *** 2005-03-13 01:13:04 +00:00
Joe Shaw
2958e723fc 2005-03-08 Joe Shaw <joeshaw@novell.com>
Fix a bunch of lifecycle and memory management problems
	in the mono bindings.

	* mono/Arguments.cs (Arguments): Implement IDisposable

	* mono/Bus.cs (Bus): Don't allow public instantiation.  This is
	strictly a static class.

	* mono/Connection.cs: Move the DBusObjectPathVTable and associated
	delegates into this file.
	(Connection): Implement IDisposable.
	(Dispose): Disconnect the connection and set the raw connection
	pointer to IntPtr.Zero.
	(~Connection): Call Dispose().
	(RegisterObjectPath): Added.  Manages the registration of object
	paths so we can cleanly disconnect them at dispose/finalize time.
	(UnregisterObjectPath): Ditto.
	(set_RawConnection): Unregister all of the object paths when
	changing the underlying DBusConnection.  Add them back onto the
	new connection, if any.

	* mono/Handler.cs: Don't implement IDisposable; it doesn't use any
	more unmanaged resources anymore, so it's not necessary.  Move all
	the DBusObjectPathVTable stuff out of here.
	(Handler): Save references to our delegates so that they don't get
	finalized.  Call Connection.RegisterObjectPath() instead of
	dbus_connection_register_object_path() directly.
	(Message_Called): Dispose the message after we're finished with
	it.

	* mono/Message.cs (Message): Implement IDisposable.
	(Dispose): Dispose the Arguments, and set the RawMessage to
	IntPtr.Zero.
	(SendWithReplyAndBlock): We own the ref to the reply that comes
	back from dbus_connection_send_with_reply_and_block() so add a
	comment about that and unref it after we've constructed a managed
	MethodReturn class around it.  Fixes a big, big leak.

	* mono/ProxyBuilder.cs: Reflect into Message to get the Dispose
	method.
	(BuildSignalHandler): After we've sent the Signal message, dispose
	of it.
	(BuildMethod): Dispose of the method call and reply messages after
	we've sent the message and extracted the data we want from the
	reply.

	* mono/Service.cs (UnregisterObject): Don't call handler.Dispose()
	anymore.
	(Service_FilterCalled): Dispose of the message after we're
	finished with it.
2005-03-09 04:36:15 +00:00
Joe Shaw
d96c9e465a 2005-03-08 Joe Shaw <joeshaw@novell.com>
* dbus/dbus-connection.c (dbus_connection_send_with_reply):
        After we attach our pending call to the connection, unref
        it.  Fixes a leak.

        * mono/Connection.cs (set_RawConnection): Disconnect our
        filter and match callbacks from the old connection and
        reconnect them to the new connection, if any.

	* mono/DBusType/Array.cs: "Code" is a static member, so
	don't use "this" to refer to it.  Fix for stricter checking
	in Mono 1.1.4.

        * mono/DBusType/ObjectPath.cs (Append): Don't leak the
	object path that we pass into unmanaged code.

        * mono/DBusType/String.cs (Append): Don't leak the string
	that we pass into unmanged code.
2005-03-08 20:45:03 +00:00
Joe Shaw
0242b82152 2005-02-11 Joe Shaw <joeshaw@novell.com>
* mono/Connection.cs: The unpredictability of finalizers in mono
	prevents us from deterministically disconnecting the filters from
	the Service class's finalizer, so move tracking of filters and
	matches here.  Add API for that.

	* mono/Service.cs: Remove the code, add code which calls the
	methods now on the Connection class.
2005-02-12 00:51:33 +00:00
Joe Shaw
fd146b370d 2005-02-10 Joe Shaw <joeshaw@novell.com>
* dbus/dbus-connection.c
	(_dbus_connection_queue_received_message_link,
	_dbus_connection_message_sent): Add the path to
	the verbose output.
	(_dbus_connection_send_preallocated_and_unlock): Added.  Calls
	_dbus_connection_send_preallocated_unlocked(), updated the
	dispatch status, and unlocks.  Fixes a bug where certain
	situations (like a broken pipe) could cause a Disconnect message
	to not be sent, tricking the bus into thinking a service was still
	there when the process had quit.
	(_dbus_connection_send_preallocated): Call
	_dbus_connection_send_preallocated_and_unlock().
	(_dbus_connection_send_and_unlock): Added.  Calls
	_dbus_connection_send_preallocated_and_unlock().
	(dbus_connection_send): Call _dbus_connection_send_and_unlock().
	(dbus_connection_send_with_reply): Update the dispatch status and
	unlock.

	* mono/Service.cs (~Service): Added.  Removes the filter so that
	we don't get unmanaged code calling back into a GCed delegate.
	(RemoveFilter); Added.
2005-02-10 23:01:28 +00:00
Joe Shaw
b0002eb697 2005-01-25 Joe Shaw <joeshaw@novell.com>
* Land the mono binding changes to conform to the new APIs.

	* mono/Makefile.am: Remove Custom.cs, DBusType/Custom.cs,
	DBusType/Dict.cs, and DBusType/Nil.cs from the build.

	* mono/Arguments.cs (GetCodeAsString): Added.  Returns the dbus
	type code as a string.
	(InitAppending): Rename dbus_message_append_iter_init() to
	dbus_message_iter_init_append().

	* mono/BusDriver.cs: Rename ServiceEventHandler to
	NameOwnerChangedHandler.  Rename GetServiceOwner to GetOwner.
	Rename ServiceOwnerChanged to NameOwnerChanged.

	* mono/Connection.cs: Rename BaseService to UniqueName, and the
	underlying C call.

	* mono/Custom.cs: Removed.  The CUSTOM type has been removed.

	* mono/Service.cs: Rename Exists to HasOwner, internally rename
	dbus_bus_acquire_service() to dbus_bus_request_name().

	* mono/DBusType/Array.cs (ctor): Use Type.GetElementType() instead
	of Type.UnderlyingSystemType to get the correct element type for
	the array.
	(ctor): Update code for new APIs: use dbus_message_iter_recurse(),
	dbus_message_get_{element|arg}_type() instead of
	dbus_message_iter_init_array_iterator().
	(Append): Replace dbus_message_iter_append_array() with
	dbus_message_iter_open_container() and
	dbus_message_iter_close_container().

	* mono/DBusType/Custom.cs, mono/DBusType/Nil.cs: Removed.  These
	types have been removed.

	* mono/DBusType/*.cs: Replace calls of
	dbus_message_iter_get_[type]() to dbus_message_iter_get_basic(),
	but specify the type in the DllImport extern declaration.  Ditto
	for dbus_message_iter_append_[type]() ->
	dbus_message_iter_append_basic().

	* mono/example/BusListener.cs: Update for ServiceEventHandler ->
	NameOwnerChangedHandler.
2005-01-25 19:47:13 +00:00
Joe Shaw
ce11956e45 2005-01-12 Joe Shaw <joeshaw@novell.com>
* mono/Makefile.am, mono/example/Makefile.am: Always build the
	dbus DLL with --debug.  Clean up after the .mdb files this leaves
	behind.
2005-01-12 22:52:34 +00:00
Joe Shaw
c6adffbbcf 2005-01-12 Joe Shaw <joeshaw@novell.com>
* mono/Makefile.am, mono/example/Makefile.am: Always build the
	dbus DLL with --debug.  Clean up after the .mdb files this leaves
	behind.
2005-01-12 22:48:20 +00:00
Joe Shaw
5d2e90f279 2005-01-12 Joe Shaw <joeshaw@novell.com>
* mono/doc/Makefile.am: Need to uninstall the docs on "make
	uninstall"
2005-01-12 22:41:29 +00:00
Joe Shaw
ddea52aef6 2005-01-12 Joe Shaw <joeshaw@novell.com>
* mono/Makefile.am, mono/example/Makefile.am: Always build the
	dbus DLL with --debug.
2005-01-12 22:34:28 +00:00
Joe Shaw
2388bc86ee 2005-01-12 Joe Shaw <joeshaw@novell.com>
* mono/Makefile.am: Always build the dbus DLL with --debug.

	* mono/Arguments.cs (GetDBusTypeConstructor): If the type
	is an enum, get the enum's underlying type.  Another mono
	1.1.3 fix.
2005-01-12 17:31:08 +00:00
Joe Shaw
ad03f2672d 2005-01-11 Joe Shaw <joeshaw@novell.com>
Patch from Sjoerd Simons <sjoerd@luon.net>

	* mono/Makefile.am, mono/example/Makefile.am: Don't redefine
	DESTDIR.  It breaks stuff.
2005-01-11 22:09:16 +00:00
Joe Shaw
b3ba709079 2005-01-11 Joe Shaw <joeshaw@novell.com>
Patch from Tambet Ingo <tambet@ximian.com>

	* mono/DBusType/Array.cs (Get): Get the underlying element type by
	calling type.GetElementType().  The code previously depended on
	broken Mono behavior, which was fixed in Mono 1.1.3.

	* mono/DBusType/Dict.cs (constructor): Fix the parameters for
	Activator.CreateInstance() so that the class's constructor is
	called with the right parameters.
2005-01-11 19:59:06 +00:00
Joe Shaw
b360305cda 2004-12-17 Joe Shaw <joeshaw@novell.com>
* mono/DBusType/Byte.cs, mono/DBusType/Int32.cs,
	mono/DBusType/Int64.cs, mono/DBusType/UInt32.cs,
	mono/DBusType/UInt64.cs: Use Enum.GetUnderlyingType() instead of
	Type.UnderlyingSystemType to get the actual system type
	underneath.  This code previously depended on the broken Mono
	behavior, which was fixed in 1.1.3.
2004-12-17 22:21:16 +00:00
Owen Fraser-Green
c7417009b1 Patch from Johan Fischer to make mono doc install create the doc dir. 2004-11-02 10:19:20 +00:00
Colin Walters
fbc29a8a78 2004-10-29 Colin Walters <walters@redhat.com>
Patch from Ed Catmur <ed@catmur.co.uk>

	* mono/doc/Makefile.am (install-data-local): Handle
	DESTDIR.
2004-10-29 19:22:59 +00:00
Joe Shaw
d8c8992b40 2004-10-27 Joe Shaw <joeshaw@novell.com>
* mono/Arguments.cs (GetDBusTypeConstructor):
	type.UnderlyingSystemType will return "System.Byte" if you do it
	on "byte[]", which is not what we want.  So check the type.IsArray
	property and use System.Array instead.
2004-10-27 22:35:03 +00:00
Jon Trowbridge
0c168e3e15 2004-09-28 Jon Trowbridge <trow@ximian.com>
* mono/BusDriver.cs: Changed BusDriver struct to remove
	    the ServiceCreated and ServiceDeleted events and replace them
	    with the new ServiceOwnerChanged event.

	    * mono/example/BusListener.cs: Added a new example program,
	    which listens for and reports any ServiceOwnerChanged events
	    on the bus driver.

	    * mono/example/Makefile.am (DESTDIR): Build changes for the
	    new BusListener.cs example.
2004-09-29 01:46:45 +00:00
Jon Trowbridge
64b63e84b7 2004-09-20 Jon Trowbridge <trow@ximian.com>
Patch from Nat Friedman <nat@novell.com>

	    * mono/Makefile.am: A number of small build fixes to allow "make
	    distcheck" to succeed.

	    * mono/example/Makefile.am: "make distcheck" fixes.

	    * mono/AssemblyInfo.cs.in: When signing the assembly, look for the
	    key in @srcdir@.

	    * test/Makefile.am: "make distcheck" fixes.
2004-09-20 11:24:38 +00:00
Jon Trowbridge
4a77a2dd97 2004-08-30 Jon Trowbridge <trow@ximian.com>
* mono/BusDriver.cs: Added.  This is a class for interacting with
	    the org.freedesktop.DBus service.

	    * mono/Message.cs: Added a mechanism to expose the message that is
	    currently being dispatched via the static Message.Current
	    property.  Added Message.Sender and Message.Destination
	    properties.

	    * mono/Handler.cs: Expose the dispatched message via
	    Message.Current when handling method calls.

	    * mono/Service.cs: Expose the dispatched message via
	    Message.Current when handling signal emissions.

	    * mono/Connection.cs: Bind dbus_bus_get_base_service via the
	    Connection.BaseService property.
2004-08-31 03:59:14 +00:00
Jon Trowbridge
3a78ce1795 Mapped CRLF -> LF for consistency. 2004-08-29 18:14:30 +00:00
Joe Shaw
00f0e76788 2004-08-17 Joe Shaw <joeshaw@novell.com>
* configure.in: If --enable-mono is passed in, if we can't find
	mono error out.

	* mono/Makefile.am: Use /gacutil to install assemblies into the
	GAC and not /root.
2004-08-17 17:08:32 +00:00
Colin Walters
3d0f1fb1b6 2004-07-06 Colin Walters <walters@redhat.com>
* doc/Makefile.am, qt/Makefile.am:
	mono/doc/Makefile.am: Allow 'make dist'
	without doc building of various sorts or
	QT support enabled.
2004-07-06 15:15:59 +00:00
Owen Fraser-Green
41a369c333 Changes in-line with new object_path param changes. Also bumped required mono version and use new -pkg flag. 2004-06-07 11:40:20 +00:00
Owen Fraser-Green
e55e38d8df Added UnregisterObject method. 2004-05-23 21:33:14 +00:00
Owen Fraser-Green
da36a58bb0 Shhh... 2004-05-18 13:51:19 +00:00
Owen Fraser-Green
52907e3a8a Shhh... 2004-05-15 21:10:46 +00:00
Owen Fraser-Green
8bc62a2864 Various mono related changes to facilitate GAC support. 2004-05-15 19:31:12 +00:00
Owen Fraser-Green
a3942cbc6f Fixed another typo! Grrrr... 2004-05-15 13:24:00 +00:00
Owen Fraser-Green
5cc3edb30b Fixed typeo 2004-05-15 13:22:18 +00:00
Owen Fraser-Green
d1b264b031 Added mono documentation. 2004-05-15 11:44:44 +00:00
Owen Fraser-Green
375d665f74 Added documentation directory 2004-05-15 11:37:59 +00:00
Owen Fraser-Green
c9528c10af Removed test-dbus-sharp.exe from all target. 2004-05-02 16:15:52 +00:00
Owen Fraser-Green
3c6ef3df27 Handle empty iterators properly! 2004-05-01 19:59:58 +00:00
Owen Fraser-Green
e16dafeb5f Handle empty iterators. 2004-05-01 19:56:27 +00:00
Owen Fraser-Green
8056390e00 Made proxy DLL names unique 2004-04-03 22:00:40 +00:00
Michael Meeks
d7a044a138 hush. 2004-03-29 12:50:45 +00:00
Owen Fraser-Green
45277e93d8 Added signal support. 2004-03-26 15:25:59 +00:00
Owen Fraser-Green
7dd5704023 Added support for enumerations with marshalling to/from their underlying system type (Byte, Int32, UInt32, Int64, UInt64) 2004-03-25 14:04:43 +00:00
Owen Fraser-Green
e29f0448ec Modified to support char type. 2004-03-24 17:02:08 +00:00
Owen Fraser-Green
a745a709d0 Fixed bug preventing creating multiple proxy objects of the same type. 2004-03-24 14:42:41 +00:00
Owen Fraser-Green
f334538967 Made all DBusTypes take Service in the constructor because Array also needed it in the case of an array of OBJECT_PATH objects. 2004-03-24 13:15:20 +00:00
Owen Fraser-Green
93aa620356 Changed Suits method to not look recursively for Interface attributes 2004-03-24 10:28:15 +00:00
Owen Fraser-Green
632d54e0db Added InterfaceProxy to Mono bindings to avoid having to generate a proxy for every registered object. Also added object_path functions to dbus-message. 2004-03-23 18:07:48 +00:00