1 user_callback
= None # Invoked in a callback when a question box is displayed
5 def DBusGMainLoop(a
, set_as_default
= False):
8 system_services
= {} # {service_name: {path: object}}
11 def get_object(self
, service
, path
):
15 def get_object(self
, service
, path
, follow_name_owner_changes
= False):
16 service
= system_services
.get(service
, None)
21 def Interface(obj
, iface
):
29 def GetCapabilities(self
):
32 def Notify(self
, *args
):
33 self
.boxes
.append(args
)
36 app
, replaces_id
, icon
, title
, message
, actions
, hints
, timeout
= args
39 user_callback(self
.callback
['ActionInvoked'], nid
, actions
)
43 def connect_to_signal(self
, signal
, callback
):
44 self
.callback
[signal
] = callback
47 def __init__(self
, value
):
50 PROPERTIES_IFACE
= 'org.freedesktop.DBus.Properties'
53 class DBusException(Exception):
54 def __init__(self
, name
):
57 def get_dbus_name(self
):