--- /dev/null
+<!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN"
+ "http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd">
+<node name="/org/javiplx/wifiscan">
+ <interface name="org.javiplx.wifiscan">
+ <method name="wakeup">
+ <arg name="result" type="s" direction="out" />
+ </method>
+ <method name="start">
+ <arg name="result" type="s" direction="out" />
+ </method>
+ <method name="scan">
+ <arg name="result" type="s" direction="out" />
+ </method>
+ <method name="stop">
+ <arg name="result" type="s" direction="out" />
+ </method>
+ </interface>
+</node>
#include <glib.h>
#include <dbus/dbus.h>
+#define WIFISCAN_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"
+
#define OSSO_OK 0
#define OSSO_ERROR 1
retval->value.s = (gchar*) malloc( sizeof(gchar *) );
retval->value.s[0] = '\0';
+ if ( strcmp(method,"Introspect")==0 ) {
+ retval->value.s = (gchar *) realloc(retval->value.s,630*sizeof(gchar *));
+ snprintf(retval->value.s,strlen(WIFISCAN_INTROSPECTION),WIFISCAN_INTROSPECTION);
+ return OSSO_OK;
+ }
+
if ( strcmp(method,"wakeup")==0 ) {
retval->value.s = (gchar *) realloc(retval->value.s,16*sizeof(gchar *));
snprintf(retval->value.s,16,"WifiScand ready");