2003-09-30 02:41:13 +00:00
|
|
|
#!/usr/bin/env python
|
|
|
|
|
|
|
|
|
|
import dbus
|
|
|
|
|
|
2004-05-29 22:37:13 +00:00
|
|
|
bus = dbus.SessionBus()
|
2005-04-25 22:54:28 +00:00
|
|
|
remote_object = bus.get_object("org.designfu.SampleService", "/SomeObject")
|
|
|
|
|
iface = dbus.Interface(remote_object, "org.designfu.SampleInterface")
|
2003-09-30 02:41:13 +00:00
|
|
|
|
2005-04-25 22:54:28 +00:00
|
|
|
hello_reply_list = remote_object.HelloWorld("Hello from example-client.py!", dbus_interface = "org.designfu.SampleInterface")
|
2003-09-30 02:41:13 +00:00
|
|
|
|
2005-04-25 22:54:28 +00:00
|
|
|
hello_reply_tuple = iface.GetTuple()
|
2005-02-11 19:51:18 +00:00
|
|
|
|
2005-04-25 22:54:28 +00:00
|
|
|
hello_reply_dict = iface.GetDict()
|
2005-02-11 19:51:18 +00:00
|
|
|
|
2004-05-30 06:26:24 +00:00
|
|
|
print (hello_reply_list)
|
2005-02-11 19:51:18 +00:00
|
|
|
|
|
|
|
|
print str(hello_reply_tuple)
|
|
|
|
|
|
|
|
|
|
print str(hello_reply_dict)
|
|
|
|
|
|
2005-04-25 22:54:28 +00:00
|
|
|
print remote_object.Introspect(dbus_interface="org.freedesktop.DBus.Introspectable")
|