Original DBUS bindings for TQt
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

13661 lines
458 KiB

2006-06-14 Ross Burton <ross@openedhand.com>
* glib/dbus-gobject.c:
Free a leaking GArray (surely not!) in dbus_g_method_return.
2006-06-14 Ross Burton <ross@openedhand.com>
* tools/Makefile.am:
* tools/dbus-monitor.c:
Don't use the GLib bindings in dbus-monitor (patch from Ralf
2006-06-14 Ross Burton <ross@openedhand.com>
* tools/dbus-print-message.c:
Also print the object path when outputting Q_SIGNALS or method calls.
2006-06-13 Thiago Macieira <thiago.macieira@trolltech.com>
* qt/src/Makefile.am: install the qdbus.h header.
This allows people to actually use the installed code.
2006-06-12 Ross Burton <ross@openedhand.com>
* glib/dbus-gproxy.c:
Don't leak a GArray when firing Q_SIGNALS (thank Rob Taylor for review).
2006-06-12 Thiago Macieira <thiago.macieira@trolltech.com>
* Released 0.62
2006-06-12 Thiago Macieira <thiago.macieira@trolltech.com>
* dbus/dbus-arch-deps.h.in: Remove spurious semi-colons that
break pedantic builds. Closes bug 6043 (patch approved by
Havoc back in February).
2006-06-12 Thiago Macieira <thiago.macieira@trolltech.com>
* qt/src/qdbusintegrator.cpp: Fix bug in parsing async methods
that took a QDBusMessage parameter.
* qt/src/qdbusbus.h: Add a default flag for RequestName.
* qt/tools/dbus.cpp: Don't use automatic call because we might
be calling an async method: request a reply.
2006-06-11 Thiago Macieira <thiago.macieira@trolltech.com>
* test/qt/*: Update the testcases, including testing the new
functionality of sending null QByteArray and QString over the
bus. Add new headertest test and restore the old
qdbusxmlparser test.
2006-06-11 Thiago Macieira <thiago.macieira@trolltech.com>
* qt/tools/dbuscpp2xml.cpp: Compile on Windows.
* qt/tools/dbusidl2cpp.cpp: Add missing newline.
* qt/examples/Makefile.am:
* qt/examples/chat.h: Use UI-generated files with the ui_*.h
* qt/src/qdbusmarshall.cpp: Allow sending of QString() and
QByteArray() (nulls) over the bus.
* qt/src/qdbusabstractinterface.cpp: Use the correct variable,
the one that has the signature suffix stripped.
* qt/src/qdbusreply.h: Make some methods const.
2006-06-09 Thiago Macieira <thiago.macieira@trolltech.com>
Patch from Timo Hoenig <thoenig@suse.de>.
* qt/dbus/Makefile.am: New file. Fix "make dist", add all headers
required during build to EXTRA_DIST.
* qt/src/Makefile.am: Fix "make dist", add 'qdbus.h' to EXTRA_DIST.
* qt/Makefile.am: Fix "make dist", add 'dbus' to DIST_SUBDIRS.
* configure.in: Fix "make dist", take care that the Makefile for
qt/dbus is being generated.
2006-06-07 John (J5) Palmieri <johnp@redhat.com>
* bus/bus.c: Fix eavesdropping on method calls
2006-06-07 John (J5) Palmieri <johnp@redhat.com>
* configure.in:
* dbus/dbus-userdb-util.c:
Add Solaris console owner patch from Artem Kachitchkine
2006-06-07 Thiago Macieira <thiago.macieira@trolltech.com>
* qt/Makfile.am:
* qt/src/Makefile.am: Fix the EXTRA_DIST after the
reorganisation. Thanks to Timo Hoenig for pointing this out.
2006-06-06 Robert McQueen <robot101@debian.org>
* glib/dbus-gtype-specialized.c: Fix obvious leak of GArray in every
call to dbus_g_type_get_struct.
2006-06-06 Robert McQueen <robot101@debian.org>
* glib/dbus-gvalue-utils.c: Fix the failing test where static string
pointers were put into a GPtrArray-based specialised collection, and
then freed along with the array. GValues which you add into
collections or maps which have the NOCOPY flag set are assumed to not
belong to the caller, so rather than the existing pointer-stealing
semantics, they are copied instead. Given that the main consumers of
this abstraction are the bindings themselves, I don't think this is
too bad, but others should watch their choice of take vs set_static.
2006-06-06 Robert McQueen <robot101@debian.org>
* glib/dbus-gvalue-utils.c: Spotted a warning about the return value
of g_slist_prepend not being used. Fixed copying of slist-based
specialised collections, then wrote a test case and found that it was
all broken. Went on to fix iterating and appending too. Good thing
nobody uses this code yet.
2006-06-06 Robert McQueen <robot101@debian.org>
* glib/dbus-gvalue-utils.c: Remove duplicated code by having all of
the iterators use gvalue_take_ptrarray_value (the GValues themselves
are discarded without unsetting, so it makes no difference whether
we take or set_static). Remove cases for G_TYPE_POINTER because
there really is nothing useful we can do with them in our
specialised types - we *need* boxed copy/free functions at the very
2006-06-05 Thiago Macieira <thiago.macieira@trolltech.com>
* qt/dbus: Add directory. I had forgotten to add this
yesterday after the move...
* qt/examples/Makefile.am:
* qt/examples/dbus.cpp: Moved to qt/tools/dbus.cpp.
* qt/tools/Makefile.am:
* qt/tools/dbus.cpp: Moved from qt/examples/dbus.cpp.
Added feature to get and set properties.
Added validation of service, object path and interface names.
* qt/tools/dbusidl2cpp.cpp: Two new features:
1) Allow specifying both the header and the source file names,
by separating them with a colon.
2) Don't write an interface output if the -p switch wasn't
given, but the -a was.
* qt/src/*: Fix usage of Iterators and ConstIterators.
Fix shadowing of variables by other variables (-Wshadow).
Fix keyword-cleanliness in headers.
Fix ASCII-cast (QLatin1String, QLatin1Char).
Fix validation of member names.
Add extra checking of introspection data during XML parsing.
Various bug fixes.
2006-06-04 Thiago Macieira <thiago.macieira@trolltech.com>
* dbus/Makefile.am:
* dbus/qdbus.h: Remove unnecessary file. This is mirrored into
qt/dbus/qdbus.h now.
2006-06-04 Thiago Macieira <thiago.macieira@trolltech.com>
* configure.in: Make --disable-qt actually do
something. Patch inspired by Zack Rusin.
2006-06-04 Thiago Macieira <thiago.macieira@trolltech.com>
* qt/: Update to Subversion r548032.
This includes a big reorganisation of the files inside the
2006-05-30 Sjoerd Simons <sjoerd@luon.net>
* dbus/dbus-sysdeps.c: Make tcp socket connection error somewhat more
"Failed to connect to socket <host>:<port> <error>" instead of
"Failed to connect to socket <host>: <error>:<port>"
* dbus/dbus-transport-unix.c: Fix crash when no host option is given
for a tcp transport.
2006-05-29 Thiago Macieira <thiago.macieira@trolltech.com>
* qt/*: Update the QtDBus bindings up to revision 546310 in
This adds the dbuscpp2xml tool, that parses a C++ header and
outputs a D-BUS Introspection XML.
2006-05-21 Havoc Pennington <hp@redhat.com>
* glib/dbus-gproxy.c: Put in a pile of assertions that the proxy name
is not NULL when it shouldn't be. Also a couple of possible fixes
for #4637 though I don't understand why the bug happens, to be
honest... also the object constructor has an assert name != NULL
and the name is only currently NULL for peer-to-peer proxies that
I don't think anyone uses? So it should be asserting.
Anyway, for now at least see if we get an earlier assertion failure.
* glib/dbus-gvalue-utils.c: Put in a couple of assertions for
apparently broken code to be sure the tests fail and someone
will fix them...
2006-05-07 Thiago Macieira <thiago.macieira@trolltech.com>
* qt/qdbusmarshall.cpp: Fix a problem of demarshalling lists
and arrays when they had a single element: has_next returns
false, even before you read the element. So, instead, check
the array length.
2006-05-06 Thiago Macieira <thiago.macieira@trolltech.com>
* qt/qdbusmessage.cpp:
* qt/qdbustypehelper_p.h:
* qt/qdbusintegrator.cpp: gcc 3.4 doesn't like Q_FOREACH when
the list is a const-reference
2006-05-03 John (J5) Palmieri <johnp@redhat.com>
* Adding old doc patch that never got applied
* dbus/bus.c (dbus_bus_add_match): Add documentation
* doc/dbus-specification.xml: Add documentation for the match rules
and the AddMatch and RemoveMatch methods
2006-05-02 Thiago Macieira <thiago.macieira@trolltech.com>
* qt/dbusidl2cpp.cpp: There's no callAsync. Use the correct
call (r535506)
* qt/dbusidl2cpp.cpp:
* qt/qdbusabstractadaptor.cpp:
* qt/qdbusabstractadaptor.h: Make QDBusAdaptorConnector be a
sibling of the QDBusAbstractAdaptor objects instead of the
parent. (r535848)
* qt/dbusidl2cpp.cpp:
* qt/qdbusabstractinterface.cpp:
* qt/qdbusabstractinterface.h:
* qt/qdbusabstractinterface_p.h:
* qt/qdbusinterface.cpp: Make properties in interfaces
actually work. The code that was generated would not compile,
due to moc calls to functions that did not exist. They now
shall. (r536571)
2006-04-30 Thiago Macieira <thiago.macieira@trolltech.com>
* Makefile.am:
* configure.in:
* dbus-qt4-1.pc.in: Add a pkg-config file for libdbus-qt4-1.
Thanks to Brad Hards for providing the patch
2006-04-29 Thiago Macieira <thiago.macieira@trolltech.com>
* qt/dbusidl2cpp.cpp: There's no callAsync. Use the correct
call. (r535506)
2006-04-29 Thiago Macieira <thiago.macieira@trolltech.com>
* qt/examples/dbus.cpp: Enhance error messages and use
2006-04-29 Thiago Macieira <thiago.macieira@trolltech.com>
* qt/qdbusinterface.h: Rename QDBusRef to QDBusInterfacePtr
and disable the copy operators. (r533772, r534746)
* qt/qdbuserror.h: Remove the automatic cast to bool. (r533929)
* qt/qdbusabstractinterface.cpp:
* qt/qdbusabstractinterface.h: Change the default call mode to
not use the event loop. Add convenience call() methods that
take a CallMode parameter. (r534042)
* qt/qdbusconnection.h: Change the default call mode to not
use the event loop. (r534042)
* qt/qdbusinterface.cpp:
* qt/qdbusinterface.h: Add a method to tell us if the
interface is valid (since we don't return a null pointer
anymore) (r534099)
* qt/qdbusinterface_p.h: Don't crash if metaObject is 0
* qt/qdbusinternalfilters.cpp: Decouple the introspection
function in two so taht we get the chance to introspect
without having a QDBusMessage (r534102)
* qt/qdbusbus.h:
* qt/qdbusconnection.cpp:
* qt/qdbusconnection_p.h:
* qt/qdbusintegrator.cpp: Keep a list of our own names to
avoid a round-trip to the server when attempting to introspect
one of our own objects. Also make sure the filter functions
match the empty interface as well. (r534108)
Don't keep the connection names. Instead, trust the unique
connection name (r534111)
Remove event loop usage (r534112)
2006-04-29 Thiago Macieira <thiago.macieira@trolltech.com>
* qt/qdbusintegrator.cpp: Fix assertion failure spotted by
Brad Hards.
2006-04-28 Robert McQueen <robot101@debian.org>
* glib/dbus-gproxy.c: Fix properties so that they can be given in
any order, making it easier for people who inherit from this
2006-04-28 Robert McQueen <robot101@debian.org>
* glib/dbus-gvalue-utils.c: Patch from Jakub Stachowski to fix leaking
of memory from within pointer arrays and lists. Fixes bug #6300.
2006-04-28 Robert McQueen <robot101@debian.org>
* glib/dbus-gvalue.c: Patch from Jakub Stachowski to fix a leak in
generating struct signatures. Fixes bug #6083.
2006-04-28 Robert McQueen <robot101@debian.org>
* qt/Makefile.am: Tweak CLEANFILES from qdbusconnection.moc
to qdbusconnection_p.moc.
2006-04-24 John (J5) Palmieri <johnp@redhat.com>
* README, INSTALL: Doc fixes
Patch from Brad Hards <bradh at frogmouth.net>
2006-04-23 Thiago Macieira <thiago.macieira@trolltech.com>
* qt/examples/dbus.cpp: Use the new merged-interface mode for
the dynamic meta object. No need to guess which interface to
2006-04-23 Thiago Macieira <thiago.macieira@trolltech.com>
* qt/qdbusconnection_p.h:
* qt/qdbusmetaobject.cpp:
* qt/qdbusmetaobject_p.h:
* qt/qdbusintegrator.cpp: Use the new merged-interface mode
for the dynamic meta object. No need to guess which
interface to call.
* qt/qdbusabstractinterface_p.h:
* qt/qdbusconnection.cpp:
* qt/qdbusintegrator.cpp:
* qt/qdbusinterface.cpp:
* qt/qdbusinterface.h: Make findInterface always return a non-null pointer.
Add a QDBusRef that looks and behaves like DCOPRef.
2006-04-23 Thiago Macieira <thiago.macieira@trolltech.com>
* dbus/dbus-connection.c: Interfaces are optional in method
calls, so don't give up if the interface parameter is NULL.
Patch reviewed by Havoc Pennington.
2006-04-23 Thiago Macieira <thiago.macieira@trolltech.com>
* qt/qdbusreply.h: Add default constructor and operator=
* qt/qdbustypehelper_p.h: Use a clean namespace: no foreach()
in public headers (r532952)
* qt/qdbusabstractinterface.cpp:
* qt/qdbusabstractinterface_p.h: Add the AutoDetect mode and
make it the default (r532951)
2006-04-19 John (J5) Palmieri <johnp@redhat.com>
* dbus/dbus-connection.c: Fix asserts
Patch from Tim Moloney <t.moloney at verizon.net>
2006-04-19 John (J5) Palmieri <johnp@redhat.com>
* mono/Connection.cs, mono/Message.cs: Check Target type
Patch from Aaron Bockover (abockover at novell.com)
2006-04-13 Thiago Macieira <thiago.macieira@trolltech.com>
* INSTALL: fine-tune the requirements for the Qt4 binding.
2006-04-16 Daniel P. Berrange <dan@berrange.com>
* tools/dbus-print-message.c: Added support for printing of all
remaining data types. Fixed logic for indentation of compound
data types.
2006-04-15 Daniel P. Berrange <dan@berrange.com>
* INSTALL: fill out content of file providing DBus specific
build installations, followed by generic Auto* INSTALL file
2006-04-13 Thiago Macieira <thiago.macieira@trolltech.com>
* qt/qdbusintegrator.cpp: Work around g++ 3.3 bug.
Patch by Stefan Eilers. (r529537)
2006-04-13 Thiago Macieira <thiago.macieira@trolltech.com>
* qt/qdbusinternalfilters.cpp: Don't show the parent's
contents (r528208)
2006-04-10 Thiago Macieira <thiago.macieira@trolltech.com>
* qt/Makefile.am: fix the dependency for
qdbusconnection_p.moc. It's included in qdbusintegrator.cpp,
not in qdbusconnection.cpp.
Thanks to Jakub Stachowski <stachowski@hypair.net> for
spotting this.
2006-04-10 Thiago Macieira <thiago.macieira@trolltech.com>
* qt/examples/listnames.cpp:
* qt/examples/Makefile.am: Three ways to list the names on the
2006-04-10 Thiago Macieira <thiago.macieira@trolltech.com>
* test/qt/tst_hal.cpp: Remove the waiting, since it's not
needed anymore. Requires Qt 4.1.3 to work properly. (r528148)
2006-04-10 Thiago Macieira <thiago.macieira@trolltech.com>
Merge from Subversion:
* qt/qt-dbus.qdocconf: Update Trolltech's webpage link to
something that exists (r526315)
* qt/qdbusinternalfilters.cpp: Correctly detect non-scriptable
* qt/qdbusinternalfilters.cpp: Fix the setProperty call and
also return an unknown-method error if the parameters don't
match for org.freedesktop.DBus.Properties. (r526842)
* qt/examples/dbus.cpp: Allow passing of QVariants (r526843)
* qt/qdbusintegrator.cpp: Restore the proper order of
delivery: don't make method returns be delivered on priority
2006-03-28 Thiago Macieira <thiago.macieira@trolltech.com>
* configure.in qt/Makefile.am: add qt/examples
* qt/examples: Add QtDBus example programs:
- hello: Hello, World
- ping: Simple method-calling program
- pong: Simple object-exporting program (not using adaptors)
- complexping: Interactive method-calling program
(also gets and sets properties).
- complexpong: Sample program exporting methods, Q_SIGNALS and
properties, using adaptors.
- dbus: Simple implementation of a generic method-calling
program, similar to 'dbus-send', but with semantics
similar to 'dcop'.
- chat: Simplistic chat program, implemented using Q_SIGNALS
and the system bus. Looks like IRC.
2006-03-28 Thiago Macieira <thiago.macieira@trolltech.com>
* configure.in: Detect QtGui (necessary for one of the
example programs). Note: this increases the minimum required
version of Qt to 4.1.3.
2006-03-28 Thiago Macieira <thiago.macieira@trolltech.com>
* test/qt/*: Sync with KDE Subversion revision 523647.
Update the testcases to the new API. Remove testcases for
classes that are no longer public or have been removed.
2006-03-28 Thiago Macieira <thiago.macieira@trolltech.com>
* qt/*:
* dbus/qdbus.h: Sync with KDE Subversion revision
523647. Hopefully, this will be the last of the
source-incompatible changes. Documentation has been improved;
support for QList<basic-types> has been added; QDBusObject is
gone; QDBus(Abstract)Interface is now a QObject with
auto-generated meta-object; QDBusIntrospection is marked
private, since QMetaObject can be used now; lots of bugfixes.
2006-03-16 John (J5) Palmieri <johnp@redhat.com>
Patch from Milosz Derezynski <internalerror at gmail.com>
* configure.in:
Output the service directory in the configure summary
* dbus-1.pc.in:
Add session_bus_services_dir
2006-03-10 Ross Burton <ross@openedhand.com>
* tools/dbus-print-message.c:
Add support for object paths and signatures.
2006-03-06 Sjoerd Simons <sjoerd@luon.net>
* bus/bus.c: (bus_context_reload_config): Flush the user database cache on
config reload.
* bus/dbus-daemon.1.in: Also note that SIGHUP flushes the user/group
information caches
* dbus/dbus-hash.c: (_dbus_hash_table_remove_all):
* dbus/dbus-hash.h: Add function to remove all entries from a hash table
* dbus/dbus-userdb.c: (_dbus_user_database_flush):
* dbus/dbus-userdb.h: Add function to flush all user/group information
2006-03-06 Thiago Macieira <thiago.macieira@trolltech.com>
* qt/dbusidl2cpp.cpp:
* qt/Makefile.am: add the dbusidl2cpp tool, the replacement
for dcopidl2cpp, found in the KDE installations (or the more
modern kalyptus): generate Qt4 C++ code for the input XML
introspection. Currently no IDL parsing.
2006-03-06 Thiago Macieira <thiago.macieira@trolltech.com>
* test/qt/*: Update the self-tests.
2006-03-06 Thiago Macieira <thiago.macieira@trolltech.com>
* qt/*:
* dbus/qdbus.h: Sync with KDE Subversion revision 516237. This
represents the first feature-complete version of the Qt4
bindings since I took ove maintainership.
2006-03-06 Thiago Macieira <thiago.macieira@trolltech.com>
* qt/Doxyfile: Adding a Doxyfile for the Qt4 bindings
dir. This is C++, so we can't use the DBus ones.
2006-03-02 John (J5) Palmieri <johnp@redhat.com>
* python/dbus_bindings.pyx: Remove refrence to sys/cdefs.h
(Patch from Artem Kachitchkine <Artem.Kachitchkin at Sun.COM>)
2006-03-02 John (J5) Palmieri <johnp@redhat.com>
* dbus/dbus-connection.c:
Check to see if our data has already been read off the connection
by another blocking pending call before we block in poll.
Code taken from _dbus_connection_block_pending_call - checks for
an already read reply and updates the dispatch if there is one.
* test/name-test/test-pending-call-dispatch.c:
New test for making sure we don't get stuck polling a
dbus connection which has no data on the socket when
blocking out of order on two or more pending calls.
2006-02-28 Thiago Macieira <thiago.macieira@trolltech.com>
* qt/Makefile.am: Patch by Sjoerd Simons. More .moc issues:
make/automake don't detect that we're talking about the same
.lo file if I specify the full path to the source files.
2006-02-26 Havoc Pennington <hp@redhat.com>
* bus/dbus-daemon.1.in: improve the language in a couple spots I noticed
* dbus/dbus-bus.c (internal_bus_get): in the error message if the
session bus variable is unset, suggest "man dbus-launch" and "man
dbus-daemon" to figure out how to fix the problem
2006-02-25 Havoc Pennington <hp@redhat.com>
* glib/dbus-glib-tool.c (usage): fix up the usage message, someone
should make this thing use the new glib options parser
2006-02-25 Thiago Macieira <thiago.macieira@trolltech.com>
* qt/Makefile.am: Patch by Sjoerd Simons. Fix the path to the
.lo files taking moc sources.
2006-02-25 Havoc Pennington <hp@redhat.com>
* dbus/dbus.h, dbus/Makefile.am: add dbus-signature.h to dbus.h
and install it as a public header
2006-02-24 John (J5) Palmieri <johnp@redhat.com>
* Released 0.61
2006-02-24 John (J5) Palmieri <johnp@redhat.com>
* proxies.py: Fix the callchain
2006-02-24 John (J5) Palmieri <johnp@redhat.com>
* patch from Sjoerd Simons <sjoerd at debian.org>:
* dbus/dbus-sysdeps-util.c (_dbus_group_info_free): Moved to
* dbus/dbus-userdb.c (_dbus_group_info_free_allocated): Don't
call _dbus_group_info_free_allocated which causes infinite loop,
correctly call _dbus_group_info_free
2006-02-20 Thiago Macieira <thiago.macieira@trolltech.com>
* qt/qdbusinterface_p.h:
* qt/qdbusinterface.cpp: Use the standard
org.freedesktop.DBus.Method.NoReply annotation for the "async"
calls instead of creating one for us.
* qt/qdbusconnection_p.h:
* qt/qdbusintegrator.cpp: Remove debugging code.
* qt/qdbusintegrator.cpp:
* qt/qdbusmessage.cpp:
* qt/qdbusmessage_p.h:
* qt/qdbusmessage.h: Change the behaviour of automatic
reply-sending: now a reply is always sent, unless the caller
didn't request one or if the user slot has already sent one.
2006-02-16 Robert McQueen <robot101@debian.org>
* configure.in: Patch from Debian packages by Sjoerd Simons
<sjoerd@debian.org> to add --with-qt-moc and --with-qt3-moc
arguments so it's possible to build both bindings in the
same tree.
* qt/Makefile.am: Fix truncated value so that make dist works.
2006-02-16 Robert McQueen <robot101@debian.org>
* acinclude.m4, configure.in: Patch from Brad Hards
<bradh@frogmouth.net> to avoid warnings from autoconf 1.9 by
improving quoting, re-ordering a few checks, and a few other
aesthetic tidy-ups.
2006-02-16 Robert McQueen <robot101@debian.org>
* dbus/dbus-message.c (dbus_message_iter_get_fixed_array):
Patch from Rob Taylor <rob.taylor@collabora.co.uk> to correct a bogus
assertion that the next element to read from the iter is fixed in
size. This is not the case when you are at the end of the iter,
because the next element type is INVALID.
* dbus/dbus-string.c (_dbus_string_init_const_len): Correct a
a bogus assert which means that you may not initialise a 0-length
string unless you provide a non-NULL pointer. This prevented
you from marshalling messages containing zero-length arrays in
some cases.
* glib/dbus-gvalue.c (demarshal_collection_array): Another patch
from Rob to correct bogus asserts when trying to demarshal an
array and get_fixed_array got you 0 elements. Append nothing to
the GArray in this case.
* test/glib/test-dbus-glib.c: Add a test case for round-tripping
an empty array via the glib bindings. Without all of the above
patches, this new test fails.
2006-02-16 Robert McQueen <robot101@debian.org>
* glib/dbus-gmain.c: Make the previous commit compile.
* python/_dbus.py, python/matchrules.py: Patch from Ole Andre
Ravnaas <ole.andre.ravnaas@collabora.co.uk> to allow you to
specify sender_keyword="foo", path_keyword="bar" when adding
a signal listener, so that you can bind to Q_SIGNALS generically
but still do something useful in your callback.
* python/dbus_bindings.pyx: Demarshal the byte type as unsigned
chars so that they're not cast to chars and made negative. Thanks
to Jakub Stachowski for reporting this and testing the fix.
2006-02-15 John (J5) Palmieri <johnp@redhat.com>
* dbus/dbus-glib.h:
* glib/dbus-gmain.h:
(dbus_g_connection_open): new method for openning
a connection to an arbitrary address in the glib bindings
* ChangeLog: checkin last entry which doesn't seem to be commited
2006-02-13 John (J5) Palmieri <johnp@redhat.com>
* tools/dbus-launch.c: Fixed sh syntax output
2006-02-13 Robert McQueen <robot101@debian.org>
* glib/dbus-binding-tool-glib.c, glib/dbus-gmain.c,
glib/dbus-gsignature.c, glib/dbus-gtype-specialized.c,
glib/dbus-gtype-specialized.h, glib/dbus-gvalue-utils.c,
glib/dbus-gvalue-utils.h, glib/dbus-gvalue.c:
Patch from Rob Taylor <rob.taylor@collabora.co.uk> to add a big
missing piece of the glib bindings jigsaw puzzle. This modifies
the existing specialised types to have N type parameters (rather
than the current 1 or 2 for arrays and dictionaries respectively).
You can then use this to get a glib type to represent any arbitrary
D-Bus struct type using dbus_g_type_get_struct. The only
implementation of these types is with GValueArrays as before,
but it's now possible to store these in arrays, emit them in
2006-02-10 John (J5) Palmieri <johnp@redhat.com>
* dbus/dbus-signature.c (dbus_signature_iter_recurse): Correctly
deal with nested arrays (Bug #5823) Patch by Thiago Macieira
<thiago.macieira at trolltech.com>
2006-02-10 John (J5) Palmieri <johnp@redhat.com>
* mono/doc/Makefile.am: Fix parallel make problem with mono-doc
(Bug #4213) Patch from Doug Goldstein <cardoe at gentoo.org>
2006-02-10 John (J5) Palmieri <johnp@redhat.com>
* bus/connection.c (bus_connections_expect_reply): Make
pending reply limit not common to all connections (Bug #5416)
Patch from Kimmo Hämäläinen <kimmo.hamalainen at nokia.com>
2006-02-10 John (J5) Palmieri <johnp@redhat.com>
* tools/dbus-launch.c: Fixed csh syntax output (Bug #5720)
2006-02-10 John (J5) Palmieri <johnp@redhat.com>
* gcj/Makefile.am: point to correct jar command (Bug #4529)
patch from Doug Goldstein <cardoe at gentoo.org>
2006-02-09 Joe Shaw <joeshaw@novell.com>
* mono/Arguments.cs: Fix a magic number in the mono bindings
that doesn't work on 64 bit arches. Patch from Peter Johanson.
2006-01-27 Robert McQueen <robot101@debian.org>
* glib/dbus-binding-tool-glib.[ch]: Patch based on Ricardo Kekki's
patch to use an annotation org.freedesktop.DBus.GLib.ClientCSymbol
when generating the client-side methods, instead of overloading
CSymbol which broke everything horribly. My apologies.
2006-01-27 Robert McQueen <robot101@debian.org>
* glib/dbus-gtype-specialized.[ch], glib/dbus-gvalue-utils.c: Patch
by me and Rob Taylor to add a simple_free function to D-Bus map
and collection types, which allows those types which can be freed
with a GDestroyNotify (such as GHashTables and GArrays, but not
GPtrArrays) to be stored as the values in hashtables.
* test/glib/test-dbus-glib.c, test/glib/test-service-glib.{c,xml}:
Patch by Rob Taylor to add nested dicts to the glib tests to check
the above code works, and appears not to leak when called repeatedly.
2006-01-27 Robert McQueen <robot101@debian.org>
* glib/dbus-gvalue.c (demarshal_valuearray): Patch from Rob Taylor
to free a D-Bus allocated string with dbus_free () instead of
g_free ().
2006-01-27 Iain Holmes <iain@openedhand.com>
* glib/dbus-gproxy.c (dbus_g_proxy_dispose): Protect the dispose
method from being called multiple times.
2006-01-19 Robert McQueen <robot101@debian.org>
* glib/dbus-binding-tool-glib.c: Patch from Rob Taylor
<rob.taylor@collabora.co.uk> to add support for generating bindings
to arrays that are represented as GPtrArrays rather than GArrays (ie
size-variable things, such as strings, objects, structs, etc).
2006-01-05 Robert McQueen <robot101@debian.org>
* dbus/dbus-glib.h, glib/dbus-gproxy.c: Patch from Ricardo Kekki
<ricardo.kekki@movial.fi> to make it possible to inherit from
DBusGProxy, by splitting the DBusGProxy struct into a public part and
a private part, and moving the setting of the DBusGProxyManager into a
connection property, allowing proper GObject construction.
2006-01-05 Robert McQueen <robot101@debian.org>
* glib/dbus-binding-tool-glib.c: Patch from Ricardo Kekki
<ricardo.kekki@movial.fi> to make dbus-binding-tool heed C symbol name
annotations when generating glib client bindings.
2005-12-19 John (J5) Palmieri <johnp@redhat.com>
* dbus/dbus-shared.h: Call it shared constants instead of shared macros
* dbus/dbus-protocol.h: add DOxygen markup to quiet warnings
2005-12-19 John (J5) Palmieri <johnp@redhat.com>
* dbus/dbus-shared.h: add DOxygen markup to quiet warnings
2005-12-19 John (J5) Palmieri <johnp@redhat.com>
* dbus/dbus-macros.h: correct DOxygen end of section (s/}@/@})
2005-12-19 Ross Burton <ross@openedhand.com>
* doc/dbus-tutorial.xml:
Document the Glib client-side bindings, and list all possible annotations.
2005-12-19 John (J5) Palmieri <johnp@redhat.com>
* dbus/bus.c (dbus_bus_release_name): Add documentation
2005-12-06 Robert McQueen <robot101@debian.org>
* python/service.py: s/sucessful/successful/ so we're allocating to
and reading from the same variable. Oops.
2005-11-30 John (J5) Palmieri <johnp@redhat.com>
* Released 0.60
2005-11-30 John (J5) Palmieri <johnp@redhat.com>
* test/qt/Makefile.am: build from srcdir
* qt/qtconnection.cpp (requestName): Changed PROHIBIT_REPLACE to ALLOW_REPLACE
Note - this code is wrong and needs to be fixed by the Qt binding
developers. The flags should be treated as bitfields and not enums.
* qt/qtconnection.h: Change ProhibitReplace to AllowReplace
2005-11-30 John (J5) Palmieri <johnp@redhat.com>
* dbus/dbus-list.c (_dbus_list_insert_after_link, _dbus_list_insert_after,
link_after): remove #ifdef DBUS_BUILD_TESTS since we use these methods
in production code
2005-11-30 John (J5) Palmieri <johnp@redhat.com>
* dbus/dbus-connection.c (dbus_connection_read_write): Add new
method for getting messages off the bus in the absence of a
mainloop. This method is much like
dbus_connection_read_write_dispatch except it does not dispatch
the messages to a registered filter function. Instead it
allows a developer to process messages by directly popping
them off the bus.
2005-11-30 John (J5) Palmieri <johnp@redhat.com>
* bus/desktop-file.c (parse_key_value): Ignore locales allowing
the parser to continue instead of returning error
(bus_desktop_file_load): Do not free parser data when
parse_section_start or parse_key_value fails because it was
already freed by parser_free (patch from Carlos Garcia Campos
<carlosgc at gnome.org>)
2005-11-30 John (J5) Palmieri <johnp@redhat.com>
* dbus/dbus-auth.c, dbus/dbus-connection.c, dbus/dbus-keyring.c,
dbus/dbus-server-debug-pipe.c, glib/dbus-binding-tool-glib.c
glib/dbus-glib-tool.c, glib/dbus-gparser.c, glib/dbus-gproxy.c
test/test-segfault.c, test/test-utils.c,
test/glib/test-dbus-glib.c, tools/dbus-cleanup-sockets.c
tools/dbus-launch.c, tools/dbus-tree-view.c, tools/dbus-viewer.c:
Various cleanup of dead code and compiler warnings (patch from
Kjartan Maraas <kmaraas at gnome.org>)
2005-11-30 John (J5) Palmieri <johnp@redhat.com>
* glib/dbus-gmain.c (connection_setup_add_watch): plugged a leak
(patch from Carlos Garnacho Parro <carlosg at gnome.org>
2005-11-27 Robert McQueen <robot101@debian.org>
* python/dbus_bindings.pyx: Repair my previous commit which reverted
part of the preceding one. Oops. Merge patch by Johan Hedberg
<johan.hedberg@nokia.com> to fix marshalling of 16-bit integer values
on big-endian platforms.
* test/python/test-client.py: Add some 16-bit integers to the test
2005-11-27 Carlos Garcia Campos <carlosgc@gnome.org>
* glib/dbus-gobject.c: Append a GValue instead of a basic type in
method return message for property getters
2005-11-27 Robert McQueen <robot101@debian.org>
* python/dbus_bindings.pyx: Fix a bug where doing a strict append
with type v of an instance of dbus.Variant(foo, type='x') caused
it to be boxed twice before sending over the bus.
* python/dbus_bindings.pyx, python/service.py,
test/python/test-client.py: Update the constants for the new
request_name flags, and update comments/test cases now that queueing
is the default action.
2005-11-22 John (J5) Palmieri <johnp@redhat.com>
* configure.in:
- Change version to 0.60 for impending release
- upped the sonames because of ABI and API breakage
2005-11-22 John (J5) Palmieri <johnp@redhat.com>
* configure.in: Add test/name-test/Makefile to the generated
Makefile list
* dbus/dbus-shared.h (#define DBUS_NAME_FLAG_ALLOW_REPLACEMENT):
(#define DBUS_NAME_FLAG_DO_NOT_QUEUE): New flag for specifying
not to queue an ower if it can't be the primary owner
* bus/bus.h: Add new internal BusOwner struct
* bus/driver.c (bus_driver_handle_hello): Send flags (0 for default)
to bus_registry_ensure and don't set the prohibit_replacement flag
since they are now set per BusOwner and not per name.
(bus_driver_handle_list_queued_owners): bus method (ListQueuedOwners)
that returns the list of connections in a name's connection queue
* bus/services.c (struct BusService): remove prohibit_replacement field
(struct BusOwner): new struct for keeping track of queued connections
and their associated flags for the queue
(struct BusRegistry): add a BusOwner memory pool
(bus_registry_new): initialize the BusOwner memory pool
(bus_registry_unref): free the BusOwner memory pool
(_bus_service_find_owner_link): new internal method for
searching the queue for a specific connection
(bus_owner_set_flags): new method for adding setting the flags on a
bus owner
(bus_owner_new): new method that creates a BusOwner object from the
pool and sets its flags
(bus_owner_ref, bus_owner_unref): ref counting for BusOwner objects
(bus_registry_ensure): Add the flags parameter
(bus_registry_acquire_service): Switch from using raw connections to
using the BusOwner struct
Add new state machine for dealing with the new set of flags
(bus_registry_set_service_context_table, struct OwnershipCancelData,
cancel_ownership, free_ownership_cancel_data,
add_cancel_ownership_to_transaction, struct OwnershipRestoreData,
restore_ownership, free_ownership_restore_data,
add_restore_ownership_to_transaction): Switch to using BusOwner
instead of raw connections
(bus_service_add_owner): Add flags parameter
Switch to using BusOwner instead of raw connections
Add state machine for dealing with the new set of flags
(bus_service_swap_owner): Swaps the first and second owners in the
queue. Used to make sure proper Q_SIGNALS are sent when a service looses
or gains primary ownership. We never insert an owner at the top of the
queue. Instead we insert it in the second position and then swap.
(bus_service_remove_owner): Remove the owner from the queue sending
out the NameLost and NameOwnerChanged Q_SIGNALS if the we were the
primary owner
(bus_service_get_primary_owners_connection): New method that extracts
the connection from the primary owner
(bus_service_get_primary_owner): Returns the BusOwner instead of the
(bus_service_get_allow_replacement): Changed from the old
bus_service_get_prohibit_replacement method. Checks the flags of the
primary owner and returns if it can be replaced or not
(bus_service_set_prohibit_replacement): removed
(bus_service_has_owner): returns TRUE if and owner with
the specified connection exists in the queue
* dbus/dbus-bus.c (dbus_bus_connection_get_unique_name): New helper
method that only compiles if tests are enabled. Allows us to get the
unique name of a connection so we can check it against the queue when
doing regression tests
* bus/activation.c (bus_activation_send_pending_auto_activate),
bus/dispatch.c (bus_dispatch),
bus/driver.c (bus_driver_handle_get_service_owner,
bus/Q_SIGNALS.c (connection_is_primary_owner):
use bus_service_get_primary_owners_connection instead of
* dbus/dbus-sysdeps.c (_dbus_connect_unix_socket,
_dbus_listen_unix_socket): Calculate the length of the socket
path and use that instead of using a fixed length which was
causing socket names to contain many trailing Nul bytes.
* dbus/dbus-glib-lowlevel.h, glib/dbus-gobject.c
(dbus_g_method_get_sender): New method for extracting the sender
from a DBusGMethodInvocation
(dbus_g_method_return_get_reply): changed name to
(dbus_g_method_return_send_reply): changed name to
dbus_g_method_send reply
* doc/dbus-specification.xml: New docs that describe how the new
queueing system works and talks about the changes to the how
we specify socket names
* glib/examples/example-service.c,
Changed the RequestName flags to the new system
* test/name-test/ (test-names.c, run-test.sh, Makefile.am): New
regression test suite for testing various states of the new
queueing system
2005-11-15 Robert McQueen <robot101@debian.org>
* dbus/dbus-glib-lowlevel.h, glib/dbus-gobject.c: Patch from Rob
Taylor to add two methods, dbus_g_method_return_get_reply and
dbus_g_method_return_send_reply, to allow you to get the reply
message from a DBusGMethodInvocation, append arbitrary stuff to it,
and send it. The GLib bindings can't marshal a return value of
something like a(s) if the array is empty - ultimately they should be
made to heed the signature of the out arguments as the Python bindings
now can, but this is a workable interim solution which might have
other applications.
2005-11-15 Robert McQueen <robot101@debian.org>
* bus/driver.c, bus/services.c, bus/services.h: Add a ReleaseName
method to org.freedesktop.DBus to release a bus name or give up
waiting in the queue for it.
* dbus/dbus-bus.c, dbus/dbus-bus.h, dbus/dbus-shared.h: Add a
dbus_bus_release_name method to send the ReleaseName method calls.
Add constants for the return values to dbus/dbus-shared.h.
* doc/dbus-specification.xml: Document the new ReleaseName method
in the specification.
* python/dbus_bindings.pyx: Add a low-level python binding for the
release name method.
* python/exceptions.py, python/service.py: Make freeing BusName
objects release the name. Add a NameExistsException, and fix a
bug with creating UnknownMethodException.
* test/python/test-client.py: Add tests for freeing BusName
objects causing names to be released.
2005-11-14 Robert McQueen <robot101@debian.org>
* python/service.py: Include the traceback in the error reply when we
send an exception over the bus. _BEST_ _PATCH_ _EVER_
2005-11-14 David Zeuthen <davidz@redhat.com>
Patch from Timo Hoenig <thoenig@suse.de>.
* bus/bus.c: I've recently investigated why the automatic reload
of configuration files does not work as expected.
Currently, reloading configuration files does only work when
running dbus-daemon with --nodaemon. If we are running as daemon
we're hitting a dnotify bug once we fork the process.
We're initializing the dnotify fds before calling fork(). Once
the child process forked it does still have the fds (and they
still show up in /proc/`pidof dbus-daemon`/fd/) but we're not
getting SIGIO as changes are made to the configuration files.
The attached patch moves the initialization of the dnotify fds to
process_config_postinit(). This is safe for all current code
paths and solves the dnotify disfunction. If we're running
dbus-daemon as daemon the fds for dnotify are now being
initialized after fork() for the child process.
* configure.in: The current configure.in check for dnotify probes
'x$target_os' for being 'xlinux-gnu'. I've changed the check to
match for 'xlinux', too. Additionally I have adapted the configure
option's style to match with the others.
2005-11-14 Robert McQueen <robot101@debian.org>
* python/decorators.py, python/service.py: Add a new argument to the
dbus.service.method decorator called sender_keyword, which if set,
specifies the name of an argument which will be provided the bus
name of the method caller.
* test/python/test-client.py, test/python/test-service.py: Add a
method and test to check the sender_keyword functionality.
2005-11-07 John (J5) Palmieri <johnp@redhat.com>
* bus/driver.c (bus_driver_handle_reload_config): Make sure we send an
empty reply so blocking calls don't block forever (Patch from Sjoerd
Simons <sjoerd at luon.net>)
* AUTHORS: Add Robert McQueen for his work on the Python
Bindings and other parts of D-Bus
2005-11-07 Robert McQueen <robot101@debian.org>
* python/decorators.py: Change emit_signal function to use the
signature annotation of the signal when marhsalling the arguments from
the service. Fix a bug where the code checking signature length
against argument length referenced the wrong variable.
* python/introspect_parser.py: Avoid adding the type signature of
signal arguments to any methods which occur after them in the
introspection data (!) by making the parser a little more careful
about its current state.
* python/service.py: Remove debug prints from last commit (again :D).
* test/python/test-client.py, test/python/test-service.py: Add test
Q_SIGNALS with signature decorators to test the strict marshalling code
gives errors at the right time. Could do with checking the Q_SIGNALS
actually get emitted too, given that the test does nothing with
Q_SIGNALS at the moment...
2005-11-07 Robert McQueen <robot101@debian.org>
* python/_dbus.py: Add WeakReferenceDictionary cache of dbus.Bus
instances to stop madness of creating new instances representing
the same bus connection all the time, rendering any tracking of
match rules and bus names quite meaningless. Caught a bug where
the private argument to SessionBus() and friends was being passed
in as use_default_mainloop by mistake. Still some problems with
multiple dbus_binding.Connection instances representing the same
low-level connection (eg when you use both SessionBus() and
StarterBus() in same process), but it's a lot better now than it
* python/dbus_bindings.pyx: Add constants with the return values
for bus_request_name().
* python/service.py: Store bus name instances in a per-dbus.Bus cache
and retrieve the same instances for the same name, so deletion can be
done with refcounting. Also now throws some kind of error if you
don't actually get the name you requested, unlike previously...
* test/python/test-client.py: Add tests for instance caching of buses
and bus name objects.
2005-11-04 Robert McQueen <robot101@debian.org>
* python/dbus_bindings.pyx, test/python/test-client.py: Fix
marshalling of boolean values. Add some booleans to the values in
the test client.
* python/decorators.py, python/service.py: Add an 'async_callbacks'
argument to the dbus.service.method decorator, which allows you to
name arguments to take two callback functions for replying with
return values or an exception.
* test/python/test-client.py, test/python/test-service.py: Add test
case using asynchronous method reply functions, both return values and
errors, and from within both the function itself and from a mainloop
* python/decorators.py, python/service.py: Perform checking that the
number of method/signal arguments matches the number of types in the
signature at class loading time, not when you first introspect the
* python/service.py: Remove debug print left by the last commit.
2005-11-03 Robert McQueen <robot101@debian.org>
* python/service.py: Heavy refactoring of method invocation, with
hopefully no effect on functionality. Nuked _dispatch_dbus_method_call
in favour of a new _message_cb that uses seperate functions for
looking up the method to call, marshalling the return values, and
sending exceptions as errors, and is easier to follow as a
consequence. Fixes some corner cases about returning things that
don't match your declared out_signature, allows exceptions to define
_dbus_error_name and have it be sent over the bus as the error name,
and paves the way for cool stuff like heeding the message no reply
flag, asynchronous method implementations, informing the method of the
sender, and including backtraces in the error messages.
* test/python/test-client.py: Catch and print exceptions thrown in the
async callback tests, rather than passing them to the low-level
bindings to be ignored in a noisy and frustrating manner.
2005-11-03 Robert McQueen <robot101@debian.org>
* python/_dbus.py, python/proxies.py, python/service.py: Add __repr__
functions to dbus.Bus, dbus.service.BusName and dbus.service.Object,
tweak others to be consistent.
* test/python/test-client.py: Tweak output of testInheritance.
2005-10-29 Robert McQueen <robot101@debian.org>
* python/service.py: Major changes to allow multiple inheritance
from classes that define D-Bus interfaces:
1. Create a new Interface class which is the parent class of
Object, and make the ObjectType metaclass into InterfaceType.
2. Patch written with Rob Taylor to replace use of method_vtable
with code that walks the class's __MRO__ (method resolution order)
to behave like Python does when invoking methods and allow
overriding as you'd expect. Code is quite tricky because
we have to find two methods, the one to invoke which has the
right name and isn't decorated with the /wrong/ interface,
and the one to pick up the signatures from which is decorated
with the right interface.
The same caveats apply as to normal multiple inheritance -
this has undefined behaviour if you try and inherit from two
classes that define a method with the same name but are
decorated with different interfaces. You should decorate
your overriding method with the interface you want.
3. Replace grungy introspection XML generation code in the metaclass
with dictionaries that cope correctly with multiple inheritance
and the overriding of methods. This also uses the signature
decorations to provide correct introspection data, including
the debut appearance of the types of your return values. :D
* test/python/test-client.py, test/python/test-service.py: Add a test
case to try invoking an method that overrides one inherited from a
D-Bus interface class.
2005-10-29 Robert McQueen <robot101@debian.org>
* python/dbus_bindings.pyx: Tweak 'raise AssertionError' to assert().
Add checking for the end of struct character when marshalling a
struct in MessageIter.append_strict.
* python/examples/example-service.py,
python/examples/gconf-proxy-service2.py: Update to use gobject
mainloop directly rather than appearing to depend on gtk.
* python/test/test-client.py, python/test/test-server.py: Remove
obsolete and broken test scripts for old bindings. We have up to date
and working tests in test/python/.
2005-10-29 Robert McQueen <robot101@debian.org>
* python/decorators.py: Add optional arguments to the method and
signal decorators to allow you to specify the signature of arguments
and return values. Preserve the doc strings of signal functions in the
decorated version, for pydoc and friends.
* python/dbus_bindings.pyx, python/proxies.py: Replace the
parse_signature_block function with an iterable dbus.Signature()
type. Fix a bug in MessageIter.append_strict where you could append
anything by claiming it was a string.
* python/service.py: Use the out_signature decoration on methods to
marshal return values, meaning you no longer require dbus.Array()
or dbus.Dictionary() to indicate the type when returning empty
arrays or dictionaries. Fix a bug where exceptions which are defined
in __main__ are not turned into error replies.
* test/python/test-client.py, test/python/test-service.py: Add test
for correct marshalling of return values according to out_signature.
Fix a bug in the async call test where the error_handler is missing a
self argument.
2005-10-29 Robert McQueen <robot101@debian.org>
* glib/Makefile.am, glib/examples/Makefile.am,
glib/examples/statemachine/Makefile.am: Merge patch from Ubuntu by
Daniel Stone to replace explicit calls to libtool with $(LIBTOOL).
* test/python/.cvsignore: Add run-with-tmp-session-bus.conf.
* tools/dbus-monitor.1, tools/dbus-monitor.c: Merge dbus-monitor patch
from Ubuntu by Daniel Silverstone to allow specifying match rules on
the command line.
2005-10-27 Ross Burton <ross@openedhand.com>
* dbus/dbus-marshal-header.c:
Remove dead code.
* glib/dbus-gobject.c:
Stop compiler warning.
2005-10-25 Ross Burton <ross@openedhand.com>
* dbus/dbus-auth.c:
* dbus/dbus-server-unix.c:
* dbus/dbus-transport-unix.c:
* glib/dbus-gmain.c:
* glib/dbus-gobject.c:
Add some const keywords.
2005-10-25 Ross Burton <ross@openedhand.com>
* doc/dbus-specification.xml:
Document the NoReply annotation.
* glib/dbus-binding-tool-glib.h:
* glib/dbus-binding-tool-glib.c:
Respect the NoReply annotation.
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
2005-10-17 John (J5) Palmieri <johnp@redhat.com>
* glib/dbus-gvalue-utils.c (hash_free_from_gtype): handle gdouble
(gvalue_from_hash_value, hash_value_from_gvalue): handle gdouble
* glib/dbus-gvalue.c (dbus_gvalue_to_signature): add missing
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
2005-10-14 John (J5) Palmieri <johnp@redhat.com>
* 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
* 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
2005-10-13 John (J5) Palmieri <johnp@redhat.com>
* 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
2005-10-13 John (J5) Palmieri <johnp@redhat.com>
* python/service.py (ObjectType::_reflect_on_signal): Always close
signal tag even when there are no arguments
2005-10-13 John (J5) Palmieri <johnp@redhat.com>
* 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.
2005-10-12 John (J5) Palmieri <johnp@redhat.com>
patches from Michael Krivoruchko <misha at sun.com>:
* dbus/dbus-connection.c (_dbus_connection_queue_received_message_link,
_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)
2005-10-05 John (J5) Palmieri <johnp@redhat.com>
* 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],
Add two test methods
* python/introspect_parser.py: New module for parsing introspect
* 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
2005-10-03 John (J5) Palmieri <johnp@redhat.com>
* bus/driver.c (bus_driver_handle_introspect): Add Q_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
2005-09-26 John (J5) Palmieri <johnp@redhat.com>
* 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
* 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
2005-09-26 John (J5) Palmieri <johnp@redhat.com>
* 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
2005-09-23 Harald Fernengel <harry@kdevelop.org>
* dbus/qt: New Qt bindings
2005-09-12 Waldo Bastian <bastian@kde.org>
* dbus/dbus-marshal-validate.c,
doc/dbus-specification.xml, test/Makefile.am,
test/test-names.c: allow hyphens in bus names.
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_remove_watch): add note about
these needing the connection to be locked.
set status to DATA_REMAINS when we queue the
disconnected message.
* bus/dispatch.c:
(bus_dispatch): fix warning.
Expect ChildSignaled error too.
(check_existent_hello_from_self): fix another
couple of warnings.
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.
2005-09-06 John (J5) Palmieri <johnp@redhat.com>
* 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 tdecore, 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)
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
2005-08-31 John (J5) Palmieri <johnp@redhat.com>
* 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
2005-08-30 John (J5) Palmieri <johnp@redhat.com>
* 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.
2005-08-30 John (J5) Palmieri <johnp@redhat.com>
* python/dbus_bindings.pyx (_pending_call_notification): Obtain the
GIL global lock when calling back into Python
2005-08-29 John (J5) Palmieri <johnp@redhat.com>
* 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.
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.
2005-08-25 John (J5) Palmieri <johnp@redhat.com>
* 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
- 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
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.
2005-08-24 John (J5) Palmieri <johnp@redhat.com>
* test/python: Add python regression test
* configure.in: Add test/python/Makefile
* test/Makefile.am: Add the python directory to SUBDIRS
2005-08-24 John (J5) Palmieri <johnp@redhat.com>
* Release 0.36.1
* python/_dbus.py:
(Interface::connect_to_signal): propigate keywords for match on args
(Bus::add_signal_receiver): Fix typo s/dbus_inteface/dbus_interface
* python/proxies.py (ProxyObject::connect_to_signal):
propigate keywords for match on args
* Makefile.am: point everything to pyexecdir since python borks
on multilib
2005-08-23 John (J5) Palmieri <johnp@redhat.com>
* Release 0.36
2005-08-23 Colin Walters <walters@verbum.org>
* test/glib/Makefile.am: Don't multiply-define EXTRA_DIST.
2005-08-23 John (J5) Palmieri <johnp@redhat.com>
* 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.
2005-08-18 John (J5) Palmieri <johnp@redhat.com>
* 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
2005-08-17 John (J5) Palmieri <johnp@redhat.com>
* 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
* doc/dbus-tutorial.xml:
- Add Colin Walter to the Authors section for authoring the GLib
- 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
2005-08-17 Ross Burton <ross@burtonini.com>
* glib/dbus-gproxy.c:
(dbus_g_proxy_call_no_reply): unref the message once sent.
(dbus_g_proxy_call): protect against NULL proxy.
2005-08-16 John (J5) Palmieri <johnp@redhat.com>
* 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
(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
* python/service.py: Import signal and method from decorators.py
* python/types.py: Add Variant type
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.
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
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
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
* glib/dbus-gvalue.c (typecode_to_gtype)
(dbus_typecode_maps_to_basic, basic_typecode_to_gtype)
(dbus_gtype_from_signature_iter, dbus_gtype_from_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.
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.
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
2005-08-01 Colin Walters <walters@verbum.org>
Patch from Joe Markus Clarke:
* glib/dbus-gidl.c (property_info_unref, arg_info_unref): Fix
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).
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).
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
2005-07-30 Havoc Pennington <hp@redhat.com>
* fix a bunch of Doxygen warnings and mistakes
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
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
2005-07-29 Havoc Pennington <hp@redhat.com>
* bus/Q_SIGNALS.c (bus_Q_SIGNALS_test): add match_rule_equal() tests
(match_rule_matches): remove unused arg
(test_matching): add tests for match_rule_matches()
* bus/Q_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
2005-07-29 Ross Burton <ross@openedhand.com>
* dbus/dbus-connection.c:
Don't create a DBusCondVar which is never used.
2005-07-27 Ross Burton <ross@openedhand.com>
* dbus/dbus-message.c:
Reduce the size of the maximum cached message to 10K.
2005-07-25 Ross Burton <ross@openedhand.com>
* glib/dbus-gproxy.c:
Remove matches when all proxies are unregistered.
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.
2005-07-20 John (J5) Palmieir <johnp@redhat.com>
* 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>)
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
* 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
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.
2005-07-15 Colin Walters <walters@verbum.org>
* doc/TODO: Add note about convenience wrappers.
2005-07-15 John (J5) Palmieri <johnp@redhat.com>
* NEWS: Update to 0.35
2005-07-15 John (J5) Palmieri <johnp@redhat.com>
* 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
2005-07-15 John (J5) Palmieri <johnp@redhat.com>
* glib/example/Makefile.am: Fix a typo which cause make distcheck
to fail
2005-07-15 John (J5) Palmieri <johnp@redhat.com>
* python/examples/example-service.py,
python/examples/example-signal-emitter.py: Fixed up examples
for API changes
2005-07-15 John (J5) Palmieri <johnp@redhat.com>
* python/__init__.py: Upped to version (0,42,0) because of
the API change
2005-07-15 John (J5) Palmieri <johnp@redhat.com>
* 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)
2005-07-15 John (J5) Palmieri <johnp@redhat.com>
* 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
2005-07-15 Ross Burton <ross@openedhand.com>
* glib/dbus-gproxy.c:
Fix a leak when calling methods via the proxy.
2005-07-15 Colin Walters <walters@verbum.org>
* bus/selinux.c (bus_selinux_append_context): Wrap in
2005-07-14 John (J5) Palmieri <johnp@redhat.com>
* 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
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.
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,
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
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
2005-07-13 John (J5) Palmieri <johnp@redhat.com>
* 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
2005-07-12 Colin Walters <walters@verbum.org>
Patch from Jim Gettys <Jim.Gettys@hp.com>.
* tools/dbus-launch.c: Include sys/select.h.
2005-07-12 John (J5) Palmieri <johnp@redhat.com>
* 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"
2005-07-12 Colin Walters <walters@verbum.org>
* glib/examples/statemachine/Makefile.am (statemachine-server-glue.h)
* glib/examples/Makefile.am (example-service-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.
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
(signature_iter_to_g_type_array): Don't call
(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
* 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.
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_Q_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):
(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.
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.
2005-07-09 Colin Walters <walters@verbum.org>
* glib/dbus-binding-tool-glib.h (DBUS_GLIB_ANNOTATION_CONST):
* glib/dbus-binding-tool-glib.c (generate_glue): Handle Const
* 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
2005-07-08 Colin Walters <walters@verbum.org>
* test/glib/test-service-glib.xml:
* test/glib/test-service-glib.c:
* test/glib/test-dbus-glib.c: Test a{sv}.
* glib/examples/statemachine/statemachine.c:
* glib/examples/statemachine/statemachine-server.c:
* glib/examples/statemachine/statemachine-client.c: Fix some bugs,
add progress bar, etc.
* glib/dbus-gvalue.c (register_array, register_dict): Delete; not
needed anymore due to generic array/map marshalling.
(dbus_g_value_types_init): Don't register basic arrays or the
string/string hash.
(dbus_gtype_from_signature_iter): Don't try to recurse into
(dbus_gtype_to_signature): Check collection/map before type
(demarshal_garray_basic): Renamed to demarshal_collection_array.
(demarshal_ghashtable): Renamed to demarshal_map; fix to use new
generic map creation/append functions instead of hash table
(get_type_demarshaller): Handle maps.
(demarshal_collection): Dispatch on collection type to either
demarshal_collection_ptrarray or demarshal_collection_array.
(get_type_marshaller): Handle maps.
(marshal_collection): Dispatch collection type to either
marshal_collection_ptrarray or marshal_collection_array.
(_dbus_gvalue_test): New test.
* glib/dbus-gvalue-utils.c (unset_and_free_g_value): New function.
(hash_free_from_gtype): Use it to free GValues.
(hashtable_append): New function.
(ptrarray_append): Fix prototype.
(slist_append): Ditto.
(_dbus_gvalue_utils_test): Extend tests.
* glib/dbus-gtype-specialized.c
(dbus_g_type_specialized_init_append): Renamed from
dbus_g_type_specialized_collection_init_append. Remove const from
value, since we steal it.
(dbus_g_type_specialized_map_append): New function.
* glib/dbus-gtype-specialized.h: Update prototypes.
Add DBusGTypeSpecializedMapAppendFunc.
* glib/dbus-gtest.c (dbus_glib_internal_do_not_use_run_tests): Run
* glib/dbus-gtest.h: Prototype it.
2005-07-08 Ross Burton <ross@openedhand.com>
* dbus/dbus-glib.h:
Add DBysGAsyncData for the async bindings.
* glib/dbus-binding-tool-glib.c:
Re-enable the async bindings.
* test/glib/test-dbus-glib.c:
Add a test for the generated async bindings.
2005-07-08 Colin Walters <walters@verbum.org>
* doc/TODO: Update GLib todo bits, also add a post-1.0 TODO for a
connection concept.
2005-07-08 Colin Walters <walters@verbum.org>
* tools/Makefile.am: Kill of print-introspect in favor of using
dbus-send --print-reply=literal.
* test/glib/test-service-glib.xml:
* test/glib/test-service-glib.c (my_object_get_objs): New test
for "ao".
* test/glib/test-dbus-glib.c (echo_received_cb): Free echo data.
(main): Test GetObjs.
* glib/examples/statemachine/Makefile.am:
* glib/examples/statemachine/sm-marshal.list:
* glib/examples/statemachine/statemachine-client.c:
* glib/examples/statemachine/statemachine-server.c:
* glib/examples/statemachine/statemachine-server.xml:
* glib/examples/statemachine/statemachine.c:
* glib/examples/statemachine/statemachine.h:
* glib/examples/statemachine/statemachine.xml:
New example.
* glib/examples/example-service.c (main): Move invocation
of dbus_g_object_type_install_info earlier, to emphasize it
should only be done once.
* glib/examples/example-signal-emitter.c (main): Ditto.
* glib/examples/Makefile.am (SUBDIRS): Include statemachine.
* glib/dbus-gvalue.h (dbus_gtype_to_signature)
(dbus_gvalue_marshal): Update prototypes.
* glib/dbus-gvalue.c: Update all marshalling functions to take
const GValue instead of GValue.
(signature_iter_to_g_type_array): Return a GPtrArray for nonfixed
(dbus_gvalue_to_signature): Update for dbus_gtype_to_signature
(dbus_gtype_to_signature): Handle generic collecitons and maps.
Return a newly-allocated string.
(demarshal_proxy, demarshal_object_path, demarshal_object)
(demarshal_strv, demarshal_ghashtable): Set error, don't assert if
we get the wrong types from message.
(get_type_demarshaller): New function, extracted from
(demarshal_collection): New function, demarshals generic
(dbus_gvalue_demarshal): Just invoke result of
get_type_demarshaller. Throw error if we don't have one.
(marshal_garray_basic): Abort on OOM.
(get_type_marshaller): New function, extracted from
(collection_marshal_iterator, marshal_collection): New functions;
implements generic marshalling for an iteratable specialized
(dbus_gvalue_marshal): Just invoke result of get_type_marshaller.
* glib/dbus-gvalue-utils.c (gvalue_from_ptrarray_value): Handle
(ptrarray_value_from_gvalue): Ditto.
(ptrarray_append, ptrarray_free): New functions.
(slist_constructor, slist_iterator, slist_copy_elt, slist_copy)
(slist_append, slist_end_append, slist_free): New functions.
(dbus_g_type_specialized_builtins_init): Add append fuctions
for GPtrArray and GSList. Register GSList.
(test_specialized_hash, _dbus_gvalue_utils_test): New functions.
* glib/dbus-gtype-specialized.h (DBusGTypeSpecializedAppendContext):
(dbus_g_type_specialized_collection_end_append): Prototype.
(DBusGTypeSpecializedCollectionVtable): Add append_func and
* glib/dbus-gtype-specialized.c (dbus_g_type_specialized_collection_init_append)
(dbus_g_type_specialized_collection_end_append): New functions.
(dbus_g_type_map_value_iterate): Take const GValue.
(dbus_g_type_collection_value_iterate): Ditto.
* glib/dbus-gtest.c (dbus_glib_internal_do_not_use_run_tests): Run
* glib/dbus-gtest.h: Prototype it.
* glib/dbus-gproxy.c (dbus_g_proxy_manager_filter): Avoid
using uninitialized owner_list.
(dbus_g_proxy_begin_call_internal): Move return_if_fail to
public API.
(dbus_g_proxy_end_call_internal): Update to use error set
from dbus_gvalue_demarshal instead of setting it here.
(dbus_g_proxy_begin_call): Move return_if_fail here.
* glib/dbus-gobject.c (write_interface): Update for
dbus_gtype_to_signature returning new string.
* configure.in: Add glib/examples/statemachine.
2005-07-08 Joe Shaw <joeshaw@novell.com>
* configure.in: Add a configure option, --with-console-auth-dir
* dbus/dbus-sysdeps-util.c (_dbus_user_at_console): Use the
new setting. Patch from Kay Sievers.
2005-07-06 Colin Walters <walters@verbum.org>
* dbus/dbus-glib.h (DBusGPendingCall, DBusGPendingCallNotify)
(DBUS_TYPE_G_PENDING_CALL, dbus_g_pending_call_get_g_type)
(dbus_g_pending_call_ref, dbus_g_pending_call_unref): Delete.
(dbus_g_pending_call_set_notify, dbus_g_pending_call_cancel):
Delete in favor of dbus_g_proxy_begin_call and
(DBusGProxyCall, DBusGProxyCallNotify): New.
(dbus_g_proxy_begin_call): Change prototype to take callback, user
data, and destroy function. This replaces
(dbus_g_proxy_cancel_call): Prototype.
(DBusGAsyncData): Delete, shouldn't be needed anymore.
* glib/dbus-gproxy.c (struct _DBusGProxy): Add call_id_counter and
pending_calls map.
(struct _DBusGProxyManager): Add bus_proxy member, which is an
internal proxy for calls to the bus. Remove
pending_nameowner_calls, now the internal proxy keeps track.
(dbus_g_proxy_manager_unref): Unref bus proxy, remove reference to
(got_name_owner_cb): Update prototype, and use
(got_name_owner_cb): Remove reference to pending_nameowner_calls.
(dbus_g_proxy_manager_register): Delete directly libdbus code in
favor of using internal proxy.
(dbus_g_proxy_manager_unregister): Update to use
dbus_g_proxy_cancel_call for any pending GetNameOwner call.
(dbus_g_proxy_init): Initialize pending calls map.
(dbus_g_proxy_constructor): New.
(dbus_g_proxy_class_init): Add get/set property functions,
constructor, and add NAME, PATH, and INTERFACE properties.
(cancel_pending_call): New function.
(dbus_g_proxy_dispose): Iterate over any outstanding calls and
cancel them.
(dbus_g_proxy_set_property, dbus_g_proxy_get_property): New.
(GPendingNotifyClosure): New structure.
(d_pending_call_notify, d_pending_call_free): Moved here from
(DBUS_G_VALUE_ARRAY_COLLECT_ALL): Moved around to satisfy function
(manager_begin_bus_call): New internal function for talking to
internal bus proxy.
(dbus_g_proxy_new): Construct object using GObjet properties.
(dbus_g_proxy_begin_call_internal): Update to take user data, etc.
Create closure of same, and insert call into map of pending calls.
(dbus_g_proxy_end_call_internal): Take call id instead of pending
call. Look up pending call in current set. Remove it when we've
(dbus_g_pending_call_end, dbus_g_proxy_end_call_internal): Delete.
(dbus_g_proxy_begin_call): Change API to take callback, user data,
and destroy function directly.
(dbus_g_proxy_end_call): Update to take DBusGProxyCall.
(dbus_g_proxy_call): Invoke with NULL callback.
(dbus_g_proxy_cancel_call): New function, replaces
* glib/dbus-gparser.c (validate_signature): Fix call to
* glib/dbus-gobject.c (dbus_g_object_type_dbus_metadata_quark):
New quark for attaching metadata to GType.
(info_hash): Delete.
(lookup_object_info): Look up using quark.
(dbus_g_object_type_install_info): Check that a type is classed,
not that it's an object. Also just install type data using quark
instead of using global hash.
* glib/dbus-glib.c (dbus_g_pending_call_ref)
(dbus_g_pending_call_unref, dbus_pending_call_get_g_type)
(GPendingNotifyClosure): Delete.
(d_pending_call_notify, d_pending_call_free): Move to dbus-gproxy.c.
(dbus_g_pending_call_set_notify, dbus_g_pending_call_cancel): Delete.
* glib/dbus-binding-tool-glib.c (generate_client_glue): Disable async
client method generation until we can fix it...
* tools/dbus-viewer.c (load_child_nodes): Use dbus_g_proxy_call.
(load_from_service_thread_func): Ditto.
* tools/dbus-names-model.c (struct NamesModel): Hold
(have_names_notify): Update prototype, use
(names_model_reload): Update for new dbus_g_proxy_begin_call API.
* tools/dbus-monitor.c (filter_func): Update for print_message
API change.
* test/glib/test-dbus-glib.c: Add more tests for async
invocations. Update many begin_call/end_call pairs to just use
* tools/dbus-send.c (main): Add --print-reply=literal mode. This
allows us to dump print-introspect.c.
* tools/dbus-print-message.h (print_message): Add literal argument
to print_message which is intended to allow printing arguments without
metadata like "string=".
* tools/dbus-print-message.c (print_iter): Add literal argument.
(print_message): Allow printing string messages literally.
2005-07-05 Colin Walters <walters@verbum.org>
* glib/dbus-gproxy.c (marshal_dbus_message_to_g_marshaller):
Remove value refcount leak, original patch from Jorn Baayen
<jorn@openedhand.com>. Also remove useless extra value in favor
of prepending to value array directly.
2005-07-02 Colin Walters <walters@verbum.org>
* glib/dbus-gmain.c (_dbus_gmain_test): Fix test.
2005-07-01 Colin Walters <walters@verbum.org>
Patch from Jonathan Matthew <jonathan@kaolin.hn.org>
* glib/dbus-gvalue.c (basic_typecode_to_gtype): Fix return type.
(dbus_g_value_types_init): Marshal G_TYPE_CHAR as DBUS_TYPE_BYTE,
2005-06-30 Colin Walters <walters@verbum.org>
* test/glib/test-dbus-glib.c:
* test/glib/test-service-glib.c:
* test/glib/test-service-glib.xml: Update tests for new error
setting bits, also add async tests (patch from Ross Burton).
* test/glib/Makefile.am (test_service_glib_LDADD): Add
* glib/dbus-gproxy.c (get_name_owner)
(dbus_g_pending_call_end_valist): Ditto.
* glib/dbus-gobject.c (error_metadata): New mapping from GError
domain (GQuark) to DBusGErrorInfo.
(gerror_domaincode_to_dbus_error_name): Attempt to look up error
quark in error_metadata. Take message interface as default
error message interface.
(gerror_to_dbus_error_message): Pass message interface.
(dbus_set_g_error): Resurrected.
(dbus_g_error_info_free): New function.
(dbus_g_object_type_install_info): Use g_type_class_ref instead
of _peek to actually create the object class if it hasn't been
created yet.
(dbus_g_error_domain_register): New function.
* glib/dbus-gmain.c (dbus_g_bus_get): Switch to dbus_set_g_error.
* glib/dbus-gparser.c (validate_signature): Ditto.
* dbus/dbus-glib.h (dbus_g_error_set): Delete.
(dbus_g_error_domain_register): Prototype.
* glib/dbus-glib.c (dbus_g_error_set): Delete.
Update tests.
2005-06-29 Colin Walters <walters@verbum.org>
* dbus/dbus-glib.h: Delete DBUS_TYPE_G_PROXY_ARRAY. Add
* glib/dbus-gvalue.c (dbus_g_value_types_init): Remove marshallers
for G_TYPE_OBJECT and DBUS_TYPE_G_PROXY_ARRAY (the latter should
be handled more generically). Add DBUS_TYPE_G_OBJECT_PATH.
(dbus_g_object_path_get_g_type): New function.
(dbus_gtype_from_signature_iter): Map DBUS_TYPE_OBJECT_PATH
to DBUS_TYPE_G_OBJECT_PATH by default.
(demarshal_proxy): Remove unused name variable.
(demarshal_object_path, marshal_object_path): New functions.
(demarshal_proxy_array, marshal_proxy_array): Delete.
* glib/dbus-binding-tool-glib.c (dbus_g_type_get_c_name): Map
(dbus_g_type_get_lookup_function): Map builtin
* test/glib/test-dbus-glib.c
* test/glib/test-service-glib.c (my_object_objpath):
Adapt tests to new object path marshalling.
2005-06-29 John (J5) Palmieri <johnp@redhat.com>
* configure.in: force check for Python >= 2.4
2005-06-29 Colin Walters <walters@verbum.org>
Patch from Ross Burton <ross@openedhand.com>
* glib/dbus-gobject.c (invoke_object_method): Unset object
value in all cases, not only in async case.
2005-06-29 Colin Walters <walters@verbum.org>
* glib/dbus-gproxy.c (struct _DBusGProxy): Add new member
name_call for keeping track of any outgoing GetNameOwner call.
Also add for_owner and associated.
(struct _DBusGProxyManager): Add owner_names, which is hash table
that maps a base name to a list of names it owns (that we're
interested in). Add pending_nameowner_calls which is a list of
all outstanding GetNameOwner; avoids us having to iterate over
every proxy. Add unassociated_proxies which keeps track of name
proxies with no associated name owner.
(dbus_g_proxy_manager_unref): Destroy owner_names.
(struct DBusGProxyNameOwnerInfo): New struct for keeping track of
name refcounts.
(find_name_in_info, name_owner_foreach)
(dbus_g_proxy_manager_lookup_name_owner, insert_nameinfo)
(unassociate_proxies, dbus_g_proxy_manager_replace_name_owner):
New functions; they manipulate the owner_names mapping.
(got_name_owner_cb): New function.
(get_name_owner): New function, extracted from
(dbus_g_proxy_manager_register): For now we need to keep track of
all NameOwnerChanged. Also if the proxy is for a name, if we
don't already know the name owner, queue a new GetNameOwner
request and add it to our list of unassociated proxies. Otherwise
inc the refcount.
(dbus_g_proxy_manager_unregister): If this proxy is for a name,
cancel any pending GetNameOwner call, etc.
(dbus_g_proxy_manager_filter): Handle NameOwnerChanged. Also use
the owner_names mapping to look up the current names for the
signal source, and dispatch to any proxies for that name.
(dbus_g_proxy_new): Initialize new members.
(dbus_g_proxy_new_for_name): Delete unused proxy variable.
(dbus_g_proxy_new_for_name_owner): Use get_name_owner.
(dbus_g_pending_call_end_valist): New function, extracted from
dbus_g_proxy_end_call_internal. Useful when we don't have a proxy
but want to use the GLib infrastructure. Also note how many
arguments in reply were over.
(dbus_g_pending_call_end): New function, just call
(dbus_g_proxy_end_call_internal): Just call
* glib/dbus-gobject.c (_dbus_gobject_lookup_marshaller): Fix lookup
of builtin marshaller for STRING_STRING_STRING.
* test/glib/test-dbus-glib.c:
* test/glib/test-service-glib.c:
* test/glib/test-service-glib.xml:
Extend tests to cover name proxies, destruction of owner proxies,
* glib/examples/example-signal-recipient.c
(dbus_g_proxy_new_for_name_owner): Create a name proxy.
* tools/dbus-send.c (main): Print D-BUS error name in addition
to message.
2005-06-28 John (J5) Palmieri <johnp@redhat.com>
* python/dbus_bindings.pyx.in (cunregister_function_handler,
cmessage_function_handler): Patch from
Anthony Baxter <anthony@interlink.com.au> fixes threading problems
by using the Py_GILState_Ensure/Release to synchronize with the
python runtime.
2005-06-28 Ray Strode <rstrode@redhat.com>
* dbus/dbus-spawn.c (_dbus_babysitter_unref): kill
babysitter helper process on last unref, bug #2813.
2005-06-27 Colin Walters <walters@verbum.org>
* test/glib/test-dbus-glib.c:
* test/glib/test-service-glib.c:
* test/glib/test-service-glib.xml:
Test hash table signal emitting.
* glib/dbus-gobject.c (_dbus_gobject_lookup_marshaller): Convert
types to their fundamental basis types, since this is what
marshallers operate on. Also add an entry for VOID__BOXED.
(dbus_g_object_register_marshaller_array): Convert to fundamental.
2005-06-26 Havoc Pennington <hp@redhat.com>
* doc/dbus-tutorial.xml: fix names of interface/service/path, fix
from Don Park
2005-06-26 Colin Walters <walters@verbum.org>
* glib/dbus-glib.c (dbus_set_g_error): Delete.
(dbus_g_error_set): New public function from its ashes; used by
both service-side method implementation and GLib bindings
(dbus_g_error_has_name, dbus_g_error_get_name): New function.
(_dbus_glib_test): Add some tests.
* test/glib/test-dbus-glib.c (main): Test dbus_g_error_has_name.
* test/glib/test-service-glib.c (my_object_throw_error): Use
* glib/dbus-gobject.c (gerror_to_dbus_error_message): Handle
errors thrown by dbus_g_error_set.
* glib/dbus-gmain.c (dbus_g_bus_get): Change to dbus_g_error_set.
* glib/dbus-gparser.c (validate_signature): Ditto.
* glib/dbus-gproxy.c (dbus_g_proxy_new_for_name_owner)
(dbus_g_proxy_end_call_internal): Ditto.
* glib/Makefile.am: Generate dbus-glib-error-switch.h, which
converts DBUS_ERROR_x to DBUS_GERROR_x.
(libdbus_glib_1_la_SOURCES, BUILT_SOURCES, CLEANFILES): Add it.
* doc/TODO: Remove error TODO.
* doc/dbus-tutorial.xml: Update with documentation about error
* dbus/make-dbus-glib-error-enum.sh: Tighten up regexp to make
sure we only change DBUS_ERROR to DBUS_GERROR, not all ERROR to
2005-06-22 Colin Walters <walters@verbum.org>
Patch from Ross Burton <ross@openedhand.com>
* glib/dbus-gobject.c (dbus_g_method_return): Free out_sig.
2005-06-20 Colin Walters <walters@verbum.org>
* configure.in: Add glib/examples.
* glib/Makefile.am: Add examples/
* glib/examples/.cvsignore
* glib/examples/Makefile.am
* glib/examples/example-client.c
* glib/examples/example-service.c
* glib/examples/example-service.xml
* glib/examples/example-signal-emitter.c
* glib/examples/example-signal-emitter.xml
* glib/examples/example-signal-recipient.c:
New files; GLib binding examples, ported from
2005-06-20 Colin Walters <walters@verbum.org>
* dbus/dbus-glib.h:
* glib/dbus-gproxy.c: Rename dbus_g_proxy_invoke to
* glib/dbus-binding-tool-glib.c:
* doc/dbus-tutorial.xml:
* test/glib/test-dbus-glib.c: Update for rename.
2005-06-20 Colin Walters <walters@verbum.org>
Patch suggested by Ross Burton <ross@openedhand.com>
* glib/dbus-gobject.c (export_Q_SIGNALS): Free signal name.
(g_value_init): Use G_VALUE_NOCOPY_CONTENTS to plug
memory leak. Add a bit of documentation.
(dbus_g_method_return_error): Free context, and note we do
2005-06-18 Murray Cumming <murrayc@murrayc.com>
* dbus/dbus-glib.h:
* glib/dbus-gobject.c:
* glib/dbus-gproxy.c:
* glib/dbus-gvalue.c: Predeclare structs as
typedef struct _Something Something instead of
typedef struct Something Something, so we can
redeclare the prototypes. Other GNOME libraries
do this already.
2005-06-17 Colin Walters <walters@verbum.org>
* tools/dbus-names-model.c (have_names_notify): Fix call
to dbus_g_proxy_end_call.
2005-06-17 Colin Walters <walters@verbum.org>
* glib/dbus-gproxy.c (dbus_g_proxy_emit_remote_signal): Don't
spew warnings if we get malformed remote Q_SIGNALS.
* glib/dbus-gobject.c (propsig_iterate): New function.
(lookup_object_info): New function, extracted from
(introspect_properties, introspect_Q_SIGNALS): Delete; these
are merged into write_interface.
(write_interface): Write out Q_SIGNALS and properties here;
dump the org.gtk.object stuff and use the interface given
in the introspection data blob. Also fix up property XML.
(lookup_values): New function.
(introspect_interfaces): Gather a mapping from interface to a
list of its methods, Q_SIGNALS, and properties, then write out
each interface.
(lookup_object_and_method): Use lookup_object_info.
(struct DBusGSignalClosure): Add interface.
(dbus_g_signal_closure_new): Add interface. Don't dup signame;
we can just use the constant data.
(dbus_g_signal_closure_finalize): Don't free signal name.
(signal_emitter_marshaller): Use interface from signal closure.
(export_Q_SIGNALS): Only export Q_SIGNALS mentioned in introspection
(dbus_g_connection_register_g_object): Warn if we have no
introspection data for an object.
(funcsig_equal): Remove unused variable.
(dbus_g_object_register_marshaller): Take varargs instead of
(dbus_g_object_register_marshaller_array): New function,
extracted from old dbus_g_object_register_marshaller.
* glib/dbus-binding-tool-glib.c (struct DBusBindingToolCData): Add
Q_SIGNALS and property data.
(write_quoted_string): New function, extracted from generate_glue.
(generate_glue): Write Q_SIGNALS and properties to introspection
* dbus/dbus-glib.h (struct DBusGObjectInfo): Include
exported_Q_SIGNALS and exported_properties.
(dbus_g_object_register_marshaller): Update prototype.
(dbus_g_object_register_marshaller_array): Prototype.
* test/glib/test-dbus-glib.c: Extend testing to cover new Q_SIGNALS.
* test/glib/test-service-glib.c: Add new test Q_SIGNALS and method
to emit them.
* test/glib/test-service-glib.xml: Add some test Q_SIGNALS.
* test/glib/Makefile.am (BUILT_SOURCES): Add my-object-marshal.c
and my-object-marshal.h
(test_service_glib_SOURCES, test_dbus_glib_SOURCES): Add
(my-object-marshal.c, my-object-marshal.h): Implement.
* test/glib/.cvsignore: Update.
* doc/TODO: Remove two GLib TODO items fixed by this
2005-06-16 Colin Walters <walters@verbum.org>
* doc/TODO: Update for GLib bindings.
2005-06-16 Colin Walters <walters@verbum.org>
* glib/dbus-binding-tool-glib.c:
* glib/dbus-gobject.c:
* glib/dbus-gproxy.c: Add Nokia copyright; Patch
from Ross Burton, for his GLib bindings work.
2005-06-16 Colin Walters <walters@verbum.org>
* glib/dbus-gobject.c (funcsig_hash, funcsig_equal): Use n_params
to iterate instead of walking to G_TYPE_INVALID.
Patch based on a patch from Ryan Gammon.
2005-06-16 Colin Walters <walters@verbum.org>
* bus/bus.c (bus_context_new): Set parser to NULL
after we unref it (Patch from Chris Boscolo, #2174).
2005-06-16 Colin Walters <walters@verbum.org>
* python/dbus_bindings.pyx.in: Import size_t,
__int64_t, __uint64_t, and __signed.
* dbus/dbus-sysdeps.c <HAVE_CMSGCRED> (write_credentials_byte):
Define cmsg struct, output it.
Use cmsg struct.
Patch from Joe Markus Clarke for FreeBSD support.
2005-06-16 Colin Walters <walters@verbum.org>
* tools/dbus-send.c (append_array): Use strtok.
(append_dict): New function.
(type_from_name): New function, extracted from main.
(main): Handle sending dicts.
* tools/dbus-print-message.c (print_iter): Print dict
2005-06-16 Colin Walters <walters@verbum.org>
* glib/dbus-gvalue.c (marshal_basic): Marshal NULL string
values as the empty string (#2948).
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 Colin Walters <walters@verbum.org>
* dbus/dbus-marshal-header.c (_dbus_header_load): Set
header byte order from expected byte order (Patch from Chris Wilson, #3475).
* dbus/dbus-marshal-byteswap.c (byteswap_body_helper):
Increment pointer after swapping fixed array. Add assertion
for array length.
2005-06-15 Colin Walters <walters@verbum.org>
* dbus/dbus-sysdeps.c <HAVE_CMSGCRED> (_dbus_read_credentials_unix_socket):
Fix call to dbus_set_error. (Patch from Michael Banck, #3461)
2005-06-15 John (J5) Palmieri <johnp@redhat.com>
* NEWS: Update to 0.34
2005-06-15 David Zeuthen <davidz@redhat.com>
* configure.in (LT_CURRENT): Revert back to 1 as the library
hasn't changed and we've certainly not committed to protocol
stability yet. All this does is to break ABI. See commit note
from hp@redhat.com 2005-05-05 for details.
2005-06-15 John (J5) Palmieri <johnp@redhat.com>
* dbus/dbus-connection.c (_dbus_connection_peer_filter): New method
(_dbus_connection_run_builtin_filters): New method
(dbus_connection_dispatch): Run the builtin filters which in turn
runs the peer filter which handles Ping messages.
* doc/TODO:
- Ping isn't handled: This patch fixes it
- Add a test case for the Ping message: added TODO item
2005-06-15 John (J5) Palmieri <johnp@redhat.com>
* dbus/dbus-message.c:
(dbus_message_has_path): New method
(dbus_message_has_interface): New method
(dbus_message_has_member): New method
* dbus/dbus/dbus-sysdeps.c (_dbus_check_dir_is_private_to_user):
New method
* dbus/dbus-keyring.c (_dbus_keyring_reload): Check to see that
the keyring directory is private to the user
* doc/TODO:
- The convenience functions in dbus-bus.h should perhaps have
the signatures that they would have if they were autogenerated
stubs. e.g. the acquire service function. We should also evaluate
which of these functions to include, in light of the fact that
GLib/Qt native stubs will probably also exist.: Punted
- add dbus_message_has_path(), maybe has_member/interface:
fixed in this patch
- in dbus-keyring.c, enforce that the keyring dir is not
world readable/writable: Fixed in this patch
2005-06-15 John (J5) Palmieri <johnp@redhat.com>
* dbus/dbus-marshal-validate.h: Added a new validation
out of memory errors when validating signitures
* dbus/dbus-marshal-header.c: use DBUS_VALIDITY_UNKNOWN_OOM_ERROR
in places where we previously used DBUS_VALID and a FALSE return
value to indicate OOM
* dbus/dbus-marshal-validate.c (_dbus_validate_signature_with_reason):
Use a stack to track the number of elements inside containers. The
stack values are then used to validate that dict entries have only two
elements within them.
(validate_body_helper): check the reason for failure when validating
* dbus/dbus-message.c (load_message): use
DBUS_VALIDITY_UNKNOWN_OOM_ERROR in places where we previously used
DBUS_VALID and a FALSE return value to indicate OOM
* doc/TODO: remove "- validate dict entry number of fields" as this
patch fixes it
2005-06-14 David Zeuthen <davidz@redhat.com>
* bus/bus.c (process_config_every_time): Drop existing conf-dir
watches (if applicable) and add new watches
* bus/main.c (signal_handler): Handle SIGIO if using D_NOTIFY
(main): Setup SIGIO signal handler if using D_NOTIFY
* bus/config-parser.h: Add prototype bus_config_parser_get_conf_dirs
* bus/config-parser.c (struct BusConfigParser): Add conf_dirs list
(merge_included): Also merge conf_dirs list
(bus_config_parser_unref): Clear conf_dirs list
(include_dir): Add directory to conf_dirs list
(bus_config_parser_get_conf_dirs): New function
* bus/dir-watch.[ch]: New files
* bus/Makefile.am (BUS_SOURCES): Add dir-watch.[ch]
* configure.in: Add checks for D_NOTIFY on Linux
2005-06-14 Colin Walters <walters@verbum.org>
* glib/dbus-binding-tool-glib.c:
* glib/dbus-gobject.c:
* glib/dbus-gvalue.c: Fix indentation and brace style.
2005-06-14 Ross Burton <ross@openedhand.com>.
* glib/dbus-glib.h: Make DBusGMethodInvocation
a private structure. Rearrange prototypes a bit.
* glib/dbus-gproxy.c (dbus_g_proxy_invoke): Add
documentation for first_arg_type.
* glib/dbus-gobject.c: Move DBusGMethodInvocation
here, add documentation. Move dbus_g_method_return
and dbus_g_method_return_error into public API
2005-06-14 Colin Walters <walters@verbum.org>
* glib/dbus-gobject.c (_dbus_gobject_lookup_marshaller):
Add missing return statements, noticed by Ross Burton.
2005-06-13 Ross Burton <ross@openedhand.com>.
* glib/dbus-gobject.c: Handle errors on message
demarshalling by sending error message back.
* glib/dbus-gvalue.c: Initialize return variables.
2005-06-13 Colin Walters <walters@verbum.org>
* glib/Makefile.am: Fix thinko in last patch.
2005-06-13 Colin Walters <walters@verbum.org>
* glib/Makefile.am: Move dbus-gtype-specialized.c
and dbus-gtype-specialized.h into a _HEADERS variable,
install them.
2005-06-12 Colin Walters <walters@verbum.org>
Async Q_SIGNALS and various bugfixes and testing by
Ross Burton <ross@openedhand.com>.
* glib/dbus-gvalue.h: (struct DBusBasicGValue): Delete.
(dbus_gvalue_ctype_from_type): Moved to dbus-binding-tool-glib.c.
(dbus_gtype_to_dbus_type): Renamed to dbus_gtype_from_signature.
(dbus_g_value_types_init, dbus_gtype_from_signature)
(dbus_gtype_from_signature_iter, dbus_gtype_to_signature)
(dbus_gtypes_from_arg_signature): New function prototypes.
(dbus_gvalue_demarshal): Take context and error arguments.
(dbus_gvalue_demarshal_variant): New function.
(dbus_gvalue_demarshal_message): New function.
(dbus_gvalue_store): Delete.
* glib/dbus-gvalue.c:
File has been almost entirely rewritten; now we special-case
more types such as DBUS_TYPE_SIGNATURE, handle arrays and
hash tables correctly, etc. Full support for recursive values
is not yet complete.
* glib/dbus-gproxy.c (dbus_g_proxy_class_init): Change last
argument of signal to G_TYPE_POINTER since we now pass a
(lookup_g_marshaller): Delete in favor of
(marshal_dbus_message_to_g_marshaller): Use
_dbus_gobject_lookup_marshaller and dbus_gvalue_demarshal_message
to handle remote signal callbacks.
(dbus_g_proxy_new_from_proxy): New function; creates a new
DBusGProxy by copying an existing one.
(dbus_g_proxy_get_interface, dbus_g_proxy_set_interface)
(dbus_g_proxy_get_path): New functions.
(dbus_g_proxy_marshal_args_to_message): New function;
factored out of existing code.
(DBUS_G_VALUE_ARRAY_COLLECT_ALL): Collect all arguments
from a varargs array.
(dbus_g_proxy_begin_call_internal): New function.
(dbus_g_proxy_end_call_internal): New function.
(dbus_g_proxy_begin_call): Take GTypes instead of DBus types
as arguments; simply invoke dbus_g_proxy_begin_call_internal
after collecting args into value array.
(dbus_g_proxy_end_call): Take GTypes instead of DBus types;
invoke dbus_g_proxy_end_call_internal.
(dbus_g_proxy_invoke): Simply invoke begin_call_interanl and
(dbus_g_proxy_call_no_reply): Take GTypes instead of DBus
(array_free_all): New function.
(dbus_g_proxy_add_signal): Take GTypes.
* glib/dbus-gobject.h:
(_dbus_glib_marshal_dbus_message_to_gvalue_array): Delete.
(_dbus_gobject_get_path, _dbus_gobject_lookup_marshaller):
* glib/dbus-gobject.c: Add a global marshal_table hash which
stores mappings from type signatures to marshallers. Change lots
of invocations of dbus_gtype_to_dbus_type to
(_dbus_glib_marshal_dbus_message_to_gvalue_array): Delete.
(introspect_Q_SIGNALS): Fix test for query.return_type.
(set_object_property): Update invocation of dbus_gvalue_demarshal.
(invoke_object_method): Many changes. Handle asynchronous
invocations. Convert arguments with
dbus_gvalue_demarshal_message. Handle errors. Use
DBusSignatureIter instead of strlen on args. Handle all arguments
generically. Special-case variants.
(dbus_g_method_return, dbus_g_method_return_error): New function.
(DBusGSignalClosure): New structure, closes over signal
(dbus_g_signal_closure_new): New function.
(dbus_g_signal_closure_finalize): New function.
(signal_emitter_marshaller): New function; is special marshaller
which emits Q_SIGNALS on bus.
(export_Q_SIGNALS): New function; introspects object Q_SIGNALS and
connects to them.
(dbus_g_object_type_install_info): Take GType instead of
(dbus_g_connection_register_g_object): Invoke export_Q_SIGNALS.
(dbus_g_connection_lookup_g_object): New function.
(DBusGFuncSignature) New structure; used for mapping type
signatures to marshallers.
(funcsig_hash): New function; hashes DBusGFuncSignature.
(funcsig_equal): New function; compares DBusGFuncSignature.
(_dbus_gobject_lookup_marshaller): New function.
(dbus_g_object_register_marshaller): New function; used to
register a marshaller at runtime for a particular signature.
* glib/dbus-gmain.c (_dbus_gmain_test): Add various tests.
* glib/dbus-binding-tool-glib.h: Add DBUS_GLIB_ANNOTATION_ASYNC
which notes a server method implementation should be
* glib/dbus-binding-tool-glib.c
(dbus_binding_tool_output_glib_server): Call
(write_formal_parameters): Use dbus_gtype_from_signature. Handle
variants specially.
(dbus_g_type_get_lookup_function): Turn GType into an invocation
of a lookup function.
(write_args_for_direction): Use dbus_g_type_get_lookup_function.
(write_untyped_out_args): New method; write output arguments.
(write_formal_declarations_for_direction): Function for
writing prototypes.
(write_formal_parameters_for_direction): Function for
writing implementations.
(write_typed_args_for_direction): Function for writing
arguments prefixed with GTypes.
(write_async_method_client): Write out async version
of method.
* glib/dbus-binding-tool-glib.c: Include dbus-gvalue-utils.h.
(dbus_g_type_get_marshal_name): Move mapping from GType
to marshal name into here.
(dbus_g_type_get_c_name): Move into here.
(compute_marshaller): Convert signature to type with
dbus_gtype_from_signature, use dbus_g_type_get_marshal_name.
(compute_marshaller_name): Ditto.
(compute_marshaller): Handle async signal annotations.
(gather_marshallers): Return if we don't have a known
(generate_glue): Collect introspection blob here, and
write all of the blob at the end. This allows an object
with multiple interfaces to work.
Mark async methods in introspection blob.
* glib/Makefile.am (libdbus_glib_1_la_SOURCES): Add
dbus-gtype-specialized.c, dbus-gtype-specialized.h,
dbus-gvalue-utils.h, dbus-gvalue-utils.c.
* dbus/dbus-glib.h: Don't include dbus-protocol.h; this
avoids people accidentally using DBUS_TYPE_* which should
not be necessary anymore.
Do include dbus-gtype-specialized.h, which are utilities
for GLib container types.
Add various #defines for types such as
(DBusGValueIterator, DBusGValue): Define, not fully used
(dbus_g_value_get_g_type): Type for recursive 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): Prototypes.
(dbus_g_object_register_marshaller, dbus_g_proxy_new_from_proxy): Prototype.
(dbus_g_proxy_set_interface): Prototype.
(dbus_g_proxy_begin_call, dbus_g_proxy_end_call)
(dbus_g_proxy_call_no_reply): Take GLib types instead of DBus
(dbus_g_proxy_get_path, dbus_g_proxy_get_interface):
(DBusGAsyncData, DBusGMethodInvocation): Structures for
doing async invocations.
(dbus_g_method_return, dbus_g_method_return_error):
* doc/dbus-tutorial.xml: Update GLib section.
* tools/dbus-viewer.c (load_child_nodes): Update
for new invocation type of dbus_g_proxy_end_call.
(load_from_service_thread_func): Ditto.
* tools/print-introspect.c (main): Ditto.
* tools/dbus-names-model.c (have_names_notify)
(names_model_reload, names_model_set_connection)
Use GTypes.
* python/Makefile.am (INCLUDES): Define DBUS_COMPILATION,
needed since Python bindings use GLib bindings.
* test/glib/Makefile.am (INCLUDES): Define DBUS_COMPILATION.
Add --prefix argument.
* tools/Makefile.am: Define DBUS_COMPILATION. Remove
unneeded --ignore-unsupported arg.
* test/glib/test-service-glib.c:
* test/glib/test-service-glib.xml:
* test/glib/test-dbus-glib.c: Add many more tests.
2005-06-06 David Zeuthen <davidz@redhat.com>
* doc/TODO: Add item about need to remove deprecated functions.
* dbus/dbus-connection.h: Add prototype for dbus_connection_disconnect
* dbus/dbus-connection.c (dbus_connection_disconnect): New function
to repair the ABI which was broken with the last commit.
2005-06-02 John (J5) Palmieri <johnp@redhat.com>
* dbus/dbus-connection.c, dbus/dbus-connection.h
(dbus_connection_disconnect): renamed to dbus_connection_close
for API symmetry with dbus_connection_open
* dbus/dbus-bus.c (dbus_bus_get):
* bus/connection.c (bus_connections_unref,
bus_connections_setup_connection, bus_connections_expire_incomplete):
* bus/dispatch.c (bus_dispatch, kill_client_connection,
kill_client_connection_unchecked, check_hello_connection):
* bus/bus.c (new_connection_callback):
* tools/dbus-send.c (main):
* test/glib/test-profile.c (no_bus_thread_func, with_bus_thread_func):
* test/test-service.c (path_message_func, filter_func):
* doc/TODO: remove connection_open/connection_disconnect lacks symmetry item that was just fixed
2005-05-25 Colin Walters <walters@verbum.org>
* dbus/dbus-protocol.h: Move various bus service #defines such
* dbus/dbus-shared.h: Various defines moved here.
* dbus/dbus-marshal-header.c: Include dbus-shared.h.
2005-05-25 John (J5) Palmieri <johnp@redhat.com>
* python/__init__.py: Python bindings deserve a minor version
update. Upped to (0, 40, 2)
2005-05-24 John (J5) Palmieri <johnp@redhat.com>
* python/decorators.py: add explicitly_pass_message decorator
for passing in the dbus message as keyword for edge case signal
* python/matchrules.py (SignalMatchRule.__repr__): fix output
to conform with what dbus expects for match rules
(SignalMatchRule.execute): add the dbus message as a keyword
if the signal handler has requested it
* python/examples/example/signal-recipient.py: added some more
examples on how to hook up to Q_SIGNALS
2005-05-23 John (J5) Palmieri <johnp@redhat.com>
* python/decorators.py: import dbus_bindings
* python/matchrules.py (SignalMatchRule, SignalMatchTree,
SignalMatchNode): new classes that implement wildcard signal
callback matching using a tree lookup. Heavily modified from a
patch sent by Celso Pinto (fd.o bug #3241)
* _dbus.py (add_signal_receiver, remove_signal_receiver, _signal_func):
use new match classes to handle Q_SIGNALS.
2005-05-19 John (J5) Palmieri <johnp@redhat.com>
* python/dbus_bindings.pyx.in: s/TYPE_PATH/TYPE_OBJECT_PATH
2005-05-18 Havoc Pennington <hp@redhat.com>
* configure.in: use GLIB_GNU_GETTEXT to get INTLLIBS and require
gettext. Not really worth requiring yet perhaps, but any
production quality 1.0 would require it so we should go ahead and
get things set up. We do have a couple token calls to
bindtextdomain in the code already.
2005-05-16 John (J5) Palmieri <johnp@redhat.com>
* glib/dbus-gmain.c (io_handler_dispatch): fix deadlock
when using recursive g_main_loops
* python/_dbus.py (class Bus): add the ProxyObjectClass
alias for ProxyObject to make it easier for the Twisted
networking framework to integrate dbus.
* python/proxies.py (class ProxyObject): add the ProxyMethodClass
alias for ProxyMethod to make it easier for the Twisted
networking framework to integrate dbus.
2005-05-11 Ross Burton <ross@openedhand.com>
* glib/dbus-glib-tool.c: Add --prefix argument.
* glib/dbus-binding-tool-glib.h: Add prefix argument.
* glib/dbus-binding-tool-glib.c (compute_marshaller_name):
Add prefix argument.
(generate_glue): Pass prefix argument down.
(dbus_binding_tool_output_glib_server): Pass prefix to
2005-05-11 Colin Walters <walters@verbum.org>
* tools/dbus-send.c (append_array): New function.
(append_arg): Broken out from main.
(main): Add cheesy hack to send arrays and variants.
(usage): Update.
* tools/dbus-print-message.c (print_iter): Broken out
from main.
2005-05-11 Colin Walters <walters@verbum.org>
* dbus/dbus-signature.c (dbus_signature_iter_get_signature):
New function, returns signature string for signature iter.
* dbus/dbus-signature.h: Prototype it.
* dbus/dbus-message.c (dbus_message_iter_get_signature):
New function, returns signature string for message iter.
(dbus_message_iter_get_array_len): New function, returns
length of array.
(dbus_message_iter_get_fixed_array): Fix assertion; this
function should be used when the iter is pointing to the
contents of an array
* dbus/dbus-message.h: Prototypes.
* dbus/dbus-marshal-recursive.c (_dbus_type_reader_get_array_length):
New function; returns length of an array.
* dbus/dbus-marshal-recursive.h: Prototype it.
2005-05-11 Colin Walters <walters@verbum.org>
* dbus/dbus-sysdeps-util.c <!HAVE_POSIX_GETPWNAM_R>: Fix
compilation error.
2005-05-08 Havoc Pennington <hp@redhat.com>
* dbus/dbus-sysdeps-util.c (_dbus_become_daemon): write the
daemon's pid, not the parent's pid, to the file descriptor.
Reported by Taj Morton.
2005-05-05 Havoc Pennington <hp@redhat.com>
* configure.in (LT_*): add notes on how the libtool versioning
works to save thinking. Increment soname to indicate protocol
breakage (though really the library interface hasn't changed I
* dbus/dbus-transport.c (_dbus_transport_get_is_authenticated):
verify the GUID received from server matches what we were
expecting, if we had an expectation
* dbus/dbus-auth.c (send_ok): send GUID along with the OK command
(_dbus_auth_get_guid_from_server): new function
(send_begin): parse the OK args
* doc/dbus-specification.xml: add GUID to the auth protocol
2005-05-05 John (J5) Palmieri <johnp@redhat.com>
* Fix my name in previous changelog ;)
* python/proxies.py (ProxyObject.__getattr__): add further patch
from Anthony Baxter to throw an AttributeError when python
__special__ functions are called instead of marshling them over
the bus (Bug#1685 comment 3).
2005-05-04 John (J5) Palmieri <johnp@redhat.com>
* python/Makefile.am: changed to use pyexecdir for the binding
shared libraries (Bug#2494)
* python/exceptions.py: bring exceptions over from the bindings
so they can be used in applications (Bug#2036)
Make all exceptions derive from DBusException
* python/_dbus.py, python/proxies.py: implement __repr__ in a couple
of classes so that print obj doesn't throw an exception (Bug #1685)
2005-05-03 Ross Burton <ross@openedhand.com>
* glib/dbus-gobject.c (dbus_g_connection_register_g_object):
Return if we get an error during registration. Set up a
weak reference on object to unregister if object is destroyed.
(unregister_gobject): New function.
2005-05-01 John (J5) Palmieri <johnp@redhat.com>
* python/dbus_bindings.pyx.in:
- added new type classes for hinting to the marashaler what type
to send over the wire
- added int16 and uint16 marshalers
- Fixed a bug in the type constants that caused int32 to go out
as uint16 over the wire
* python/dbus.py: split up into different files and renamed _dbus.py
* python/__init__.py, python/_util.py, python/decorators.py,
python/exceptions.py, python/proxies.py, python/services.py,
python/types.py: new files split off from dbus.py
* python/Makefile.am: Add new files, remove dbus.py and
install all python files to <python module dir>/dbus
* python/examples/*: Added #!/usr/bin/env python to the top of
every example. Patch provided by Tatavarty Kalyan
2005-04-25 John (J5) Palmieri <johnp@redhat.com>
* NEWS: Update to 0.33
2005-04-25 John (J5) Palmieri <johnp@redhat.com>
* python/dbus_bindings.pyx.in (send_with_reply_handlers): New send
method for doing async calls
(_pending_call_notification): New C function for handling pendning call
(set_notify): New method for setting pending call notification
* python/dbus.py: new version tuple "version" is set at (0, 40, 0)
Async capabilities added to remote method calls
(Sender): class removed
(RemoteService): class removed
(ObjectTree): class removed for now
(RemoteObject): Renamed to ProxyObject
(RemoteMethod): Renamed to ProxyMethod
(method): Decorator added for decorating python methods as dbus methods
(signal): Decorator added for decorating python methods as signal emitters
(ObjectType): Metaclass added for generating introspection data and the
method callback vtable
(Interface): Wrapper class added to wrap objects in a dbus interface
(Object): Uses ObjectType as its metaclass and exports Introspect
of the org.freedesktop.DBus.Introspectable interface
(ValidationException, UnknownMethodException): new exceptions
* python/examples/*: Modified to fit with the new bindings
2005-04-23 Havoc Pennington <hp@redhat.com>
* dbus/dbus-message.c (dbus_message_append_args): fix doc comment,
reported by Tony Houghton
* test/test-service.c (main): test
* dbus/dbus-object-tree.c (find_handler): be sure we always init
the exact_match
(_dbus_object_tree_get_user_data_unlocked): new function used by
(do_register): add assertion test for get_user_data_unlocked
(object_tree_test_iteration): more tests
* dbus/dbus-connection.c (dbus_connection_get_object_path_data):
new function from Dan Reed to let you get the user data from
2005-04-23 John (J5) Palmieri <johnp@redhat.com>
* dbus/dbus-marshal-recursive-util.c: Fixed buffer overflow
in numerous places that did not account for the NULL terminator
(signature_from_seed): changed the manual string copy loop to
just use strcpy instead
make check should now pass
2005-04-19 John (J5) Palmieri <johnp@redhat.com>
* dbus/dbus-marshal-header.c (_dbus_header_create): Fix assert
so that it allows messages that are not Q_SIGNALS to pass in
NULL as the interface.
2005-04-18 David Zeuthen <davidz@redhat.com>