platform/upstream/dbus.git
18 years agoAdd a NoReply annotation
Ross Burton [Tue, 25 Oct 2005 08:54:57 +0000 (08:54 +0000)]
Add a NoReply annotation

18 years ago2005-10-24 Robert McQueen <robot101@debian.org>
Robert McQueen [Mon, 24 Oct 2005 18:29:50 +0000 (18:29 +0000)]
2005-10-24  Robert McQueen <robot101@debian.org>

    * python/dbus_bindings.pyx (String, MessageIter): make D-Bus strings
    derive from unicode instead of str, and encode/decode UTF-8 when
    marshalling/unmarshalling bus messages

    * python/introspect_parser.py: encode introspection data as UTF-8
    before passing the buffer into libxml2

    * test/python/test-client.py: add unicode test strings

    * test/data/valid-service-files/.cvsignore, test/python/.cvsignore:
    ignore generated python test files

18 years agoapplied patch by Timo Hoenig <thoenig at suse de> for better Qt 3 detection
Harald Fernengel [Thu, 20 Oct 2005 14:56:24 +0000 (14:56 +0000)]
applied patch by Timo Hoenig <thoenig at suse de> for better Qt 3 detection

18 years ago* glib/dbus-gvalue-utils.c (hash_free_from_gtype): handle gdouble
John (J5) Palmieri [Tue, 18 Oct 2005 04:38:05 +0000 (04:38 +0000)]
* glib/dbus-gvalue-utils.c (hash_free_from_gtype): handle gdouble
and G_TYPE_VALUE_ARRAY (DBUS_TYPE_STRUCT)
(gvalue_from_hash_value, hash_value_from_gvalue): handle gdouble

* glib/dbus-gvalue.c (dbus_gvalue_to_signature): add missing
DBUS_STRUCT_BEGIN_CHAR and DBUS_STRUCT_END_CHAR charaters
when constructing struct signatures

* python/_dbus.py (Bus): handle private connections using the
private keyword in the constructor. defaults to private=False
(Bus::close): new method to close a connection to the bus

* python/dbus_bindings.pyx (Connection::close): renamed method
was previously called disconnect
(bus_get): now supports getting a private connection

* python/proxies.py (ProxyMethod::__call__): check if ignore_reply
keyword is set to True.  if it is, execute the method without waiting
for a reply
(ProxyObject::_introspect_execute_queue): new method for executing
all the pending methods that were waiting for the introspect to
finish.  this is called when introspect either succeeds or fails
(ProxyObject::_introspect_error_handler): call queued methods

18 years ago* python/dbus_bindings.pyx (MessageIter::append_strict): check for
John (J5) Palmieri [Fri, 14 Oct 2005 21:44:00 +0000 (21:44 +0000)]
* python/dbus_bindings.pyx (MessageIter::append_strict): check for
  STRUCT_BEGIN not TYPE_STRUCT in indicate we are marshalling a struct

* python/service.py (Object::_message_cb): handle exceptions correctly
  by sending them over the wire to the calling app.  This makes sure
  the client returns immediately instead of waiting the 15 seconds to
  timeout.

* test/python/test-client.py (TestDBusBindings::testBenchmarkIntrospect):
  Add a test to benchmark how long it takes to introspect a service and
  call a method which returns a large element (pretty fast)

* test/python/test-service.py (TestObject::GetComplexArray): new test
  method which pushes a lot of data

18 years ago* python/service.py(ObjectType::_reflect_on_signal, _reflect_on_method):
John (J5) Palmieri [Thu, 13 Oct 2005 23:34:12 +0000 (23:34 +0000)]
* python/service.py(ObjectType::_reflect_on_signal, _reflect_on_method):
reclaim memory outside of the loop and use del istead of just setting
the key to None

18 years ago* python/service.py (ObjectType::_reflect_on_signal): Always close
John (J5) Palmieri [Thu, 13 Oct 2005 23:26:00 +0000 (23:26 +0000)]
* python/service.py (ObjectType::_reflect_on_signal): Always close
signal tag even when there are no arguments

18 years ago * (configure.in) Set mono, mono-docs and Qt3 to default
John (J5) Palmieri [Thu, 13 Oct 2005 22:53:54 +0000 (22:53 +0000)]
 * (configure.in) Set mono, mono-docs and Qt3 to default
   to no instead of auto when building.  These bindings do not
   have full time maintainers and will not be supported for the
   1.0 release.

18 years agopatches from Michael Krivoruchko <misha at sun.com>:
John (J5) Palmieri [Wed, 12 Oct 2005 22:15:37 +0000 (22:15 +0000)]
patches from Michael Krivoruchko <misha at sun.com>:

* dbus/dbus-connection.c (_dbus_connection_queue_received_message_link,
_dbus_connection_message_sent,
_dbus_connection_send_preallocated_unlocked_no_update,
_dbus_connection_pop_message_link_unlocked): handle the case when path
is NULL when calling _dbus_verbose

* configure.in: check for functions getpeerucred and getpeereid

* dbus/dbus-sysdeps.c (_dbus_read_credentials_unix_socket): provides
support of auth EXTERNAL on Solaris 10+ (getpeerucred), FreeBSD 4.6+,
OpenBSD 3.0+ and FreeBSD 5.0+ as well as MacOSX 10.2+ (getpeereid).
Patch was only tested on Solaris 10 x86 so it might be issues
with other platforms (i.e. BSDs and MacOSX)

18 years ago* actualy add the introspection parser to CVS :-)
John (J5) Palmieri [Thu, 6 Oct 2005 04:43:52 +0000 (04:43 +0000)]
* actualy add the introspection parser to CVS :-)

18 years ago* glib/dbus-gvalue.c (marshal_variant): call _dbus_gvalue_marshal
John (J5) Palmieri [Wed, 5 Oct 2005 20:43:46 +0000 (20:43 +0000)]
* glib/dbus-gvalue.c (marshal_variant): call _dbus_gvalue_marshal
  instead of marshal basic so we can handle recursive types in a variant

* test/glib/test-dbus-glib.c: Add test for marshaling recurive types
  in variants

* test/glib/test-service-glib.c, test-service-glib.xml
  (my_object_echo_variant [EchoVariant],
  my_object_process_variant_of_array_of_ints123
  [ProcessVariantOfArrayOfInts123]):
  Add two test methods

* python/introspect_parser.py: New module for parsing introspect
  data.

* python/dbus_bindings.pyx:
  (various places): when throwing errors fix to use errormsg instead
  of message local variable because Pyrex can get confused with other
  message variables (initial patch by Robert McQueen
  <robert.mcqueen at collabora.co.uk>)
  (MessageIter::parse_signature_block): new method for getting the next
  block in a signiture.
  (MessageIter::append_strict): new method for appending values strictly
  using the passed in signature instead of guessing at the type
  (MessageItter:: append_dict, append_struct, append_array): use
  signatures to marshal children if the signature is available

* python/exceptions.py (IntrospectionParserException): new exception

* python/proxies.py (ProxyMethod::__call__): Marshal args with
  introspected signatures if available, else we fall back to the
  old way of doing things.
  (ProxyObject::_introspect_reply_handler ): parse introspection data

* python/service.py (ObjectType::_reflect_on_method): Properly
  terminate <method> if there are no args in the reflection data

* test/python/test-client.py: add tests for talking with the GLib
  test server.  This gives us better coverage for introspection since
  python to python will always generate arguments as variants.  It also
  allows us to test the robustness of the GLib bindings and interlanguage
  communications.

18 years ago* bus/driver.c (bus_driver_handle_introspect): Add signals
John (J5) Palmieri [Mon, 3 Oct 2005 19:55:56 +0000 (19:55 +0000)]
* bus/driver.c (bus_driver_handle_introspect): Add signals
  to the introspect data. (patch from Daniel P. Berrange
  <dan at berrange.com>)

* bus/dispatch.c (check_existent_ping): Add testcase for Ping

* dbus/dbus-connection.c (_dbus_connection_peer_filter,
  _dbus_connection_run_builtin_filters): Changed these to
  be unlock_no_update functions and call
  _dbus_connection_send_unlocked_no_update instead of
  dbus_connection_send to avoid locking errors.

* doc/TODO: Removed the make Ping test TODO

18 years agoignore me
Harald Fernengel [Fri, 30 Sep 2005 15:21:44 +0000 (15:21 +0000)]
ignore me

18 years agobring Qt3 library back. Some apps that are not in the KDE trunk are using it.
Harald Fernengel [Fri, 30 Sep 2005 15:20:08 +0000 (15:20 +0000)]
bring Qt3 library back. Some apps that are not in the KDE trunk are using it.

18 years agocompile out of the box
Harald Fernengel [Fri, 30 Sep 2005 15:05:33 +0000 (15:05 +0000)]
compile out of the box

18 years agorevert the parts that were accidently comitted. Thanks to Ross Burton for spotting it.
Harald Fernengel [Fri, 30 Sep 2005 13:55:55 +0000 (13:55 +0000)]
revert the parts that were accidently comitted. Thanks to Ross Burton for spotting it.

18 years ago* glib/dbus-glib-tool.c: removed extra comma at the end of the
John (J5) Palmieri [Mon, 26 Sep 2005 22:26:38 +0000 (22:26 +0000)]
* glib/dbus-glib-tool.c: removed extra comma at the end of the
  DBusBindingOutputMode enum which was causing a warning.
  #include <time.h> so using time_t is explicitly defined

18 years ago* dbus/Python.pyx: Fixed memory leaks when throwing errors.
John (J5) Palmieri [Mon, 26 Sep 2005 22:12:17 +0000 (22:12 +0000)]
* dbus/Python.pyx: Fixed memory leaks when throwing errors.
  We now copy the message from a DBusError and then free
  the error object befor throwing the error

18 years ago* Integrate patches from Lennart Poettering <mzsqb at 0pointer.de>:
John (J5) Palmieri [Mon, 26 Sep 2005 18:49:53 +0000 (18:49 +0000)]
* Integrate patches from Lennart Poettering <mzsqb at 0pointer.de>:
- dbus/dbus-bus.c
(internal_bus_get): new method that take over the heavy lifting
of dbus_bus_get and adds the ability to get a private connection
to the bus
(dbus_bus_get): wrapper to internal_bus_get that provides the same
interface as in previous versions
(dbus_bus_get_private): new method that is a wrapper to
internal_bus_get to get a private connection to the bus

- dbus/dbus-bus.h
(dbus_bus_get_private): add as a public libdbus interface

- dbus-1.pc.in: output system_bus_default_address and
sysconfdir variables so apps can use them when compiling

18 years agoadding an autotest and "dbus-ify" the build process and include scheme
Harald Fernengel [Fri, 23 Sep 2005 16:24:36 +0000 (16:24 +0000)]
adding an autotest and "dbus-ify" the build process and include scheme

18 years agonew Qt bindings
Harald Fernengel [Fri, 23 Sep 2005 14:25:05 +0000 (14:25 +0000)]
new Qt bindings

18 years agowhoops...
Harald Fernengel [Fri, 23 Sep 2005 13:28:23 +0000 (13:28 +0000)]
whoops...

18 years agoWith the permission of the original authors, removing the non-working and hopelessly...
Harald Fernengel [Fri, 23 Sep 2005 13:08:26 +0000 (13:08 +0000)]
With the permission of the original authors, removing the non-working and hopelessly unmaintained old Qt D-BUS bindings and adding the ones from KDE's SVN.

18 years ago* dbus/dbus-marshal-validate.c, doc/dbus-specification.xml,
Waldo Bastian [Mon, 12 Sep 2005 08:19:33 +0000 (08:19 +0000)]
* dbus/dbus-marshal-validate.c, doc/dbus-specification.xml,
test/Makefile.am, test/test-names.c: allow hyphens in bus names.

18 years ago2005-09-11 Mark McLoughlin <mark@skynet.ie>
Mark McLoughlin [Sun, 11 Sep 2005 10:02:47 +0000 (10:02 +0000)]
2005-09-11  Mark McLoughlin  <mark@skynet.ie>

* test/data/auth/fallback.auth-script: we don't
retry the EXTERNAL method when we know its going
to fail anymore.

2005-09-11  Mark McLoughlin  <mark@skynet.ie>

* dbus/dbus-connection-internal.h: rename
(add|remove|toggle)_(watch|timeout) to unlocked()

* dbus/dbus-connection.c: ditto.

* dbus/dbus-timeout.c, dbus/dbus-transport-unix.c:
Update some callers for the renaming.

2005-09-10  Mark McLoughlin  <mark@skynet.ie>

* dbus/dbus-auth.c: (record_mechanisms): don't
retry the first auth mechanism because we know
we're just going to get rejected again.

* dbus/dbus-keyring.c: (_dbus_keyring_reload):
Fix thinko ... and what a nasty little bugger to
track down you were ...

* dbus/dbus-connection.c:
(_dbus_connection_add_watch),
(_dbus_connection_remove_watch): add note about
these needing the connection to be locked.
(_dbus_connection_get_dispatch_status_unlocked):
set status to DATA_REMAINS when we queue the
disconnected message.

* bus/dispatch.c:
(bus_dispatch): fix warning.
(check_existent_service_no_auto_start):
Expect ChildSignaled error too.
(check_existent_hello_from_self): fix another
couple of warnings.

18 years ago2005-09-08 Joe Shaw <joeshaw@novell.com>
Joe Shaw [Thu, 8 Sep 2005 18:54:42 +0000 (18:54 +0000)]
2005-09-08  Joe Shaw  <joeshaw@novell.com>

Patches from James Willcox <snorp@snorp.net>

* mono/Makefile.am: Add Int16.cs and UInt16.cs

* mono/DBusType/Array.cs: Handle multidimensional arrays, and
support array "out" parameters.

* mono/DBusType/Int16.cs, mono/DBusType/UInt16.cs: New files,
for 16-bit int support.

18 years ago- update to next release version
John (J5) Palmieri [Tue, 6 Sep 2005 22:42:54 +0000 (22:42 +0000)]
- update to next release version

18 years ago* Released 0.50 dbus-0.50
John (J5) Palmieri [Tue, 6 Sep 2005 22:38:54 +0000 (22:38 +0000)]
* Released 0.50

* Patch from Steve Grubb:
- bus/activation.c (bus_activation_service_reload_test): clean up
some indentation
- dbus/dbus-keyring.c (_dbus_keyring_reload): fix conditional
- dbus/dbus-message-factory.c (generate_special): fix a couple of
buffer overflows in the test suite.  This is non critical because
it can not be exploited and this code is only run when doing a
make check.

* Patch from Yaakov Selkowitz: Build fixes for Cygwin
- configure.in: Don't check and link against kdecore, only qt headers
- dbus/Makefile.am: Add -no-undefined to libdbus_1_la_LDFLAGS
- gcj/org/freedesktop/dbus/Makefile.am:
add libdbus_gcj_1_la_LDFLAGS = -no-undefined
- glib/Makefile.am: Add -no-undefined to libdbus_glib_1_la_LDFLAGS
and $(DBUS_GLIB_LIBS) to dbus_binding_tool_LDADD
- qt/Makefile.am: Add -no-undefined to libdbus_qt_1_la_LDFLAGS
- tools/Makefile.am: Add platform extentions to binaries
(i.e. .exe on windows)

* configure.in:
- Make it so if no suitable version of python is found we only
disable building python instead of exiting the configure script
- Require version 2.4 of glib for glib bindings
- Up version to 0.50

* python/__init__.py: Sync version with libdbus to (0,50,0)

18 years ago2005-09-05 Olivier Andrieu <oliv__a@users.sourceforge.net>
Olivier Andrieu [Mon, 5 Sep 2005 19:37:19 +0000 (19:37 +0000)]
2005-09-05  Olivier Andrieu  <oliv__a@users.sourceforge.net>

* dbus/dbus-object-tree.c (find_subtree_recurse):
a couple of optimizations (bug #710):
- do a binary search in the tree
- insert a new child at the right place directly, no need for
  qsort anymore
- do the "double alloc" thing when allocating children

18 years ago* python/Makefile.am: Break on pyrexc errors instead of ignoring them
John (J5) Palmieri [Thu, 1 Sep 2005 01:22:06 +0000 (01:22 +0000)]
* python/Makefile.am: Break on pyrexc errors instead of ignoring them

* python/dbus_bindings.pyx: Memory management foo
(global): remove hacky _user_data_references global list
(GIL_safe_cunregister_function_handler): userdata now stuffed into
tuples. Unref user_data
(GIL_safe_cmessage_function_handler): userdata now stuffed into tuples
(Connection::__del__): Remove and replace with __dealloc__ method
(Connection::add_filter): Stuff user_data into a tuple.  Use Py_INCREF
to keep tuple from being deallocated instead of the global var hack
(Connection::register_object_path): Stuff user_data into a tuple.
Use Py_INCREF to keep tuple from being deallocated instead of the
global var hack
(Connection::register_fallback): Stuff user_data into a tuple.
Use Py_INCREF to keep tuple from being deallocated instead of the
global var hack
(GIL_safe_pending_call_notification): Don't unref the message
because it gets unreffed when going out of scope.  Py_XDECREF
the user_data
(PendingCall::__del__): Remove and replace with __dealloc__ method
(PendingCall::set_notify): ref the pending call because we will
need it to stick around for when the notify callback gets called
(Message::__del__): Remove and replace with __dealloc__ method

* python/dbus_glib_bindings.pyx (init_gthreads): Changed to
gthreads_init to match up with the dbus call

* python/glib.py (init_threads): Changed to threads_init to match
up with gobject.threads_init().  init_threads is kept for backwards
compat but will most likely be deprecated in the future

* test/python/test-client.py:
- revamp to use Python's unittest functionality
- add async call tests
- setup threads in glib and dbus so we make sure locks are working

18 years ago* python/dbus_bindings.pyx
John (J5) Palmieri [Wed, 31 Aug 2005 02:18:43 +0000 (02:18 +0000)]
* python/dbus_bindings.pyx
(_pending_call_notification, cunregister_function_handler,
cmessage_function_handler): All callback functions have been rearranged
to workaround a bug in Pyrex when working with the GIL which is Python's
global lock when dealing with threads.  They have been split into
a wrapper function (which assumes the name of the old function) and
a _GIL_safe_<function name> function which contains the functionality
of the old function.  This ensures that Pyrex does not write code
the lock is released.

18 years ago* python/dbus_bindings.pyx (_pending_call_notification): Obtain the
John (J5) Palmieri [Tue, 30 Aug 2005 15:21:04 +0000 (15:21 +0000)]
* python/dbus_bindings.pyx (_pending_call_notification): Obtain the
  GIL global lock when calling back into Python

18 years ago* Release 0.36.2
John (J5) Palmieri [Mon, 29 Aug 2005 20:19:19 +0000 (20:19 +0000)]
* Release 0.36.2

* Add Havoc's patch that never got applied to HEAD (Bug #2436):

* bus/policy.c (bus_policy_allow_user): change default "user is
allowed" to be "user has same uid as the bus itself"; any
allow/deny rules will override.

* bus/session.conf.in: don't allow all users, since now by default
the user that ran the bus can connect.

18 years agofixed two typos in API docs
Harald Fernengel [Fri, 26 Aug 2005 17:34:59 +0000 (17:34 +0000)]
fixed two typos in API docs

18 years ago2005-08-26 Colin Walters <walters@verbum.org>
Colin Walters [Fri, 26 Aug 2005 15:41:31 +0000 (15:41 +0000)]
2005-08-26  Colin Walters  <walters@verbum.org>

* tools/dbus-print-message.c (print_message): Flush stdout
after printing a message, so that redirecting to a file, then
hitting Ctrl-C works.

18 years ago* s/Message(_create=0)/EmptyMessage everywhere else
John (J5) Palmieri [Fri, 26 Aug 2005 04:23:33 +0000 (04:23 +0000)]
* s/Message(_create=0)/EmptyMessage everywhere else

* test/python/test-{server|client}.py: add the python/.libs directory
  to the lookup path so dbus_bindings and dbus_glib_bindings don't
  get picked up from the system

18 years ago* python/dbus_bindings.pyx: Tracked down a major memleak and fixed it
John (J5) Palmieri [Fri, 26 Aug 2005 03:09:59 +0000 (03:09 +0000)]
* python/dbus_bindings.pyx: Tracked down a major memleak and fixed it
 (EmptyMessage): new class that subclasses Message.  This is a workaround
 to a Pyrex bug that fails to call __del__ when the Message object goes out
 of scope.  For some reason subclassing Message fixes this bug
 (Bus::send_with_reply_and_block): use EmptyMessage instead of Message

18 years ago2005-08-25 Colin Walters <walters@verbum.org>
Colin Walters [Fri, 26 Aug 2005 02:00:37 +0000 (02:00 +0000)]
2005-08-25  Colin Walters  <walters@verbum.org>

* glib/dbus-gproxy.c (dbus_g_proxy_call): Doc update, thanks
to Ryan Lortie for the suggestion.

18 years agolinks to some pending tasks
Havoc Pennington [Thu, 25 Aug 2005 03:15:46 +0000 (03:15 +0000)]
links to some pending tasks

18 years ago* forgot to add the service file
John (J5) Palmieri [Thu, 25 Aug 2005 00:27:35 +0000 (00:27 +0000)]
* forgot to add the service file

18 years ago* test/python: Add python regression test
John (J5) Palmieri [Thu, 25 Aug 2005 00:20:41 +0000 (00:20 +0000)]
* test/python: Add python regression test

* configure.in: Add test/python/Makefile

* test/Makefile.am: Add the python directory to SUBDIRS

18 years ago- Merged changed from the DBUS_0_36_1 bugfix branch
John (J5) Palmieri [Wed, 24 Aug 2005 19:58:32 +0000 (19:58 +0000)]
- Merged changed from the DBUS_0_36_1 bugfix branch

18 years ago- Bumped version
John (J5) Palmieri [Tue, 23 Aug 2005 20:11:39 +0000 (20:11 +0000)]
- Bumped version

18 years ago* Release 0.36 dbus-0.36
John (J5) Palmieri [Tue, 23 Aug 2005 20:07:30 +0000 (20:07 +0000)]
* Release 0.36

18 years ago*** empty log message ***
Colin Walters [Tue, 23 Aug 2005 19:48:42 +0000 (19:48 +0000)]
*** empty log message ***

18 years ago2005-08-23 Colin Walters <walters@verbum.org>
Colin Walters [Tue, 23 Aug 2005 19:48:30 +0000 (19:48 +0000)]
2005-08-23  Colin Walters  <walters@verbum.org>

* test/glib/Makefile.am (test_profile_LDADD): Don't multiply-define
EXTRA_DIST.

18 years ago* python/dbus_glib_bindings.pyx: reorder imports and c definitions
John (J5) Palmieri [Tue, 23 Aug 2005 17:43:59 +0000 (17:43 +0000)]
* python/dbus_glib_bindings.pyx: reorder imports and c definitions
to fix some wranings. We now use dbus_bindings.DBusConnection instead
of defining DBusConnection ourselves.

18 years ago * python/dbus.pth: New path file to fix up problems when installing
John (J5) Palmieri [Thu, 18 Aug 2005 20:57:28 +0000 (20:57 +0000)]
* python/dbus.pth: New path file to fix up problems when installing
c libraries to lib64 and python files to lib.

* python/Makefile.am: install dbus.pth in the correct spot

18 years ago * ChangeLog: clean up my last entry a bit
John (J5) Palmieri [Thu, 18 Aug 2005 04:04:57 +0000 (04:04 +0000)]
* ChangeLog: clean up my last entry a bit

* doc/introspect.xsl: New stylesheet for converting introspection data
into browser renderable xhtml. Contributed by Lennart Poettering.

* doc/introspect.dtd: Fixups in the introspect format from Lennart
Poettering.

* doc/dbus-tutorial.xml:
- Add Colin Walter to the Authors section for authoring the GLib
section
- Add descriptions of the new signature and type functionality
in the Python complex type mapping section
- Add a sidenote on the new args matching functionality in
the Python bindings
- Fixed up some of the examples to use the gobject.MainLoop
instead of gtk.main

* python/_dbus.py:
(Bus::_create_args_dict): New. Converts a hash of arg matches
to a more useable format
(Bus::add_signal_receiver): add a **keywords parameter for catching
arg match parameters
(Bus::remove_signal_receiver): add a **keywords parameter for catching
arg match parameters

* python/matchrules.py:
(MatchTree::exec_matches): Check for arg matches
(SignalMatchRule::add_args_match): New method
(SignalMatchRule::execute): Added args_list parameter as an optimization
so we don't have to marshal the args more than once
(SignalMatchRule::match_args_from_list): New method that checks to see
if the rule's arg matches match an argument list.  Only arguments
set in the rule are checked.
(SignalMatchRule::match_args_from_rule): New method that checks to see
if the rule's arg matches match another rule's.  All args have to match
in order for this method to return true.  If either rule has more args
then it is not a match.
(SignalMatchRule::is_match): Add args match
(SignalMatchRule::repr): Add args to the final output if they exist

18 years agoUnref message and protect against NULL
Ross Burton [Wed, 17 Aug 2005 17:30:45 +0000 (17:30 +0000)]
Unref message and protect against NULL

18 years ago * python/__init__.py: Version updated (0, 43, 0)
John (J5) Palmieri [Tue, 16 Aug 2005 22:54:04 +0000 (22:54 +0000)]
* python/__init__.py: Version updated (0, 43, 0)

* python/dbus_bindings.pyx:
- Fixed type objects to have self passed into __init__
- Added the Variant type
- Add the ability to specify types or signatures for Array, Variant and Dictionary
- (Connection::send_with_reply_handlers): return a PendingCall object
- (_pending_call_notification): handle the case when an error is returned
without an error message in the body
- (MessageIter::get_boolean): return True or False instead of an integer
- (MessageIter::python_value_to_dbus_sig): add direct checking of types and
add checks for objects with embeded signatures or types (Array, Variant and
Dictionary)
- (MessageIter::append_byte): handle case when the value is a dbus.Byte
- (MessageIter::append_dict): handle embeded types or signatures
- (MessageIter::append_array): handle embeded types or signatures
- (MessageIter::append_variant): new method

* python/proxies.py:
- (DeferedMethod): New. Dummy executable object used when queuing calls blocking on
introspection data
- (ProxyMethod::__call__): add the timeout keyword for specifying longer or
shorter timeouts for method calls
- (ProxyObject): Add first pass at an introspection state machine
- (ProxyObject::__init__): Add introspect keyword for turing off an on
introspection.
- (ProxyObject::_Introspect): Internal Introspect call that bypasses the usual
mechanisms for sending messages.  This is to avoid a deadlock where the Intospect
call would be queued waiting for the Introspect call to finish ;-)
- (ProxyObject::_introspect_reply_handler): New.  This method is called when
introspection returns with no error
- (ProxyObject::_introspect_error_handler): New.  This method is called when
introspection encounters an error
- (ProxyObject::__getattr__): Code to handle different introspection states.
Queue async calls or block blocking calls if we are introspecting.  Pass through
as normal if we are not or are done with introspecting.

* python/service.py: Import signal and method from decorators.py

* python/types.py: Add Variant type

18 years ago2005-08-16 Colin Walters <walters@verbum.org>
Colin Walters [Tue, 16 Aug 2005 21:26:12 +0000 (21:26 +0000)]
2005-08-16  Colin Walters  <walters@verbum.org>

* glib/dbus-gobject.c (dbus_set_g_error): Don't lose if the
DBusError message is NULL.

18 years ago2005-08-09 Havoc Pennington <hp@redhat.com>
Havoc Pennington [Tue, 9 Aug 2005 21:36:55 +0000 (21:36 +0000)]
2005-08-09  Havoc Pennington  <hp@redhat.com>

* dbus/dbus-errors.c: apply patch from Timo Teras to make a
malloc'd copy of the name parameter

18 years ago2005-08-09 Havoc Pennington <hp@redhat.com>
Havoc Pennington [Tue, 9 Aug 2005 17:38:15 +0000 (17:38 +0000)]
2005-08-09  Havoc Pennington  <hp@redhat.com>

* dbus/dbus-message.c (dbus_message_set_reply_serial): print
warning if the reply serial is set to 0

18 years ago2005-08-04 Colin Walters <walters@verbum.org>
Colin Walters [Thu, 4 Aug 2005 15:49:30 +0000 (15:49 +0000)]
2005-08-04  Colin Walters  <walters@verbum.org>

* glib/dbus-gvalue-utils.h (_dbus_g_type_specialized_builtins_init)
(dbus_g_type_is_fixed, dbus_g_type_fixed_get_size)
(dbus_gvalue_set_from_pointer, dbus_g_hash_table_value_foreach)
(dbus_g_hash_table_insert_values, dbus_g_hash_table_insert_steal_values)
(dbus_gtype_is_valid_hash_key, dbus_gtype_is_valid_hash_value)
(dbus_g_hash_func_from_gtype, dbus_g_hash_free_from_gtype)
(dbus_g_hash_equal_from_gtype, dbus_gvalue_stor, dbus_gvalue_take):
* glib/dbus-gvalue.h (dbus_g_value_types_init)
(dbus_gvalue_demarshal, dbus_gvalue_demarshal_variant)
(dbus_gvalue_demarshal_message, dbus_gvalue_marshal):

Prefix name with _ to ensure they're not exported.  All callers
updated.

* glib/dbus-gvalue.c (typecode_to_gtype)
(dbus_typecode_maps_to_basic, basic_typecode_to_gtype)
(signature_iter_to_g_type_dict)
(signature_iter_to_g_type_array)
(dbus_gtype_from_signature_iter, dbus_gtype_from_signature)
(dbus_gtypes_from_arg_signature):
Move to dbus-gsignature.c.

* glib/dbus-binding-tool-glib.c (dbus_binding_tool_output_glib_server): Call
dbus_g_type_specialized_builtins_init instead of dbus_g_value_types_init.
(dbus_binding_tool_output_glib_client): Ditto.

* glib/Makefile.am (DBUS_GLIB_INTERNALS): Add dbus-gsignature.c
and dbus-gsignature.h

* test/glib/test-service-glib.c (my_object_rec_arrays): Delete
unused variable.

18 years ago2005-08-03 Colin Walters <walters@verbum.org>
Colin Walters [Wed, 3 Aug 2005 23:21:49 +0000 (23:21 +0000)]
2005-08-03  Colin Walters  <walters@verbum.org>

* glib/dbus-gobject.c: Add tests on hardcoded object info; this should
catch any incompatible changes accidentally made.

18 years ago2005-08-03 Havoc Pennington <hp@redhat.com>
Havoc Pennington [Wed, 3 Aug 2005 17:42:56 +0000 (17:42 +0000)]
2005-08-03  Havoc Pennington  <hp@redhat.com>

* dbus/dbus-sysdeps.c (_dbus_read_credentials_unix_socket): fix
typo, from Julien Puydt

* bus/connection.c (bus_connection_disconnected): we were always
doing a wait_for_memory due to a buggy loop, found by Timo Hoenig

18 years agoSmall docu update
Waldo Bastian [Tue, 2 Aug 2005 11:26:59 +0000 (11:26 +0000)]
Small docu update

18 years agosome docs cleanups
Havoc Pennington [Mon, 1 Aug 2005 18:59:02 +0000 (18:59 +0000)]
some docs cleanups

18 years ago2005-08-01 Colin Walters <walters@verbum.org>
Colin Walters [Mon, 1 Aug 2005 16:12:53 +0000 (16:12 +0000)]
2005-08-01  Colin Walters  <walters@verbum.org>

Patch from Joe Markus Clarke:

* glib/dbus-gidl.c (property_info_unref, arg_info_unref): Fix
use-after-free.

18 years ago2005-08-01 Colin Walters <walters@verbum.org>
Colin Walters [Mon, 1 Aug 2005 16:10:34 +0000 (16:10 +0000)]
2005-08-01  Colin Walters  <walters@verbum.org>

Patch from Joe Markus Clarke:

* tools/dbus-send.c (main):

Don't use C99 style initializers (bug #3933).

18 years ago2005-08-01 Colin Walters <walters@verbum.org>
Colin Walters [Mon, 1 Aug 2005 16:07:19 +0000 (16:07 +0000)]
2005-08-01  Colin Walters  <walters@verbum.org>

Patch from Joe Markus Clarke:

* glib/dbus-gvalue.c (dbus_g_value_types_init):
* glib/dbus-gvalue-utils.c (dbus_g_type_specialized_builtins_init)
* glib/dbus-gobject.c (write_interface):

Don't use C99 style initializers (bug #3933).

18 years ago2005-07-31 Havoc Pennington <hp@redhat.com>
Havoc Pennington [Sun, 31 Jul 2005 14:58:42 +0000 (14:58 +0000)]
2005-07-31  Havoc Pennington  <hp@redhat.com>

* tools/dbus-viewer.c (load_child_nodes): fix invocation of
dbus_g_proxy_call, fix from Piotr Zielinski bug #3920

18 years ago2005-07-30 Havoc Pennington <hp@redhat.com>
Havoc Pennington [Sun, 31 Jul 2005 02:09:15 +0000 (02:09 +0000)]
2005-07-30  Havoc Pennington  <hp@redhat.com>

* fix a bunch of Doxygen warnings and mistakes

18 years agoadd "publish introspect dtd" to TODO for 1.0
Havoc Pennington [Sun, 31 Jul 2005 01:38:55 +0000 (01:38 +0000)]
add "publish introspect dtd" to TODO for 1.0

18 years ago2005-07-30 Havoc Pennington <hp@redhat.com>
Havoc Pennington [Sat, 30 Jul 2005 15:17:29 +0000 (15:17 +0000)]
2005-07-30  Havoc Pennington  <hp@redhat.com>

* dbus/dbus-sysdeps.c (_dbus_string_parse_uint): remove #ifdef
DBUS_BUILD_TESTS since it's now used in production code

18 years ago2005-07-29 Havoc Pennington <hp@redhat.com>
Havoc Pennington [Sat, 30 Jul 2005 01:33:55 +0000 (01:33 +0000)]
2005-07-29  Havoc Pennington  <hp@redhat.com>

* test/glib/test-profile.c (write_junk): initialize the junk
buffer so valgrind doesn't have a breakdown

18 years agoremove that todo item
Havoc Pennington [Fri, 29 Jul 2005 17:46:58 +0000 (17:46 +0000)]
remove that todo item

18 years ago2005-07-29 Havoc Pennington <hp@redhat.com>
Havoc Pennington [Fri, 29 Jul 2005 17:43:30 +0000 (17:43 +0000)]
2005-07-29  Havoc Pennington  <hp@redhat.com>

* bus/signals.c (bus_signals_test): add match_rule_equal() tests
(match_rule_matches): remove unused arg
(test_matching): add tests for match_rule_matches()

* bus/signals.c (bus_match_rule_parse_arg_match): add ability to
do arg0='foo' arg5='bar' in the match rules
(match_rule_matches): don't match if the arg0='foo' doesn't match.

* dbus/dbus-protocol.h (DBUS_MAXIMUM_MATCH_RULE_ARG_NUMBER): add this

18 years agoRemove unused condvar
Ross Burton [Fri, 29 Jul 2005 14:43:59 +0000 (14:43 +0000)]
Remove unused condvar

18 years agoReduce size of message cache
Ross Burton [Wed, 27 Jul 2005 19:38:41 +0000 (19:38 +0000)]
Reduce size of message cache

19 years agoRemove matchers when all proxies are removed
Ross Burton [Mon, 25 Jul 2005 19:16:22 +0000 (19:16 +0000)]
Remove matchers when all proxies are removed

19 years ago2005-07-24 Colin Walters <walters@verbum.org>
Colin Walters [Sun, 24 Jul 2005 18:04:23 +0000 (18:04 +0000)]
2005-07-24  Colin Walters  <walters@verbum.org>

* glib/dbus-gvalue.c (signature_iter_to_g_type_array): Don't require
typedata; recursive arrays won't have it.

* test/glib/test-dbus-glib.c:
* test/glib/test-service-glib.c:
* test/glib/test-service-glib.xml: Add recursive arrays tests.

19 years ago* python/_dbus.py, _util.py, decorators.py, extract.py, matchrules.py.
John (J5) Palmieri [Wed, 20 Jul 2005 14:15:08 +0000 (14:15 +0000)]
* python/_dbus.py, _util.py, decorators.py, extract.py, matchrules.py.
  proxies.py, service.py: Cleanup of code after running it through the
  pyflakes code checker mostly dealing with undefined names.
  (Bug #3828, Patch from Anthony Baxter <anthony@interlink.com.au>)

19 years agoadd missing entry
Colin Walters [Tue, 19 Jul 2005 22:18:54 +0000 (22:18 +0000)]
add missing entry

19 years ago* Merge DBUS_0_35_2 branch into HEAD
John (J5) Palmieri [Sun, 17 Jul 2005 21:02:56 +0000 (21:02 +0000)]
* Merge DBUS_0_35_2 branch into HEAD

2005-07-17  John (J5) Palmieri  <johnp@redhat.com>

        * NEWS: Update to 0.35.2

2005-07-17  John (J5) Palmieri  <johnp@redhat.com>

        * python/_dbus.py: Remove import of the dbus.services
        module as it no longer exists (patch from Dimitur Kirov)

        * python/service.py (Object::__init__): Fixed typo
        s/name/bus_name (patch from Dimitur Kirov)

        * python/examples/example-signal-emitter.py: import dbus.glib
        to get the main loop and use glib mainloop instead of gtk so
        X doesn't have to be running.

        * python/examples/example-signal-recipient.py: import dbus.glib
        to get the main loop and use glib mainloop instead of gtk so
        X doesn't have to be running. Import the decorators module
        directly.

        * test/glib/Makefile.am:  Added DIST_EXTRA files that distcheck
        didn't pick up on but are needed to build

        * configure.in: upped version to 0.35.2

        * bus/driver.c, bus/selinux.c, bus/selinux.h, dbus/dbus-protocol.h:
        added Colin Walters' SELinux API rename patch from head
        s/unix sercurity context/selinux security context/

2005-07-16  John (J5) Palmieri  <johnp@redhat.com>

        * python/Makefile.am: dbus_binding.pxd.in should be included
        in EXTRA_DIST not dbus_binding.pxd
        fix up $(srcdir) hopefully for the last time

        * NEWS: Update to 0.35.1

19 years ago2005-07-16 Colin Walters <walters@verbum.org>
Colin Walters [Sat, 16 Jul 2005 17:34:08 +0000 (17:34 +0000)]
2005-07-16  Colin Walters  <walters@verbum.org>

* bus/driver.c (bus_driver_handle_get_connection_selinux_security_context): Renamed
from bus_driver_handle_get_connection_unix_security_context.  Update for
error usage.
(message_handlers): Update for renames.

* bus/selinux.c (bus_selinux_allows_send): Handle OOM on
_dbus_string_init failure correctly.
(bus_selinux_append_context): Convert SID to context.  Append it
as a byte array.
(bus_selinux_shutdown): Handle the case where bus_selinux_full_init
hasn't been called.

* bus/selinux.h: Update prototype.

* dbus/dbus-protocol.h (DBUS_ERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN): Renamed
from DBUS_ERROR_UNIX_SECURITY_CONTEXT_UNKNOWN.

19 years ago2005-07-15 Colin Walters <walters@verbum.org>
Colin Walters [Fri, 15 Jul 2005 22:02:25 +0000 (22:02 +0000)]
2005-07-15  Colin Walters  <walters@verbum.org>

* doc/TODO: Add note about convenience wrappers.

19 years ago* configure.in: upped version to 0.36
John (J5) Palmieri [Fri, 15 Jul 2005 20:35:25 +0000 (20:35 +0000)]
* configure.in: upped version to 0.36

19 years ago* Update to 0.35 dbus-0.35
John (J5) Palmieri [Fri, 15 Jul 2005 20:33:35 +0000 (20:33 +0000)]
* Update to 0.35

19 years ago* glib/Makefile.am: Add make-dbus-glib-error-switch.sh to EXTRA_DIST
John (J5) Palmieri [Fri, 15 Jul 2005 20:28:05 +0000 (20:28 +0000)]
* glib/Makefile.am: Add make-dbus-glib-error-switch.sh to EXTRA_DIST
  so distcheck doesn't fail

* glib/examples/Makefile.am: Add example-service.xml and
  example-signal-emitter.xml to EXTRA_DIST so distcheck doesn't fail

* glib/examples/statemachine/Makefile.am: Add statemachine.xml and
  statemachine-server.xml to EXTRA_DIST so distcheck doesn't fail

* python/Makefile.am: Preprend $(srcdir)/ to source files so the
  compiler looks in the right places during distcheck

19 years ago* glib/example/Makefile.am: Fix a typo which cause make distcheck
John (J5) Palmieri [Fri, 15 Jul 2005 19:15:05 +0000 (19:15 +0000)]
* glib/example/Makefile.am: Fix a typo which cause make distcheck
  to fail

19 years ago* python/examples/example-service.py,
John (J5) Palmieri [Fri, 15 Jul 2005 18:09:59 +0000 (18:09 +0000)]
* python/examples/example-service.py,
  python/examples/example-signal-emitter.py: Fixed up examples
  for API changes

19 years ago* python/__init__.py: Upped to version (0,42,0) because of
John (J5) Palmieri [Fri, 15 Jul 2005 17:33:17 +0000 (17:33 +0000)]
* python/__init__.py: Upped to version (0,42,0) because of
  the API change

19 years ago* ChangeLog: fix date in last entry
John (J5) Palmieri [Fri, 15 Jul 2005 17:28:35 +0000 (17:28 +0000)]
* ChangeLog: fix date in last entry

* configure.in, bus/system.conf.in: add the ability to configure
  the system bus user at compiletime with the --with-dbus-user flag
  (patch from Kristof Vansant)

19 years ago* bus/dispatch.c, test/test-service.c: Add testcase
John (J5) Palmieri [Fri, 15 Jul 2005 15:21:43 +0000 (15:21 +0000)]
* bus/dispatch.c, test/test-service.c: Add testcase
  for sending messages to oneself (TODO item).

* python/service.py (class Object): Swap ordering of bus_name
  and object_path parameters to better support inheritance.

* doc/dbus-tutorial.xml: change Python docs to reflect change
  in parameter ordering and fix the inheritance section.

* doc/TODO: remove sending message to oneself TODO item

19 years agoDon't leak messages when calling methods
Ross Burton [Fri, 15 Jul 2005 13:25:48 +0000 (13:25 +0000)]
Don't leak messages when calling methods

19 years ago2005-07-15 Colin Walters <walters@verbum.org>
Colin Walters [Fri, 15 Jul 2005 04:04:43 +0000 (04:04 +0000)]
2005-07-15  Colin Walters  <walters@verbum.org>

* bus/selinux.c (bus_selinux_append_context): Wrap in
HAVE_SELINUX.

19 years ago* python/_dbus.py (Bus::remove_signal_receiver):
John (J5) Palmieri [Fri, 15 Jul 2005 02:15:08 +0000 (02:15 +0000)]
* python/_dbus.py (Bus::remove_signal_receiver):
  don't add a callback to the match if none has been passed in

* python/matchrules.py (SignalMatchTree::remove): if the rule
  being matched does not have a callback treat it as a wildcard
  fix matching logic

* doc/dbus-tutorial.xml: Add Python tutorial

19 years ago2005-07-14 Colin Walters <walters@verbum.org>
Colin Walters [Thu, 14 Jul 2005 21:45:42 +0000 (21:45 +0000)]
2005-07-14  Colin Walters  <walters@verbum.org>

* bus/driver.c
(bus_driver_handle_get_connection_unix_security_context): New function.
(message_handlers): Add.

* bus/selinux.c (bus_selinux_append_context): New function; appends
security context to message.

* bus/selinux.h: Prototype.

* dbus/dbus-protocol.h (DBUS_ERROR_UNIX_SECURITY_CONTEXT_UNKNOWN): New.

19 years agoChecking in Rodrigo's patch along with my fixes to the patch
John (J5) Palmieri [Thu, 14 Jul 2005 20:44:15 +0000 (20:44 +0000)]
Checking in Rodrigo's patch along with my fixes to the patch

2005-07-14  John (J5) Palmieri  <johnp@redhat.com>

* bus/activation.c: clean up all tabs to be 8 spaces
(bus_activation_activate_service): make sure we clean up
if activation fails

* bus/dispatch.c: clean up all tabs to be 8 spaces
(check_shell_fail_service_auto_start): New function
tests to make sure we get fail properly when trying to auto start a service
with a faulty command line
(check_shell_service_success_auto_start): New function tests to make sure
auto started services get the arguments on the command line

* test/test-shell-service.c: Added service for testing auto-starting with
command line arguments

* test/data/valid-service-files/debug-shell-echo-fail.service.in,
test/data/valid-service-files/debug-shell-echo-success.service.in:
Added service files for testing auto-starting with command line arguments

* */.cvsignore: added a bunch of generated files to various .cvsignore files

2005-07-14  Rodrigo Moya  <rodrigo@novell.com>

* dbus/dbus-shell.[ch]: copy/pasted code from GLib.

* dbus/Makefile.am: added new files to build.

* bus/activation.c (bus_activation_activate_service): support
activation commands with parameters.

* test/shell-test.c: added test program for the shell parsing
code.

19 years ago2005-07-13 David Zeuthen <davidz@redhat.com>
David Zeuthen [Wed, 13 Jul 2005 21:13:16 +0000 (21:13 +0000)]
2005-07-13  David Zeuthen  <davidz@redhat.com>

        * tools/dbus-send.c (append_arg, type_from_name): Also support 16 and
        64 bit signed and unsigned parameters

19 years ago* python/.cvsignore: remove dbus_bindings.pyx, add dbus_bindings.pxd
John (J5) Palmieri [Wed, 13 Jul 2005 18:22:35 +0000 (18:22 +0000)]
* python/.cvsignore: remove dbus_bindings.pyx, add dbus_bindings.pxd

* python/service.py (class Name): renamed BusName to make it clearer
  what the object is for (a name on the bus)

* python/examples/example-service.py,
  python/examples/example-signal-emitter.py: change the Name object to
  BusName

19 years ago2005-07-12 Colin Walters <walters@verbum.org>
Colin Walters [Tue, 12 Jul 2005 21:09:54 +0000 (21:09 +0000)]
2005-07-12  Colin Walters  <walters@verbum.org>

Patch from Jim Gettys <Jim.Gettys@hp.com>.

* tools/dbus-launch.c: Include sys/select.h.

19 years ago* python/dbus_bindings.pyx.in: removed
John (J5) Palmieri [Tue, 12 Jul 2005 18:16:07 +0000 (18:16 +0000)]
* python/dbus_bindings.pyx.in: removed

* python/dbus_bindings.pyx: Added.
- Fixed some memleaks (patch from
  Sean Meiners <sean.meiners@linspireinc.com>)
- Broke out the #include "dbus_h_wrapper.h" and put it in its
  own pxd file (Pyrex definition)
- Broke out glib dependancies into its own pyx module

* python/dbus_bindings.pdx: Added.
- Defines C class Connection for exporting to other modules

* python/dbus_glib_bindings.pyx: Added.
- New module to handle lowlevel dbus-glib mainloop integration

* python/glib.py: Added.
- Registers the glib mainloop when you import this module

* python/services.py: Removed (renamed to service.py)

* python/service.py: Added.
- (class Server): renamed Name

* python/__init__.py: Bump ro version (0,41,0)
- don't import the decorators or service module
      by default.  These now reside in the dbus.service namespace

* python/_dbus.py (Bus::__init__): Add code run the main loop
  setup function on creation

* python/examples/example-service.py,
  python/examples/example-signal-emitter.py: update examples

* python/examples/gconf-proxy-service.py,
  python/examples/gconf-proxy-service2.py: TODO fix these up

* doc/TODO: Addition
- Added a Python Bindings 1.0 section
- added "Add match on args or match on details to match rules"

19 years ago2005-07-12 Colin Walters <walters@verbum.org>
Colin Walters [Tue, 12 Jul 2005 17:57:04 +0000 (17:57 +0000)]
2005-07-12  Colin Walters  <walters@verbum.org>

* glib/examples/statemachine/Makefile.am (statemachine-server-glue.h)
(statemachine-glue.h):
* glib/examples/Makefile.am (example-service-glue.h)
(example-signal-emitter-glue.h):
* glib/Makefile.am (dbus-glib-error-switch.h):
Add libtool --mode=execute so we use the built library instead
of any installed one.

19 years ago2005-07-11 Colin Walters <walters@verbum.org>
Colin Walters [Mon, 11 Jul 2005 16:12:50 +0000 (16:12 +0000)]
2005-07-11  Colin Walters  <walters@verbum.org>

* glib/dbus-gvalue.c (struct _DBusGValue): Delete.
(dbus_g_value_types_init): Remove assertion.
(dbus_g_value_get_g_type, dbus_g_value_open)
(dbus_g_value_iterator_get_values, dbus_g_value_get_signature)
(dbus_g_value_copy, dbus_g_value_free): Delete unimplemented
functions related to DBusGValue.  Now we marshal/demarshal
structures as GValueArray.
(dbus_gtype_from_signature_iter): Return G_TYPE_VALUE_ARRAY for
structures.
(signature_iter_to_g_type_array): Don't call
signature_iter_to_g_type_struct.
(signature_iter_to_g_type_struct): Delete.
(dbus_gvalue_to_signature): Delete.
(dbus_gvalue_to_signature): New function with same name as other
one; we can convert structures to signatures.
(demarshal_valuearray): New function.
(get_type_demarshaller): Use it.
(demarshal_recurse): Delete.
(marshal_proxy): New function.
(marshal_map): Warn if we can't determine signature from type.
(marshal_collection_ptrarray): Ditto.
(marshal_collection_array): Ditto.
(get_type_marshaller): Use marshal_valuearray.
(marshal_recurse): Delete.
(_dbus_gvalue_test): Add some tests.

* dbus/dbus-glib.h (struct _DBusGValueIterator):
(dbus_g_value_get_g_type, DBUS_TYPE_G_VALUE)
(dbus_g_value_open, dbus_g_value_iterator_get_value)
(dbus_g_value_iterator_get_values, dbus_g_value_iterator_recurse)
(dbus_g_value_free): Remove prototypes.

* glib/dbus-binding-tool-glib.c (dbus_g_type_get_lookup_function): Handle
G_TYPE_VALUE_ARRAY.

* glib/examples/example-service.c:
* glib/examples/example-client.c: Implement GetTuple.

* test/glib/test-dbus-glib.c:
* test/glib/test-service-glib.c:
* test/glib/test-service-glib.xml: Add structure tests.

19 years ago2005-07-10 Colin Walters <walters@verbum.org>
Colin Walters [Sun, 10 Jul 2005 22:54:19 +0000 (22:54 +0000)]
2005-07-10  Colin Walters  <walters@verbum.org>

* doc/TODO: Knock off some GLib items with this patch.

* glib/dbus-gvalue-utils.c (_dbus_gtype_can_signal_error)
(_dbus_gvalue_signals_error): New functions.

* glib/dbus-gvalue-utils.h: Prototype them.

* glib/dbus-gobject.c (arg_iterate): Update to handle return vals
and change to not output const/retval flags for input args.  All
callers updated.
(invoke_object_method): Refactor to handle return values.  Add
some more comments in various places.  Remove debug g_print.

* glib/dbus-binding-tool-glib.h (DBUS_GLIB_ANNOTATION_RETURNVAL): New.

* glib/dbus-binding-tool-glib.c (dbus_g_type_get_marshal_name):
Handle G_TYPE_NONE.
(compute_gsignature): New function; refactored from code from
compute_marshaller and compute_marshaller_name.  Enhance to
handle return values and async ops more cleanly.  Update for
async ops returning NONE instead of BOOLEAN.
(compute_marshaller, compute_marshaller_name): Call compute_gsignature
and output appropriate string.
(generate_glue): Handle return value annotation.  Also don't dump
constness flag for input arguments.

* glib/Makefile.am (DBUS_GLIB_INTERNALS): New variable; contains
files shared between installed library and utilities.
(libdbus_glib_1_la_SOURCES): Move some stuf into DBUS_GLIB_INTERNALS.
(libdbus_gtool_la_SOURCES): Suck in DBUS_GLIB_INTERNALS so the
binding tool can access gtype utility functions.

* test/glib/test-service-glib.c:
* test/glib/test-service-glib.xml:
* test/glib/test-dbus-glib.c: Add some tests for return values.

19 years ago2005-07-09 Colin Walters <walters@verbum.org>
Colin Walters [Sat, 9 Jul 2005 18:54:45 +0000 (18:54 +0000)]
2005-07-09  Colin Walters  <walters@verbum.org>

* glib/dbus-gparser.c (parse_annotation): Add annotations to
argument if available, not method.

* glib/dbus-gobject.c (arg_iterate): More verbose warnings.
(invoke_object_method): First, remove some redundant
GValues (object_value, error_value) in favor of working on
array directly.  Second, rework constness to be less buggy.
Now we iterate directly over the argument metadata instead
of parallel iterating over output signature and metadata.

* glib/dbus-glib-tool.h: Add INVALID_ANNOTATION error.

* glib/dbus-binding-tool-glib.c (generate_glue): Barf on const
annotation on input args.

19 years ago2005-07-09 Colin Walters <walters@verbum.org>
Colin Walters [Sat, 9 Jul 2005 17:52:52 +0000 (17:52 +0000)]
2005-07-09  Colin Walters  <walters@verbum.org>

* glib/dbus-binding-tool-glib.h (DBUS_GLIB_ANNOTATION_CONST):
Define.

* glib/dbus-binding-tool-glib.c (generate_glue): Handle Const
annotation.

* glib/dbus-gobject.c (arg_iterate): Update to parse constval too.
(method_dir_signature_from_object_info): Handle arg_iterate change.
(write_interface): Ditto.
(lookup_object_info): Don't barf if format_version is > 0.
(invoke_object_method): Handle arg constness.

* glib/dbus-gidl.c (struct ArgInfo): Add annotations.
(arg_info_new): Create.
(arg_info_unref): Destroy.
(arg_info_get_annotations, arg_info_get_annotation)
(arg_info_add_annotation): New functions.

* glib/dbus-gidl.h: Prototype them.

* glib/dbus-gparser.c (parse_annotation): Allow annotations in
args, disallow them in properties.
(parse_annotation): Handle arg annotations.

* test/glib/test-service-glib.xml:
* test/glib/test-service-glib.c: Update to make some methods
const.