Enabled PackageKit support for RPM, Slack and Gentoo distributions too
[zeroinstall/zeroinstall-limyreth.git] / tests / my_dbus.py
blob99b36d4bd0173490d354f5d1acc2ae22eabc3226
1 user_callback = None # Invoked in a callback when a question box is displayed
2 class mainloop:
3 class glib:
4 @classmethod
5 def DBusGMainLoop(a, set_as_default = False):
6 pass
8 class SessionBus:
9 def get_object(self, service, path):
10 return None
12 class SystemBus:
13 def get_object(self, service, path):
14 return None
16 class Interface:
17 def __init__(self, obj, iface):
18 self.callback = {}
19 self.boxes = []
21 def GetCapabilities(self):
22 pass
24 def Notify(self, *args):
25 self.boxes.append(args)
26 nid = len(self.boxes)
28 app, replaces_id, icon, title, message, actions, hints, timeout = args
30 if actions:
31 user_callback(self.callback['ActionInvoked'], nid, actions)
33 return nid
35 def state(self):
36 return 3 # NM_STATUS_CONNECTED
38 def connect_to_signal(self, signal, callback):
39 self.callback[signal] = callback
41 class Byte:
42 def __init__(self, value):
43 pass