summaryrefslogtreecommitdiff
path: root/_dbus_bindings
Commit message (Collapse)AuthorAgeFilesLines
* Relicense Collabora code under the MIT/X11 license proposed for dbus core, ↵Simon McVittie2007-09-2724-354/+427
| | | | removing all references to the LGPL as a result
* _dbus_bindings/mainloop.c: Remove Watch and Timeout.Simon McVittie2007-07-311-357/+0
| | | | | | | They were never used, and didn't make a great deal of sense. I now believe the right direction for pure-Python mainloop support is to define a Pythonic main loop abstraction and coerce libdbus to fit into it, rather than pretending the objects in libdbus' abstraction are Python objects.
* Avoid cpp directives inside macro calls, to be nice to old gcc versionsSimon McVittie2007-07-122-19/+1
|
* Use PyArg_ParseTuple correctly, fixing the timeout in ↵Simon McVittie2007-07-111-2/+2
| | | | | | send_message_with_reply and send_message_with_reply_and_block. (bugs.fd.o #11489; thanks to Marco Pesenti Gritti for report and initial patch)
* _dbus_bindings: add DBUS_INTROSPECT_1_0_XML_DOCTYPE_DECL_NODE etc.Simon McVittie2007-06-211-0/+9
|
* Avoid using deprecated dbus_watch_get_fd()Simon McVittie2007-06-211-1/+7
|
* _dbus_bindings/conn-methods.c: add list_exported_child_objects().Simon McVittie2007-05-291-0/+62
| | | | This is equivalent to dbus_connection_list_registered() in libdbus.
* Implement DBusException in pure Python; add get_dbus_name() method and name= ↵Simon McVittie2007-05-166-53/+67
| | | | keyword argument
* Remove BusImplementation, removing its remaining functionality to Connection.Simon McVittie2007-04-304-95/+76
| | | | | | | | | * Move get_unique_name to Connection (it can be useful for connections which aren't to a real bus daemon but partially emulate one, like Telepathy's Tubes) * Add set_unique_name to Connection (same reason) * Convert BusImplementation.__new__ into Connection._new_for_bus * Have dbus.Bus subclass _dbus_bindings.Connection directly
* Implement o.fd.DBus method wrappers in Python instead of C.Simon McVittie2007-04-301-235/+0
| | | | | This reduces the need to have _dbus_bindings.BusImplementation and makes peer-to-peer connections easier to implement.
* _dbus_bindings/module.c: Add some useful constantsSimon McVittie2007-04-271-0/+17
|
* Remove trailing whitespace in C sourceSimon McVittie2007-04-248-13/+13
|
* Add optional checks for coding style (mainly whitespace at the moment).Simon McVittie2007-04-241-0/+3
| | | | These are on by default for git builds, off by default for releases.
* _dbus_bindings/message.c: untabifySimon McVittie2007-04-241-30/+30
|
* If send_with_reply() returns TRUE but with pending call NULL, cope gracefully.Simon McVittie2007-02-211-0/+7
| | | | | | This is a workaround for the fact that trying to use the object path /org/freedesktop/DBus/Local in a message header (e.g. when introspecting trackerd with dbus-inspector) causes us to be disconnected by the bus daemon.
* Don't examine args for functions declared METH_NOARGS.Simon McVittie2007-02-211-6/+3
| | | | | It's not guaranteed to be non-NULL, and Python checks there are no arguments so we don't have to.
* Actually commit the numerous copyright-statement changes.Simon McVittie2007-02-0721-152/+152
|
* Audit tp_dealloc callbacks to make sure they preserve the exception state.Simon McVittie2007-02-072-1/+7
| | | | | | * Connection: use PyErr_Fetch and PyErr_Restore to preserve exception state * MainLoop: add a comment indicating that the "free" callback needs to do the same if it might alter the exception state
* Fix memory leak where Struct, _LongBase, _StrBase, String leaked their ↵Simon McVittie2007-02-075-108/+309
| | | | | | | | | | | | | | __dict__ on deallocation. * Use a fixed-size struct for String (unicode objects are in fact fixed-size) and store its variant_level that way. * Don't store Struct, _LongBase, _StrBase variant_level and Struct signature in a __dict__, but instead have a global dict mapping object IDs to variant levels, and a global dict mapping Struct IDs to signatures. This is a bit strange, but easier than correctly freeing the __dict__ (which is stored at the end of a variable-length struct, so somewhat hard to get at). * With this change, allocating objects in a loop no longer leaks memory, and neither does the test case supplied by Luka Renko.
* Close a couple of reference leaks in String (there's another somewhere, but ↵Simon McVittie2007-02-051-8/+22
| | | | I can't find it)
* Don't leak memory in Struct repr()Simon McVittie2007-02-051-2/+5
|
* Don't leak memory in _StringBase and _LongBase repr()Simon McVittie2007-02-051-2/+10
|
* Switch _IntBase back to using generic alloc/free implementation rather than ↵Simon McVittie2007-02-051-1/+2
| | | | half-participating in the int free list (which would result in _IntBase instances leaking)
* Fix a couple of memory leaks - D-Bus signature strings, and decoded Unicode ↵Simon McVittie2007-02-051-7/+11
| | | | objects
* _dbus_bindings/pending-call.c: Fix memory leak of one Message per method call.Simon McVittie2007-01-311-2/+3
| | | | | Also fix a leak of references to Py_None (unlikely to be a practical problem, but best to be correct).
* dbus, _dbus_bindings, _dbus_glib_bindings: remove accidentally duplicated ↵Simon McVittie2007-01-2524-48/+0
| | | | lines in license statement
* Split up Makefile.am between subdirectoriesSimon McVittie2007-01-221-0/+30
| | | | | | As well as being conventional, this seems to be necessary to avoid having dbus_py_test.so installed, while still having it be a Libtool shared library (noinst libraries are helpfully made static).
* When running without a main loop, don't make introspection fail.Simon McVittie2007-01-161-7/+17
| | | | | | Also change send_message_with_reply() to not demand a main loop by default (since you can call block() on the returned object, like blocking introspection does).
* conn.c: fix Connection setup in absence of main loop, and error handlingSimon McVittie2007-01-161-1/+4
| | | | | | | * Only set up a main loop if we actually have one (not None) * Don't double-close the DBusConnection (causing an assertion in libdbus) if we somehow fail to set up the main loop. Thanks to tsuraan <tsuraan at gmail.com> for the bug report.
* Switch types from int to Py_ssize_t to be compatible with Python 2.5 on ↵Simon McVittie2007-01-164-7/+20
| | | | 64-bit archs
* bytes.c, string.c: Don't mention get_object_by_unique_name in docstrings, it ↵Simon McVittie2007-01-162-2/+2
| | | | no longer exists
* Ensure we put the right number of items in a struct or message and add test ↵Simon McVittie2007-01-161-19/+36
| | | | | | | | | | | cases. This avoids us getting kicked off the bus when trying to put the wrong number of things in a struct - this used to happen, but was masked by the fact that the tests ran with service activation, so the service was just killed and reactivated. Forthcoming changes to get_object make this automatic reactivation not happen (messages will be directed to the unique name by default, so stateful communication can work).
* Add special case to serialization: objects with a __dbus_object_path__ ↵Simon McVittie2007-01-103-24/+101
| | | | attribute are serialized as that object path. Add that attribute to ProxyObject, dbus.Interface and dbus.service.Object.
* Validate that the signature on an Array or Dict has the right number of ↵Simon McVittie2007-01-091-4/+54
| | | | complete types
* When putting a ByteArray into a variant array, serialise it as an array of ↵Simon McVittie2007-01-091-1/+25
| | | | variants containing byte, not an array of variants containing string
* Improve documentation of type conversion from D-Bus to PythonSimon McVittie2007-01-091-11/+12
|
* Improve docstrings for String and UTF8String explaining how to get ↵Simon McVittie2007-01-091-0/+26
| | | | UTF8String from the API.
* Subscripting a ByteArray now gives 1-character strings again (for least ↵Simon McVittie2007-01-091-57/+18
| | | | astonishment). Also document how to get a ByteArray from the API
* Don't require a main loop unless async calls, signal connections or exported ↵Simon McVittie2007-01-094-9/+38
| | | | objects are actually made. (Increases backwards compatibility with Pyrex-dbus-python)
* Improve various type docstringsSimon McVittie2006-12-2113-127/+205
|
* Fix recommendation given by exception message bringing it into sync with ↵Simon McVittie2006-12-211-1/+1
| | | | current API (spotted by Phil Thompson)
* Switch to autotools and test with Python 2.5 as well as 2.4.Simon McVittie2006-12-186-23/+51
| | | | | | | | | | | | | | In the process: HACKING.txt: update include/dbus-python.h: add some typedefs to make it saner bus.c, conn.c, conn-methods.c: further alter docstrings to keep epydoc happy exceptions.c: create exceptions in a more longwinded way for Python 2.5 compatibility message-get-args.c, bus/__init__.py: tweak docstrings dbus/introspect_parser.py: make docstring valid reStructuredText run-test.sh: simplify, since configure now does some of the work test/*.py: use paths from run-test.sh, cope with out-of-tree builds test-standalone.py: carry out additional sanity checks
* bus.c, conn-methods.c, conn.c: Alter format of signatures in docstrings to ↵Simon McVittie2006-12-183-14/+16
| | | | keep epydoc happy
* include/dbus_bindings.h: Rename to include/dbus-python.h, improve namespacing.Simon McVittie2006-12-182-3/+3
| | | | | _dbus_bindings/conn-internal.h, _dbus_bindings/dbus_bindings-internal.h, _dbus_glib_bindings/module.c: Use dbus-python.h instead of dbus_bindings.h
* _dbus_bindings/module.c: If Python is older than 2.4.2c1, initialize threads.Simon McVittie2006-12-141-0/+10
| | | | | | | | In newer versions the PyGILState API is allowed even when threads haven't been initialized yet, but in 2.4.1 it causes a crash. It's desirable to avoid initializing threads until just before the second thread is created, since this creates locking overhead which isn't needed until the app actually goes multi-threaded.
* message-append.c, message-get-args.c: Turn off debug messages even when ↵Simon McVittie2006-12-132-0/+2
| | | | debugging other things, they're too verbose
* _dbus_bindings/conn.c: Fix broken weak reference handling, which caused a ↵Simon McVittie2006-12-131-12/+43
| | | | | | segfault on OLPC. Also add debug related to this.
* conn-methods.c: Add tracingSimon McVittie2006-12-131-0/+21
|
* conn-internal.h: Comment weakref listSimon McVittie2006-12-131-0/+1
|
* bus.c: Add tracing and a couple of missed assertionsSimon McVittie2006-12-131-0/+11
|