Skip to content

Commit

Permalink
Document AddMatch in message reply handler example
Browse files Browse the repository at this point in the history
fixes #76
  • Loading branch information
Tony Crisci committed Dec 6, 2020
1 parent a3f4759 commit 39b60a9
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions docs/low-level-interface/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,15 @@ Mixed use of the low and high level interfaces on the same bus connection is not
bus = await MessageBus().connect()
reply = await bus.call(
Message(destination='org.freedesktop.DBus',
path='/org/freedesktop/DBus',
member='AddMatch',
signature='s',
body=["member='MyMember', interface='com.test.interface'"]))
assert reply.message_type == MessageType.METHOD_RETURN
def message_handler(msg):
if msg.interface == 'com.test.interface' and msg.member == 'MyMember':
return Message.new_method_return(msg, 's', ['got it'])
Expand Down

0 comments on commit 39b60a9

Please sign in to comment.