--- /dev/null
+#!/usr/bin/python2.5
+
+import osso
+import gtk
+
+introspection = """<!DOCTYPE node PUBLIC \"-//freedesktop//DTD D-BUS Object Introspection 1.0//EN\"\n\
+ \"http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd\">\n\
+<node name=\"/org/javiplx/wifiscan\">\n\
+ <interface name=\"org.javiplx.wifiscan\">\n\
+ <method name=\"wakeup\">\n\
+ <arg name=\"result\" type=\"s\" direction=\"out\" />\n\
+ </method>\n\
+ <method name=\"start\">\n\
+ <arg name=\"result\" type=\"s\" direction=\"out\" />\n\
+ </method>\n\
+ <method name=\"scan\">\n\
+ <arg name=\"result\" type=\"s\" direction=\"out\" />\n\
+ </method>\n\
+ <method name=\"stop\">\n\
+ <arg name=\"result\" type=\"s\" direction=\"out\" />\n\
+ </method>\n\
+ </interface>\n\
+</node>\n"""
+
+__version__ = "1.1"
+
+name = "wifiscan"
+service = "org.javiplx." + name
+object = "/org/javiplx/" + name
+iface = "org.javiplx." + name
+
+def dbus_req_handler(interface, method, arguments, user_data):
+ if method == "Introspect" :
+ return introspection
+ if method == "wakeup" :
+ return "WifiScand ready"
+ if method == "start" :
+ return "Interface initialized"
+ if method == "stop" :
+ gtk.main_quit()
+ return
+ if method == "scan" :
+ print "return 00:1C:C0:CB:1A:72:-80"
+ return "00:1C:C0:CB:1A:72:-80"
+ return "Unknown method"
+
+osso_c = osso.Context(name, __version__, False)
+
+osso_rpc = osso.Rpc(osso_c)
+osso_rpc.set_rpc_callback(service, object, iface, dbus_req_handler, ( "wlan0" , osso_c ) )
+gtk.main()
+