93 Commits

Author SHA1 Message Date
Niels Grewe
9208cfdab4 * Source/DKArgument.m: Remove incorrect -release (spotted by Fred Kiefer).
* Source/Tests/TestDKMethodCall.m
  Source/Tests/TestDKArgument.m:
  Small test improvements.



git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/dbuskit/trunk@30915 72102866-910b-0410-8b05-ffd578937521
2010-07-03 10:45:25 +00:00
Niels Grewe
f5f682d47a * Source/AsyncBehavior.h: Add macros to do stuff asynchronously if possible.
* 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
2010-07-02 21:48:30 +00:00
Niels Grewe
ae2b4a5e7c * configure.ac: Fix autoconf test for location of runtime.h
* configure: Regenerate


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/dbuskit/trunk@30880 72102866-910b-0410-8b05-ffd578937521
2010-06-28 21:41:08 +00:00
Niels Grewe
d379ec1545 * Source/DKEndpoint.[hm]: Turn DKRunLoopContext into an instance variable.
Some features need access to the run loop and run loop mode information.
* Source/DKMethodCall.[hm]: Add implementation of synchronous method calls and
  stubbed out support for asynchronous calls.
* Source/GNUmakefile: Add new modules.
* Source/Tests/TestDKMethodCall.m: Add test for introspection method call.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/dbuskit/trunk@30872 72102866-910b-0410-8b05-ffd578937521
2010-06-26 22:51:34 +00:00
Niels Grewe
ff18e921f4 Fixed missing include.
Note to self: Compile, then commit.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/dbuskit/trunk@30871 72102866-910b-0410-8b05-ffd578937521
2010-06-26 19:19:54 +00:00
Niels Grewe
e56f8398d9 Add (un-)marshalling methods to the header.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/dbuskit/trunk@30870 72102866-910b-0410-8b05-ffd578937521
2010-06-26 19:18:40 +00:00
Niels Grewe
2db2ef08dd *Source/DKEndpoint.[mh]:
Add accessor method for the DBusConnection on libdbus-level.
* Source/GNUmakefile
  Source/DKMessage.[mh]:
  Add primitive class for sending message to D-Bus.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/dbuskit/trunk@30869 72102866-910b-0410-8b05-ffd578937521
2010-06-26 18:28:53 +00:00
Niels Grewe
61a8b31290 Add test for fallback-to-struct feature when encoding dictionaries to variant
types.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/dbuskit/trunk@30863 72102866-910b-0410-8b05-ffd578937521
2010-06-26 08:01:11 +00:00
Niels Grewe
99b7abb630 Fix generation of signatures for objects that are passed as variant type
arguments. Some test-cases for this.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/dbuskit/trunk@30861 72102866-910b-0410-8b05-ffd578937521
2010-06-26 06:16:38 +00:00
Niels Grewe
c3bc3287dd * Source/DKArgument.[mh]: Implement marshalling of variant types. Also add the
ability to customize the unboxing of objects.
* Source/DKEndpoint.m 
  Source/DKMethod.m
  Source/DKPort.m: 
  Compile fixes for clang.
* Source/DKOutgoingProxy.[mh]
  Source/GNUmakefile:
  Add stub implementation for outgoing proxies.
* Source/DKProxy.m: Add method to distinguish outgoing and incoming proxies.
* Source/Tests/TestDKProxy.m: Fix runtime.h include.
* Source/Tests/TestDKArgument.m: Add test for custom unboxing methods.
* Source/config.h.in
  config.make.in
  configure.ac
  GNUmakefile.postamble:
  Update configure script and paraphernalia to check for advanced runtime
  features.
* configure: Regenerate

Finish implementation of (un-)marshalling values between NSInvocation and D-Bus
messages. More flexible scheme for unboxing values. Various smaller fixes.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/dbuskit/trunk@30844 72102866-910b-0410-8b05-ffd578937521
2010-06-24 20:01:40 +00:00
Niels Grewe
00783650d9 Implement unmarshalling D-Bus variant types.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/dbuskit/trunk@30798 72102866-910b-0410-8b05-ffd578937521
2010-06-21 09:09:44 +00:00
Niels Grewe
cb201963f5 (Un-)marshalling of D-Bus structs.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/dbuskit/trunk@30797 72102866-910b-0410-8b05-ffd578937521
2010-06-21 08:42:15 +00:00
Niels Grewe
533caf7682 Finish (un-)marshalling of dictionaries.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/dbuskit/trunk@30796 72102866-910b-0410-8b05-ffd578937521
2010-06-21 08:23:03 +00:00
Niels Grewe
aeab37ff65 Implement unmarshalling of D-Bus dictionaries.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/dbuskit/trunk@30793 72102866-910b-0410-8b05-ffd578937521
2010-06-20 12:51:07 +00:00
Niels Grewe
d3c5bbd676 WIP (un-)marshalling of complex types.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/dbuskit/trunk@30792 72102866-910b-0410-8b05-ffd578937521
2010-06-20 12:03:22 +00:00
Niels Grewe
e8c4c89591 * Source/GNUmakefile
Source/DKInterface.[hm]:
  Add WIP representation of D-Bus interfaces.
* Source/DKIntrospectionNode.[mh]: Basic XML parser delegate methods.
* Source/DKMethod.m: Remove superflous method signature code.
* Source/DKMethod.m
  Source/DKArgument.m
  Source/DKArgument.h:
  Work on marshalling/unmarshalling between NSInvocation and D-Bus messages.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/dbuskit/trunk@30777 72102866-910b-0410-8b05-ffd578937521
2010-06-18 21:19:55 +00:00
Niels Grewe
2c7013ef3f Remove leftover duplicate code.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/dbuskit/trunk@30734 72102866-910b-0410-8b05-ffd578937521
2010-06-15 11:43:48 +00:00
Niels Grewe
e92f5e59f7 Factor common code out into DKIntrospectionNode and make DKArgument and DKMethod
use it.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/dbuskit/trunk@30733 72102866-910b-0410-8b05-ffd578937521
2010-06-15 11:41:08 +00:00
Niels Grewe
a856fa7457 Also use org.freedesktop.DBus.Method.NoReply annotation to mark the method as
oneway.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/dbuskit/trunk@30713 72102866-910b-0410-8b05-ffd578937521
2010-06-14 20:39:02 +00:00
Niels Grewe
1e06cba61a Make DKMethod generate method declarations.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/dbuskit/trunk@30710 72102866-910b-0410-8b05-ffd578937521
2010-06-14 17:20:09 +00:00
Niels Grewe
2450dfc74a Work on method name unmangling. Now partially working, still ugly as hell.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/dbuskit/trunk@30708 72102866-910b-0410-8b05-ffd578937521
2010-06-14 15:56:45 +00:00
Niels Grewe
517874dca8 * Source/Tests/TestDKMethod.m
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
2010-06-11 21:52:09 +00:00
Niels Grewe
ee7d90418f Fix failure to link against libdbus (reported by Fred Kiefer).
Initial work on method-name mangling. 


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/dbuskit/trunk@30686 72102866-910b-0410-8b05-ffd578937521
2010-06-11 21:06:25 +00:00
Niels Grewe
c2c545b408 short is apparently always 16bit.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/dbuskit/trunk@30679 72102866-910b-0410-8b05-ffd578937521
2010-06-11 16:02:13 +00:00
Niels Grewe
76f5f6ac17 Add test cases for unboxing. Fix unboxing of doubles.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/dbuskit/trunk@30678 72102866-910b-0410-8b05-ffd578937521
2010-06-11 15:59:42 +00:00
Niels Grewe
74e7d4afaa Implement unboxing of simple types. Fix boxing of 64bit values.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/dbuskit/trunk@30677 72102866-910b-0410-8b05-ffd578937521
2010-06-11 14:59:54 +00:00
Niels Grewe
ec4884ed80 Add a few more tests and some dummy methods.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/dbuskit/trunk@30666 72102866-910b-0410-8b05-ffd578937521
2010-06-11 06:28:14 +00:00
Niels Grewe
359a642c29 Boxing of simple types with associated test-coverage.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/dbuskit/trunk@30657 72102866-910b-0410-8b05-ffd578937521
2010-06-10 20:55:25 +00:00
Niels Grewe
6a04c4a41f Add initial implementation of DKMethod to encapsulate D-Bus method information.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/dbuskit/trunk@30655 72102866-910b-0410-8b05-ffd578937521
2010-06-10 20:02:35 +00:00
Niels Grewe
2055a96044 Provide link to public headers when compiling the tests.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/dbuskit/trunk@30632 72102866-910b-0410-8b05-ffd578937521
2010-06-09 09:00:18 +00:00
Niels Grewe
23ce39a851 * GNUmakefile: autorun ukrun for tests.
* configure.ac:
  config.make.in:
  Source/GNUmakefile:
  Check for and use -Wdeclaration-after-statement
* Source/DKArgument.m
  Source/DKPort.m:
  Fix C99isms.
* Source/Tests/TestDKArgument.m: Separate unit tests from source. Properly
  include local headers.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/dbuskit/trunk@30631 72102866-910b-0410-8b05-ffd578937521
2010-06-09 08:46:35 +00:00
Niels Grewe
58d6d7b917 Fix DKArgument problem caused by the fact that I shouldn't write code when I'm
distracted. Add test cases for DKArgument (requires UnitKit).


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/dbuskit/trunk@30613 72102866-910b-0410-8b05-ffd578937521
2010-06-08 03:36:03 +00:00
Niels Grewe
bcfc1ceb08 Support generating D-Bus type signatures from DKArgument trees.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/dbuskit/trunk@30610 72102866-910b-0410-8b05-ffd578937521
2010-06-07 20:25:56 +00:00
Niels Grewe
02d64afef3 Made DKArgument collect all subtypes of an argument from a D-Bus message.
Totally untested, though.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/dbuskit/trunk@30604 72102866-910b-0410-8b05-ffd578937521
2010-06-07 13:48:53 +00:00
Niels Grewe
a93bb54571 Place -release call properly. Thanks to Fred Kiefer for pointing that out.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/dbuskit/trunk@30601 72102866-910b-0410-8b05-ffd578937521
2010-06-07 12:59:52 +00:00
Niels Grewe
8fe6c457c4 WIP representation of D-Bus argument information.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/dbuskit/trunk@30600 72102866-910b-0410-8b05-ffd578937521
2010-06-07 11:56:27 +00:00
Niels Grewe
347496ebe5 Simpify DKPort a bit.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/dbuskit/trunk@30511 72102866-910b-0410-8b05-ffd578937521
2010-05-31 15:00:56 +00:00
Niels Grewe
e50fbdce76 Actually, -[NSProxy dealloc] can be called. Pointed out by Fred Kiefer; no idea
why I thought that wasn't possible…


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/dbuskit/trunk@30509 72102866-910b-0410-8b05-ffd578937521
2010-05-31 08:16:28 +00:00
Niels Grewe
fd1b66db25 Add a dummy proxy class. Finish implementation of the NSConnection integration
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
2010-05-30 23:13:17 +00:00
Niels Grewe
a8a19e66f1 Call self instead of super for DKPort subclass initializers.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/dbuskit/trunk@30462 72102866-910b-0410-8b05-ffd578937521
2010-05-27 17:22:37 +00:00
Niels Grewe
40eae871ed * Source/DKEndpoint.m: Fixes a bug where returning an pre-existing
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
2010-05-26 15:49:33 +00:00
Niels Grewe
e36fb8a562 Add configure script and paraphernalia (but make still regenerates config.make
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
2010-05-10 05:49:49 +00:00
Niels Grewe
f84a07139e Getting ready for GSoC: Import old and current D-Bus projects.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/dbuskit/trunk@30331 72102866-910b-0410-8b05-ffd578937521
2010-05-09 18:19:11 +00:00