use variant typed arguments extensively. Inside those, we don't
have any introspection information, and the other side might have
expectations that we don't know about. Hence, we now have classes
to explicitly identify the format we want to pass the object in.
Using these new classes, our implementation of the D-Bus menu protocol
has is finally progressed into working state!
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/dbuskit/trunk@37606 72102866-910b-0410-8b05-ffd578937521
This also changes the behaviour of DKPort: If a local receive
port is requested, we now cache it and always return the
same instance. This makes sense because the underlying
DKEndpoint is shared anyways, and it fixes a bug where
multiple ports were exposing different parts of the object
graph without knowing about each other (this only became
apparent when the notification center class started looking
up the proxies and couldn't find them eventhough they were
properly exported).
Also contains some debugging and example improvements.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/dbuskit/trunk@37604 72102866-910b-0410-8b05-ffd578937521
using a mixture of C-style arguments and varags in a
slightly confusing way. Introduce new replacement methods
that accept the filter specification as a dictionary.
Documentation improvements.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/dbuskit/trunk@37586 72102866-910b-0410-8b05-ffd578937521
on D-Bus. This is only required in some corner cases where the structure
appears inside a variant-typed argument. This means that we don't have any
introspection information to decide whether we want to marshall an NSArray
as a D-Bus structure or a D-Bus array.
Also start support for converting NSData to D-Bus byte arrays.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/dbuskit/trunk@37531 72102866-910b-0410-8b05-ffd578937521
for manually loading instrospection metadata into a outward facing proxy.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/dbuskit/trunk@36797 72102866-910b-0410-8b05-ffd578937521
(no methods get yet exposed on the bus, though). Fix a couple of bugs.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/dbuskit/trunk@35410 72102866-910b-0410-8b05-ffd578937521
and removing match rules. Turns out we can just call the corresponding methods
via the bus objects.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/dbuskit/trunk@33033 72102866-910b-0410-8b05-ffd578937521
Also sanitize the dependencies of DKNotificationCenter and DKDBus (previously,
certain conditions could trigger them to go into an infinite loop calling each
other).
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/dbuskit/trunk@32210 72102866-910b-0410-8b05-ffd578937521
libdbus to a separate thread and uses DKEndpointManager as a gateway to do so.
The new behaviour is disabled by default and can be enabled by calling [DKPort
enableWorkerThread].
This also contains various smaller improvements and fixes bugs that were exposed
when stuff was taking place asynchronously.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/dbuskit/trunk@32178 72102866-910b-0410-8b05-ffd578937521
level of abstraction that will be used by DKPortNameServer to handle connection
invalidation etc.
Note: This breaks binary compatibility for DKPort subclasses when using the
fragile ABI.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/dbuskit/trunk@31376 72102866-910b-0410-8b05-ffd578937521
* GNUmakefile: Add documentation to the build.
* GNUmakefile.preamble: Add version variable.
* Documentation/GNUmakefile
Documentation/GNUmakefile.postamble
Documentation/readme.texi
Documentation/install.texi
Documentation/DBusKit.gsdoc:
Build README and INSTALL as well as reference documentation.
* Headers/DKProxy.h
Headers/DKPort.h
Headers/DNotificationCenter.h:
Mark ivars as private. Minor documentation improvements.
* README
INSTALL:
Regenerate.
Improvements to the documentation.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/dbuskit/trunk@31169 72102866-910b-0410-8b05-ffd578937521
* Source/DKProxy.m: Use correct path to the bus object.
* Source/DKNotificationCenter.m: Observe name changes so
that sender rules for observables stay up to date.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/dbuskit/trunk@31129 72102866-910b-0410-8b05-ffd578937521
* Headers/DKNotificationCenter.h: Documented DKNotificationCenter. Added ivar.
* Source/DKProxy.m: Override -respondsToSelector:. Protect generation of the
method cache so that a remote error doesn't leave the object in an unusable
state.
* Source/DKEndpoint.m: Fix DKWakeUp(). (Previously, it would create unwanted
reentrancy.)
* Source/DKNotificationCenter.m: Primitive support for observing D-Bus signals.
Preliminary support for D-Bus signals. Documentation improvements.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/dbuskit/trunk@31126 72102866-910b-0410-8b05-ffd578937521
Source/DKProxy.m
Source/DKInterface.[hm]:
Remove dispatch table from DKProxy and let DKInterface generate it instead.
* Source/DKInterface.[hm]: Fix memory leak. Rename -methodForSelector: to
-DBusMethodForSelector:. Also move registration of signals here.
* Source/DKMethod.m: Generate smarter method declarations.
* Source/DKIntrospectionParserDelegate.m: Return nil from -leaf instead of
NSNull. Improve handling signals.
* Source/DKSignal.[hm]: Implement generation of userInfo dictionaries for
notifications from received signals.
* Source/DKMethodCall.m: Small indentation fix.
* Headers/DKNotificationCenter.h
Source/DKNotificationCenter.m:
Bugfixes. Continue implementing generation of notifications from signals.
* Tests/TestDKMethodCall.m
Tests/TestDkMethod.m:
Use new method name.
A few bugfixes and improvements suggested by Fred Kiefer. Continued work on
D-Bus signals.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/dbuskit/trunk@31122 72102866-910b-0410-8b05-ffd578937521
* Header/DKNotificationCenter.h: Add notificationNames ivar.
* Source/DKNotificationCenter.m: Implement registration of signals and
notification names.
* DKIntrospectionParserDelegate.m: Parse signals and trigger their
registration with the appropriate notification center.
* Tests/TestDKProxy.m: Fix test for errors returned by remote objects.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/dbuskit/trunk@31094 72102866-910b-0410-8b05-ffd578937521
Source/DKProxy.m:
Add DKDBus subclass for getting shared proxies to the org.freedesktop.DBus
services on their respective busses.
* Source/DKProxy.m
Source/DKProxy+Private.h:
Implement -_uniqueName to get the unique name of a service from the bus.
* Headers/DKPort.h: Add "don't know" member value to the bus type enumeration.
* Source/DKPort.m: Use DKDBus instead of -getBusObject magic.
* Source/DKEndpoint.[hm]: Implement -DBusBusType to get the type of bus an
endpoint is connected to.
* Source/DKInterface.[hm]: Add some more methods for signals/properties.
* Headers/DKNotificationCenter.h
Source/DKNotificationCenter.m
Source/GNUmakefile:
Add very much work-in-progress notification center class for managing D-Bus
signals.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/dbuskit/trunk@31090 72102866-910b-0410-8b05-ffd578937521
Source/DKPort.m:
Add DKDBusBusType enumeration and related initializer.
* Source/DKArgument.m
Source/DKInterface.m
Source/DKIntrospectionNode.[hm]
Source/DKMethod.m
Source/DKObjectPathNode.m
Source/DKSignal.m:
Adopt NSCopying for DKIntrospectionNode and subclasses.
* Source/NSConnection+DBus.m: Add further integration methods (commented out
until DKPortNameServer can be committed).
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/dbuskit/trunk@31083 72102866-910b-0410-8b05-ffd578937521
Source/DKProxy.m:
Add an explicit NSCondition and a state variable to make synchronisation more
robust (and readable).
* Tests/TestDKProxy.m: Adopt to changed code and add test for calling methods
from multiple threads.
Thread safety improvements.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/dbuskit/trunk@31061 72102866-910b-0410-8b05-ffd578937521
Source/GNUmakefile
Source/DKObjectPathNode.[hm]
Source/DKProxy.m
Source/DKProxy+Private.h:
Add DKObjectPathNode class and protocol (handles object trees and interfaces).
Implement DKObjectPathNode protocol in DKProxy and expose it via
DKProxy+Private.h.
* Source/DKArgument.m
Source/DKIntrospectionNode.m
Source/DKMethod.m
Source/DKMethodCall.m
Source/DKOutgoingProxy.h
Source/DKPort.m
Source/DKProxy.m
Source/NSConnection+DBus.m:
Include new DKProxy+Private.h instead of the public header.
* Source/DKMethod.[hm]
Source/DKInterface.[hm]
Source/DKIntrospectionParserDelegate.m
Tests/TestDKMethod.m:
Rename initializers of DKMethod and DKInterface to follow the naming scheme of
the superclass more closely.
* Source/DKIntrospectionParserDelegate.[hm]: Use the parent to store the
introspection tree and not the parser delegate.
Clean up the generation of the introspection data so that the parser delegate
doesn't need to keep the generated tree around. Also be more consistent about
naming initializers in subclasses of DKIntrospectionNode.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/dbuskit/trunk@31045 72102866-910b-0410-8b05-ffd578937521
Source/NSConnection+DBus.m:
Add -proxyAtPath: method to obtain proxies for non-root objects of a D-Bus
service.
* Source/GNUmakefile: Add NSConnection+DBus.[hm] to build.
* Source/DKPort.m: Rearrange so that proxy generation is separated from encoding
the proxy for use in NSConnection.
* Headers/DBusKit.h: Add DKProxy.h and NSConnection+DBus.h.
* Tests/TestDKProxy.m: Test for fetching proxies to non-root objects.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/dbuskit/trunk@31012 72102866-910b-0410-8b05-ffd578937521
should or shouldn't be boxed based on the related invocation.
* Source/DKMethodCall.[hm]
Source/DKProxy.m
Tests/TestDKMethodCall.m
Tests/TestDKProxy.m:
Remove references to the old argument types which did statically decide on a
boxing scheme.
* Headers/DKProxy.h: Remove unused ivar.
Make better use of D-Bus and Objective-C introspection data to decide on the fly
whether an argument to a D-Bus method should be boxed in an Objective-C object
or not.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/dbuskit/trunk@30979 72102866-910b-0410-8b05-ffd578937521
* Source/AsyncBehavior.h: Minor addition.
* Source/DKArgument.[mh]: Remove -proxyParent method (now in superclass)
* Source/DKInterface.h: Declare -mangledName.
* Source/DKInterface.m: Implement selector/method-map and XML parser delegate
methods.
* Source/DKIntrospectionNode.[mh]: Move -proxyParent method here. Handle
annotations.
* Source/DKMethod.[hm]: Implement -selectorString method to generate selector
names. Also add XML parser delegate methods.
* Source/DKMethodCall.m: Fix bug where an D-Bus error was used unitialized.
* Source/DKProxy.m: Remove async stuff (pretty superfluous right now). Fix
various bugs in selector resolution and implement building the method cache.
* Source/Tests/TestDKProxy.m: Add tests for new functionality.
Implement the remaining bits of basic proxy functionality. Arbitrary D-Bus
methods can now be called when their arguments are boxed as Objective-C types.
Calling methods without boxing to come.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/dbuskit/trunk@30947 72102866-910b-0410-8b05-ffd578937521
* Source/DKInterface.[hm]: Remove superfluous -parent method.
* Source/DKMethod.m: Some more modularisation. Add comparison method.
Calculate offsets and sizes for signatures correctly.
* Headers/DKProxy.h: Add instance variables.
* Source/DKProxy.[hm]: Implement -forwardInvocation: and triggers to generate
the method cache (actual generation of the cache still missing).
* Source/Tests/TestDKProxy.m: Add test for calling Introspect() via the
built-in _DKMethodIntrospect.
* Source/Tests/TestDKArgument.m: Minor rearrangement.
Made dispatching D-Bus method calls work via -forwardInvocation:. As of yet, you
can only call -Introspect (this is needed to obtain the introspection data used
to build the actual method cache).
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/dbuskit/trunk@30912 72102866-910b-0410-8b05-ffd578937521
Source/Tests/TestDKArgument.m:
Tests for assignments in the initializers.
* Source/DKProxy.m
Headers/DKProxy.h:
-hasSameScopeAs: method to test whether two proxies fall into the scope of
one and the same D-Bus service.
* Source/DKArgument.h: Expose a few accessors.
* Source/DKArgument.m: Fix bug in the name assignment. Implement -name method.
Let the proxy do the scope checking.
* Source/DKMethod.m: Shuffle a few statements around for more natural ordering.
* configure.ac: Leave a TODO about needing to fix the configure script
ugliness.
* config.make.in: Another attempt to get linking done properly.
Many improvement suggested by Fred Kiefer.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/dbuskit/trunk@30687 72102866-910b-0410-8b05-ffd578937521
for ROOTPROXY_REQUEST messages: Connections to D-Bus can now return their own
proxies.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/dbuskit/trunk@30501 72102866-910b-0410-8b05-ffd578937521
DKEndpoint would result in a teardown of the D-Bus connection. Also work
around some libdbus strangeness that needs further investigation.
* Source/DKPort.m: Slightly more expressive designated initializer. Begin
stubbing out integration into NSConnection (not yet working).
* Headers/DKPort.h: Add initializer.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/dbuskit/trunk@30456 72102866-910b-0410-8b05-ffd578937521
on distclean).
Simple initializers for DKPort.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/dbuskit/trunk@30344 72102866-910b-0410-8b05-ffd578937521