summaryrefslogtreecommitdiffstats
path: root/python/proxies.py
Commit message (Collapse)AuthorAgeFilesLines
* * Remove all bindingsJohn (J5) Palmieri2006-07-141-222/+0
|
* 2006-02-24 John (J5) Palmieri <johnp@redhat.com>dbus-0.61John (J5) Palmieri2006-02-241-51/+45
| | | | | | | | * Released 0.61 2006-02-24 John (J5) Palmieri <johnp@redhat.com> * proxies.py: Fix the callchain
* 2005-11-03 Robert McQueen <robot101@debian.org>Robert McQueen2005-11-031-1/+1
| | | | | | | | * 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>Robert McQueen2005-10-291-6/+5
| | | | | | | | | | | | | | | | | | | | | | | * 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.
* * glib/dbus-gvalue-utils.c (hash_free_from_gtype): handle gdoubleJohn (J5) Palmieri2005-10-181-19/+25
| | | | | | | | | | | | | | | | | | | | | | | | | and G_TYPE_VALUE_ARRAY (DBUS_TYPE_STRUCT) (gvalue_from_hash_value, hash_value_from_gvalue): handle gdouble * glib/dbus-gvalue.c (dbus_gvalue_to_signature): add missing DBUS_STRUCT_BEGIN_CHAR and DBUS_STRUCT_END_CHAR charaters when constructing struct signatures * python/_dbus.py (Bus): handle private connections using the private keyword in the constructor. defaults to private=False (Bus::close): new method to close a connection to the bus * python/dbus_bindings.pyx (Connection::close): renamed method was previously called disconnect (bus_get): now supports getting a private connection * python/proxies.py (ProxyMethod::__call__): check if ignore_reply keyword is set to True. if it is, execute the method without waiting for a reply (ProxyObject::_introspect_execute_queue): new method for executing all the pending methods that were waiting for the introspect to finish. this is called when introspect either succeeds or fails (ProxyObject::_introspect_error_handler): call queued methods
* * glib/dbus-gvalue.c (marshal_variant): call _dbus_gvalue_marshalJohn (J5) Palmieri2005-10-051-14/+61
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | instead of marshal basic so we can handle recursive types in a variant * test/glib/test-dbus-glib.c: Add test for marshaling recurive types in variants * test/glib/test-service-glib.c, test-service-glib.xml (my_object_echo_variant [EchoVariant], my_object_process_variant_of_array_of_ints123 [ProcessVariantOfArrayOfInts123]): Add two test methods * python/introspect_parser.py: New module for parsing introspect data. * python/dbus_bindings.pyx: (various places): when throwing errors fix to use errormsg instead of message local variable because Pyrex can get confused with other message variables (initial patch by Robert McQueen <robert.mcqueen at collabora.co.uk>) (MessageIter::parse_signature_block): new method for getting the next block in a signiture. (MessageIter::append_strict): new method for appending values strictly using the passed in signature instead of guessing at the type (MessageItter:: append_dict, append_struct, append_array): use signatures to marshal children if the signature is available * python/exceptions.py (IntrospectionParserException): new exception * python/proxies.py (ProxyMethod::__call__): Marshal args with introspected signatures if available, else we fall back to the old way of doing things. (ProxyObject::_introspect_reply_handler ): parse introspection data * python/service.py (ObjectType::_reflect_on_method): Properly terminate <method> if there are no args in the reflection data * test/python/test-client.py: add tests for talking with the GLib test server. This gives us better coverage for introspection since python to python will always generate arguments as variants. It also allows us to test the robustness of the GLib bindings and interlanguage communications.
* * python/dbus_bindings.pyx: Tracked down a major memleak and fixed itJohn (J5) Palmieri2005-08-261-1/+1
| | | | | | | (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
* - Merged changed from the DBUS_0_36_1 bugfix branchJohn (J5) Palmieri2005-08-241-2/+3
|
* * python/__init__.py: Version updated (0, 43, 0)John (J5) Palmieri2005-08-161-11/+86
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * python/dbus_bindings.pyx: - Fixed type objects to have self passed into __init__ - Added the Variant type - Add the ability to specify types or signatures for Array, Variant and Dictionary - (Connection::send_with_reply_handlers): return a PendingCall object - (_pending_call_notification): handle the case when an error is returned without an error message in the body - (MessageIter::get_boolean): return True or False instead of an integer - (MessageIter::python_value_to_dbus_sig): add direct checking of types and add checks for objects with embeded signatures or types (Array, Variant and Dictionary) - (MessageIter::append_byte): handle case when the value is a dbus.Byte - (MessageIter::append_dict): handle embeded types or signatures - (MessageIter::append_array): handle embeded types or signatures - (MessageIter::append_variant): new method * python/proxies.py: - (DeferedMethod): New. Dummy executable object used when queuing calls blocking on introspection data - (ProxyMethod::__call__): add the timeout keyword for specifying longer or shorter timeouts for method calls - (ProxyObject): Add first pass at an introspection state machine - (ProxyObject::__init__): Add introspect keyword for turing off an on introspection. - (ProxyObject::_Introspect): Internal Introspect call that bypasses the usual mechanisms for sending messages. This is to avoid a deadlock where the Intospect call would be queued waiting for the Introspect call to finish ;-) - (ProxyObject::_introspect_reply_handler): New. This method is called when introspection returns with no error - (ProxyObject::_introspect_error_handler): New. This method is called when introspection encounters an error - (ProxyObject::__getattr__): Code to handle different introspection states. Queue async calls or block blocking calls if we are introspecting. Pass through as normal if we are not or are done with introspecting. * python/service.py: Import signal and method from decorators.py * python/types.py: Add Variant type
* * python/_dbus.py, _util.py, decorators.py, extract.py, matchrules.py.John (J5) Palmieri2005-07-201-1/+2
| | | | | | 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>)
* * glib/dbus-gmain.c (io_handler_dispatch): fix deadlockJohn (J5) Palmieri2005-05-161-40/+42
| | | | | | | | | | | | 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.
* * Fix my name in previous changelog ;)John (J5) Palmieri2005-05-051-0/+2
| | | | | | | * 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).
* * python/Makefile.am: changed to use pyexecdir for the bindingJohn (J5) Palmieri2005-05-051-0/+5
| | | | | | | | | | | 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)
* * python/dbus_bindings.pyx.in:John (J5) Palmieri2005-05-011-0/+90
- 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