summaryrefslogtreecommitdiffstats
path: root/python/matchrules.py
Commit message (Collapse)AuthorAgeFilesLines
* * ChangeLog: clean up my last entry a bitJohn (J5) Palmieri2005-08-181-6/+58
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * doc/introspect.xsl: New stylesheet for converting introspection data into browser renderable xhtml. Contributed by Lennart Poettering. * doc/introspect.dtd: Fixups in the introspect format from Lennart Poettering. * doc/dbus-tutorial.xml: - Add Colin Walter to the Authors section for authoring the GLib section - Add descriptions of the new signature and type functionality in the Python complex type mapping section - Add a sidenote on the new args matching functionality in the Python bindings - Fixed up some of the examples to use the gobject.MainLoop instead of gtk.main * python/_dbus.py: (Bus::_create_args_dict): New. Converts a hash of arg matches to a more useable format (Bus::add_signal_receiver): add a **keywords parameter for catching arg match parameters (Bus::remove_signal_receiver): add a **keywords parameter for catching arg match parameters * python/matchrules.py: (MatchTree::exec_matches): Check for arg matches (SignalMatchRule::add_args_match): New method (SignalMatchRule::execute): Added args_list parameter as an optimization so we don't have to marshal the args more than once (SignalMatchRule::match_args_from_list): New method that checks to see if the rule's arg matches match an argument list. Only arguments set in the rule are checked. (SignalMatchRule::match_args_from_rule): New method that checks to see if the rule's arg matches match another rule's. All args have to match in order for this method to return true. If either rule has more args then it is not a match. (SignalMatchRule::is_match): Add args match (SignalMatchRule::repr): Add args to the final output if they exist
* * python/_dbus.py, _util.py, decorators.py, extract.py, matchrules.py.John (J5) Palmieri2005-07-201-1/+1
| | | | | | 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>)
* * python/_dbus.py (Bus::remove_signal_receiver):John (J5) Palmieri2005-07-151-4/+8
| | | | | | | | | | 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
* * python/decorators.py: add explicitly_pass_message decoratorJohn (J5) Palmieri2005-05-241-12/+9
| | | | | | | | | | | | | | | for passing in the dbus message as keyword for edge case signal handling * 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 signals * python/proxies.py: minor formatting changes
* * python/decorators.py: import dbus_bindingsJohn (J5) Palmieri2005-05-241-0/+170
* 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 signals.