6 def __init__ ( self , name , version , flag ) :
7 self.connection = dbus.SessionBus()
11 def get_connection ( self ) :
12 return self.connection
16 def __init__ ( self , context ) :
17 self.context = context
20 # gps.GPSObject.__init__( self , widget )
21 # # self.osso_context = osso.Context("wifi_scanner", "2.0", False)
22 # # osso_rpc = osso.Rpc(self.osso_context)
23 # # scan_out = osso_rpc.rpc_run("org.javiplx.wifiscan", "/org/javiplx/wifiscan", "org.javiplx.wifiscan", "wakeup", wait_reply = True)
24 # scan_out = rpc_run("org.javiplx.wifiscan", "/org/javiplx/wifiscan", "org.javiplx.wifiscan", "wakeup", wait_reply = True)
29 def rpc_run ( self , object_name , object_path , object_iface , method , wait_reply=False ) :
30 connection = self.context.get_connection()
31 proxy = connection.get_object( object_name , object_path )
32 iface = dbus.Interface( proxy , object_iface )
33 iface = dbus.Interface( proxy , dbus_interface=object_iface )
34 callable = iface.get_dbus_method( method )