summaryrefslogtreecommitdiffstats
path: root/python/dbus_bindings.pyx.in
Commit message (Collapse)AuthorAgeFilesLines
* * python/dbus_bindings.pyx.in: removedJohn (J5) Palmieri2005-07-121-1494/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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"
* * python/dbus_bindings.pyx.in (cunregister_function_handler,John (J5) Palmieri2005-06-281-24/+36
| | | | | | | 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-16 Colin Walters <walters@verbum.org>Colin Walters2005-06-161-0/+8
| | | | | | | | | | | | * 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. (_dbus_read_credentials_unix_socket): Use cmsg struct. Patch from Joe Markus Clarke for FreeBSD support.
* - s/TYPE_PATH/TYPE_OBJECT_PATHJohn (J5) Palmieri2005-05-191-2/+2
|
* * python/dbus_bindings.pyx.in:John (J5) Palmieri2005-05-011-3/+143
| | | | | | | | | | | | | | | | - 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
* * python/dbus_bindings.pyx.in (send_with_reply_handlers): New sendJohn (J5) Palmieri2005-04-251-9/+59
| | | | | | | | | | | | | | | | | | | | | | | | | method for doing async calls (_pending_call_notification): New C function for handling pendning call callbacks (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
* python/dbus_bindings.pyx.in (PendingCall::get_reply):John (J5) Palmieri2005-02-231-1/+3
| | | | s/dbus_pending_call_get_reply/dbus_pending_call_steal_reply
* * python/dbus.py (class Sender): added to support dbus signals betterJohn (J5) Palmieri2005-02-111-74/+189
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (Bus::add_signal_receiver): added expand_args parameter which defaults to True. When expand args is True the signal handler will pass the message arguments as parameters to the signal handler. If False revert to previous behavior where the signal handler must get the argument list from the message. This is to help port applications like HAL that have a tendancy to send variable length argument lists. self._match_rule_to_receivers is now a dict of dicts. (Bus::remove_signal_receiver): pop handler off the dict intead of removing it from a list (Bus::_signal_func): change signal handlers so that interface, signal_name, service, path and message are packed into a Sender object and that is passed to the handler. If expand_args is True extract the args list from the message and append it to the parameter list * python/dbus_bindings.pyx.in (class Signature): added to support signiature types (MessageIter::__init__): changed iteration limit to match D-BUS (MessageIter::get*): added INT16, UINT16, SIGNATURE, DICT_ENTRY, STRUCT and VARIENT type support (MessageIter::python_value_to_dbus_sig): made recursive to support recursive types (MessageIter::append*): added Signature, dict, tuple support * python/examples/example-client.py: added examples of getting tuples and dicts * python/examples/example-service.py: added examples of sending tuples and dicts * python/examples/example-signal-recipient.py: Fixed to handle new signal callback format
* * python/dbus_bindings.pyx.in: Updated to handle new D-BUS type systemJohn (J5) Palmieri2005-01-281-330/+261
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - BUS_ACTIVATION -> BUS_STARTER - DBUS_BUS_ACTIVATION -> DBUS_BUS_STARTER - class MessageIter (__init__): Added recursion checking so we throw a nice error instead of just disconnecting from the bus. (get): Added arg_type parameter for recursion. Removed the nil type Added signiture type placeholder (not implemented) Added struct type placeholder (not implemented) Added varient type placeholder (not implemented) Commented out dict type for now (get_element_type): renamed from get_array_type (get_*): changed to use the dbus_message_iter_get_basic API (get_*_array): removed in favor of recursive get_array method (get_array): new recursive method which calls get to marshal the elements of the array (value_to_dbus_sig): New method returns the corrasponding dbus signiture to a python value (append): Comment out dict handling for now Handle lists with the new recursive API Comment out None handling for now (append_nil): removed (append_*): changed to use dbus_message_iter_append_basic API (append_*_array): removed in favor of recursive append_array method (__str__): Make it easier to print out recursive iterators for debugging - class Message (__str__): moved type inspection to the MessageIter class' __str__ method (get_iter): Added an append parameter wich defaults to False If True use the new API's to create an append iterator * python/dbus.py: Update to use new bindings API - TYPE_ACTIVATION -> TYPE_STARTER - class Bus (_get_match_rule): GetServiceOwner -> GetNameOwner - class ActivationBus -> class StarterBus - class RemoteObject (__call__): get an append iterator - (_dispatch_dbus_method_call): get an append iterator - class Object (emit_signal): get an append iterator * python/examples/: Fixed up the examples to work with the new API
* * python/dbus_bindings.pyx.in: Rename of methods and bindingsJohn (J5) Palmieri2005-01-251-15/+15
| | | | | | | | | | | | | | | | | | | | - get_base_service->get_unique_name - bus_get_base_service->bus_get_unique_name - dbus_bus_get_base_service -> dbus_bus_get_unique_name - ACTIVATION_REPLY_ACTIVATED -> DBUS_START_REPLY_SUCCESS - ACTIVATION_REPLY_ALREADY_ACTIVE -> DBUS_START_REPLY_ALREADY_RUNNING - bus_activate_service -> bus_start_service_by_name - dbus_bus_activate_service -> dbus_bus_start_service_by_name - bus_acquire_service -> bus_request_name - dbus_bus_acquire_service -> dbus_bus_request_name - bus_service_exists -> bus_name_has_owner - dbus_bus_service_exists -> dbus_bus_name_has_owner * python/dbus.py: Rename of methods - activate_service -> start_service_by_name - bus_acquire_service -> bus_request_name - ACTIVATION_REPLY_ACTIVATED -> START_REPLY_SUCCESS - ACTIVATION_REPLY_ALREADY_ACTIVE -> START_REPLY_ALREADY_RUNNING
* 2004-12-30 John (J5) Palmieri <johnp@redhat.com>John (J5) Palmieri2004-12-301-2/+3
| | | | | | | * python/dbus_bindings.pyx.in: Change DBUS_ACTIVATION_REPLY_ACTIVATED and DBUS_ACTIVATION_REPLY_ALREADY_ACTIVE to match the values in dbus-protocol.h. Because they are defines and not enums they are not autogenerated.
* 2004-12-26 John (J5) Palmieri <johnp@redhat.com>John (J5) Palmieri2004-12-271-0/+16
| | | | | | | | * python/dbus_bindings.pyx.in (bus_activate_service): Bind dbus_bus_activate_service * python/dbus.py (Bus.activate_service): activate a service on the bus.
* * patch from Rob Taylor <robtaylor@fastmail.fm>John (J5) Palmieri2004-12-231-0/+13
| | | | | | - wrap bus_get_unix_user method in low level bindings - add get_unix_user method to the Bus class - fix extract.py so it can handle unsigned long return types
* 2004-09-16 David Zeuthen <david@fubar.dk>David Zeuthen2004-09-161-1/+65
| | | | * python/dbus_bindings.pyx.in: Add support for int64 and uint64
* 2004-07-28 Anders Carlsson <andersca@gnome.org>Anders Carlsson2004-07-281-0/+4
| | | | | | | * python/dbus.py: * python/dbus_bindings.pyx.in: Add dbus.init_gthreads (), allow emit_signal to pass arguments to the signal.
* 2004-07-18 Seth Nickell <seth@gnome.org>Seth Nickell2004-07-181-7/+16
| | | | | | | | | | | | * python/dbus.py: * python/dbus_bindings.pyx.in: * python/tests/test-client.py: Add dbus.ByteArray and dbus_bindings.ByteArray types so that byte streams can be passed back. Give jdahlin the heaps of credit that are so rightfully his.
* 2004-07-12 Seth Nickell <seth@gnome.org>Seth Nickell2004-07-121-12/+16
| | | | | | | | | | | | | | * python/dbus.py: Add message argument to the default object_method_handler function. * python/dbus_bindings.pyx.in: Automatically return NIL when passed an empty list (we can't pass back a list since lists are typed and we don't have any idea what type the the client intended the list to be... :-( )
* * Python bindings are updated to reflect C API changes which nowJohn (J5) Palmieri2004-06-081-32/+3
| | | | accept plain path strings instead of an array of path elements.
* 2004-06-01 Seth Nickell <seth@gnome.org>Seth Nickell2004-06-011-25/+65
| | | | | | | | | | | | * python/dbus_bindings.pyx.in: * python/tests/test-client.py: Round off basic type support. Add dicts (yay!), and remaining array types. Make MessageIter more general so it works for dicts too. Mark all loop variables as C integers.
* * python/dbus_bindings.pyx.in:Seth Nickell2004-06-011-12/+70
| | | | | | | | | * python/tests/test-client.py: Test Suite: 1 Python Bindings: 0 (fix string array memory trashing bug... oops)
* 2004-05-30 Seth Nickell <seth@gnome.org>Seth Nickell2004-05-301-13/+19
| | | | | | | | | * python/dbus_bindings.pyx.in: * python/tests/test-client.py: Add some more tests and fix errors that crop up. Unfortunately, currently it seems like marshalling and unmarshalling of lists is completely broken :-(
* 2004-05-30 Seth Nickell <seth@gnome.org>Seth Nickell2004-05-301-11/+55
| | | | | | | | | | | | | | | | * python/dbus_bindings.pyx.in: Add support for ObjectPath type. * python/dbus.py: Refactor message handling code to a common function. * python/tests/test-client.py: * python/tests/test-server.py: Add tests that check to make sure values of all types can be echoed from a service w/o mangling.
* 2004-05-27 Seth Nickell <seth@gnome.org>Seth Nickell2004-05-281-0/+2
| | | | | | | | * python/dbus.py: * python/dbus_bindings.pyx.in: Fix failure to notify that a signal was not handled, resulted in hung functions.
* * Fixed python bindings by defining all need parameter and variable typesJohn (J5) Palmieri2004-05-101-64/+128
|
* 2003-10-28 David Zeuthen <david@fubar.dk>David Zeuthen2003-10-291-1/+24
| | | | | * python/dbus_bindings.pyx.in: add get_dict to handle dictionaries return types. Fixup TYPE_* to reflect changes in dbus/dbus-protocol.h
* 2003-10-14 David Zeuthen <david@fubar.dk>David Zeuthen2003-10-151-2/+2
| | | | | | | * python/dbus_bindings.pyx.in (MessageIter.get): fixed typo in argtype to arg_type when raising unknown arg type exception. Changed type list to reflect the changes in dbus-protocol.h so the bindings actually work.
* forgot to add files...Havoc Pennington2003-09-301-0/+917