Move the osso wrapper out of the wifimap module
authorjaviplx <javiplx@gmail.com>
Sat, 7 May 2011 18:48:45 +0000 (18:48 +0000)
committerjaviplx <javiplx@gmail.com>
Sat, 7 May 2011 18:48:45 +0000 (18:48 +0000)
git-svn-id: file:///svnroot/wifihood/branches/hildon-wrapping@136 c51dfc6a-5949-4919-9c8e-f207a149c383

MANIFEST
osso.py [new file with mode: 0644]
wifimap/osso_wrapper.py [deleted file]
wifimap/scanner.py
wifimap/wifiscan.py

index 7375846..0f85e64 100644 (file)
--- a/MANIFEST
+++ b/MANIFEST
@@ -8,7 +8,6 @@ wifiview.desktop
 wifimap/__init__.py
 wifimap/gps.py
 wifimap/wifiscan.py
-wifimap/osso_wrapper.py
 wifimap/db.py
 wifimap/config.py
 wifimap/view.py
diff --git a/osso.py b/osso.py
new file mode 100644 (file)
index 0000000..21bd5da
--- /dev/null
+++ b/osso.py
@@ -0,0 +1,36 @@
+
+import dbus
+
+class Context :
+
+    def __init__ ( self , name , version , flag ) :
+        self.connection = dbus.SessionBus()
+        self.name = name
+        self.version = version
+
+    def get_connection ( self ) :
+        return self.connection
+
+class Rpc :
+
+    def __init__ ( self , context ) :
+        self.context = context
+
+    def rpc_run ( self , object_name , object_path , object_iface , method , wait_reply=False ) :
+        connection = self.context.get_connection()
+        proxy = connection.get_object( object_name , object_path )
+        iface = dbus.Interface( proxy , object_iface )
+        iface = dbus.Interface( proxy , dbus_interface=object_iface )
+        callable = iface.get_dbus_method( method )
+        return callable()
+
+
+class Reporter :
+    def __init__ ( self , context ) :
+        self.context = context
+    def system_note_infoprint( self , message ) :
+        print "MESSAGE : %s" % message
+
+def SystemNote ( context ) :
+    return Reporter()
+
diff --git a/wifimap/osso_wrapper.py b/wifimap/osso_wrapper.py
deleted file mode 100644 (file)
index 21bd5da..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-
-import dbus
-
-class Context :
-
-    def __init__ ( self , name , version , flag ) :
-        self.connection = dbus.SessionBus()
-        self.name = name
-        self.version = version
-
-    def get_connection ( self ) :
-        return self.connection
-
-class Rpc :
-
-    def __init__ ( self , context ) :
-        self.context = context
-
-    def rpc_run ( self , object_name , object_path , object_iface , method , wait_reply=False ) :
-        connection = self.context.get_connection()
-        proxy = connection.get_object( object_name , object_path )
-        iface = dbus.Interface( proxy , object_iface )
-        iface = dbus.Interface( proxy , dbus_interface=object_iface )
-        callable = iface.get_dbus_method( method )
-        return callable()
-
-
-class Reporter :
-    def __init__ ( self , context ) :
-        self.context = context
-    def system_note_infoprint( self , message ) :
-        print "MESSAGE : %s" % message
-
-def SystemNote ( context ) :
-    return Reporter()
-
index bddd462..e6ea402 100644 (file)
@@ -1,8 +1,5 @@
 
-try :
-    import osso
-except :
-    import osso_wrapper as osso
+import osso
 
 import time
 
index 33221b0..41cfda7 100644 (file)
@@ -1,8 +1,5 @@
 
-try :
-    import osso
-except :
-    import osso_wrapper as osso
+import osso
 
 import time