|
Server : Apache/2.2.17 (Unix) mod_ssl/2.2.17 OpenSSL/0.9.8e-fips-rhel5 DAV/2 PHP/5.2.17 System : Linux localhost 2.6.18-419.el5 #1 SMP Fri Feb 24 22:47:42 UTC 2017 x86_64 User : nobody ( 99) PHP Version : 5.2.17 Disable Function : NONE Directory : /usr/lib64/python2.4/site-packages/dbus/ |
Upload File : |
mò
¼Á»Dc @ s¥ d Z d k Z d k Z d k Z d k Td k Td k Td e f d „ ƒ YZ d e f d „ ƒ YZ d e f d „ ƒ YZ
d e f d
„ ƒ YZ d f d „ ƒ YZ d S(
sç Module for high-level communication over the FreeDesktop.org Bus (DBus)
DBus allows you to share and access remote objects between processes
running on the desktop, and also to access system services (such as
the print spool).
To use DBus, first get a Bus object, which provides a connection to one
of a few standard dbus-daemon instances that might be running. From the
Bus you can get a RemoteService. A service is provided by an application or
process connected to the Bus, and represents a set of objects. Once you
have a RemoteService you can get a RemoteObject that implements a specific interface
(an interface is just a standard group of member functions). Then you can call
those member functions directly.
You can think of a complete method call as looking something like:
Bus:SESSION -> Service:org.gnome.Evolution -> Object:/org/gnome/Evolution/Inbox -> Interface: org.gnome.Evolution.MailFolder -> Method: Forward('message1', 'seth@gnome.org')
This communicates over the SESSION Bus to the org.gnome.Evolution process to call the
Forward method of the /org/gnome/Evolution/Inbox object (which provides the
org.gnome.Evolution.MailFolder interface) with two string arguments.
For example, the dbus-daemon itself provides a service and some objects:
# Get a connection to the desktop-wide SESSION bus
bus = dbus.Bus(dbus.Bus.TYPE_SESSION)
# Get the service provided by the dbus-daemon named org.freedesktop.DBus
dbus_service = bus.get_service('org.freedesktop.DBus')
# Get a reference to the desktop bus' standard object, denoted
# by the path /org/freedesktop/DBus. The object /org/freedesktop/DBus
# implements the 'org.freedesktop.DBus' interface
dbus_object = dbus_service.get_object('/org/freedesktop/DBus',
'org.freedesktop.DBus')
# One of the member functions in the org.freedesktop.DBus interface
# is ListServices(), which provides a list of all the other services
# registered on this bus. Call it, and print the list.
print(dbus_object.ListServices())
N( t *t Busc B s( t Z d Z e i Z e i Z e i Z e
Z e i Z
e i Z e i ƒ Z e e e d „ Z d „ Z d „ Z d „ Z e d „ Z e e ƒ Z e d „ Z e e ƒ Z e d „ Z e e ƒ Z d „ Z d „ Z e e e e d
„ Z e e e e d „ Z! d „ Z"