BUGFIX : add missing configuration argument
[wifihood] / wifiscanner / wifimap / osso_wrapper.py
1
2 import dbus
3
4 class Context :
5
6     def __init__ ( self , name , version , flag ) :
7         self.connection = dbus.SessionBus()
8         self.name = name
9         self.version = version
10
11     def get_connection ( self ) :
12         return self.connection
13
14 class Rpc :
15
16     def __init__ ( self , context ) :
17         self.context = context
18
19     def rpc_run ( self , object_name , object_path , object_iface , method , wait_reply=False ) :
20         connection = self.context.get_connection()
21         proxy = connection.get_object( object_name , object_path )
22         iface = dbus.Interface( proxy , object_iface )
23         iface = dbus.Interface( proxy , dbus_interface=object_iface )
24         callable = iface.get_dbus_method( method )
25         return callable()
26