Test SAT learning
[zeroinstall/solver.git] / tests / my_dbus.py
blob6e77455d824e2522da07525fb8b171915d1e62be
1 user_callback = None # Invoked in a callback when a question box is displayed
3 class SessionBus:
4 def get_object(self, service, path):
5 return None
7 class SystemBus:
8 def get_object(self, service, path):
9 return None
11 class Interface:
12 def __init__(self, obj, iface):
13 self.callback = {}
14 self.boxes = []
16 def GetCapabilities(self):
17 pass
19 def Notify(self, *args):
20 self.boxes.append(args)
21 nid = len(self.boxes)
23 app, replaces_id, icon, title, message, actions, hints, timeout = args
25 if actions:
26 user_callback(self.callback['ActionInvoked'], nid, actions)
28 return nid
30 def state(self):
31 return 3 # NM_STATUS_CONNECTED
33 def connect_to_signal(self, signal, callback):
34 self.callback[signal] = callback
36 class Byte:
37 def __init__(self, value):
38 pass