Added D-Bus introspection XML for settingsd connman Agent.
authorOssama Othman <ossama.othman@intel.com>
Wed, 9 Oct 2013 06:30:29 +0000 (23:30 -0700)
committerOssama Othman <ossama.othman@intel.com>
Wed, 9 Oct 2013 06:30:29 +0000 (23:30 -0700)
Signed-off-by: Ossama Othman <ossama.othman@intel.com>
plugins/connman/Makefile.am
plugins/connman/agent.xml [new file with mode: 0644]

index 922f614..7f4f452 100644 (file)
@@ -20,8 +20,10 @@ pkglib_LTLIBRARIES = connman.la
 
 if SETTINGS_USE_GCC_SYMBOL_VISIBILITY
   IVI_SETTINGS_PLUGIN_CXXFLAGS = -fvisibility=hidden -fvisibility-inlines-hidden
+  IVI_SETTINGS_PLUGIN_CFLAGS   = -fvisibility=hidden
 else
   IVI_SETTINGS_PLUGIN_CXXFLAGS =
+  IVI_SETTINGS_PLUGIN_CFLAGS   =
 endif
 
 IVI_SETTINGS_PLUGIN_CPPFLAGS = \
@@ -40,11 +42,15 @@ connman_la_SOURCES =                \
        ethernet.cpp            \
        wifi.cpp                \
        registration.cpp        \
-       signal_callback.cpp
+       signal_callback.cpp     \
+       $(BUILT_SOURCES)
 connman_la_CXXFLAGS = \
-       $(IVI_SETTINGS_PLUGIN_CXXFLAGS) \
+       $(IVI_SETTINGS_PLUGIN_CXXFLAGS) \
        $(GIO_CFLAGS)                   \
        $(JSON_GLIB_CFLAGS)
+connman_la_CFLAGS =                    \
+       $(IVI_SETTINGS_PLUGIN_CFLAGS)   \
+       $(GIO_CFLAGS)
 connman_la_CPPFLAGS = $(IVI_SETTINGS_PLUGIN_CPPFLAGS) 
 connman_la_LIBADD   = $(IVI_SETTINGS_PLUGIN_LIBRARY)
 connman_la_LDFLAGS  = -no-undefined   \
@@ -54,6 +60,7 @@ connman_la_LDFLAGS  = -no-undefined   \
                       $(JSON_GLIB_LIBS)
 
 noinst_HEADERS =               \
+       config.h                \
        connman_api.hpp         \
        connman.hpp             \
        connman_manager.hpp     \
@@ -64,3 +71,23 @@ noinst_HEADERS =             \
        ethernet.hpp            \
        wifi.hpp                \
        signal_callback.hpp
+
+dbus_codegen_verbose = $(dbus_codegen_verbose_$(V))
+dbus_codegen_verbose_ = $(dbus_codegen_verbose_$(AM_DEFAULT_VERBOSITY))
+dbus_codegen_verbose_0 = @echo 'CODEGEN ' $@;
+
+## D-Bus glue code generation.
+%-glue.c %-glue.h: %.xml Makefile
+       $(dbus_codegen_verbose)gdbus-codegen --generate-c-code $*-glue  \
+              --interface-prefix net.connman. $<
+
+BUILT_SOURCES = \
+       agent-glue.c \
+       agent-glue.h
+
+CLEANFILES = $(BUILT_SOURCES)
+
+dist-hook:
+       cd $(distdir); rm -f $(BUILT_SOURCES)
+
+EXTRA_DIST = agent.xml
diff --git a/plugins/connman/agent.xml b/plugins/connman/agent.xml
new file mode 100644 (file)
index 0000000..1ba7ae2
--- /dev/null
@@ -0,0 +1,56 @@
+<!--
+    @file agent.xml
+
+    @brief Connman Agent interface introspection XML.
+
+    The introspection XML found in this file is used to generate GDBus
+    skeleton code that will be used by the settings daemon Connman
+    Agent implementation.  The Agent will be called by Connman when
+    connecting to secure and hidden WiFi access points.
+
+    @author Ossama Othman @<ossama.othman@@intel.com@>
+    @author Connman net.connman.Agent API defined in Connman
+            agent-api.txt file.
+
+    @copyright @par
+    Copyright 2013 Intel Corporation All Rights Reserved.
+    @par
+    This library is free software; you can redistribute it and/or
+    modify it under the terms of the GNU Lesser General Public
+    License as published by the Free Software Foundation;
+    version 2.1 of the License.
+    @par
+    This library is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+    Lesser General Public License for more details.
+    @par
+    You should have received a copy of the GNU Lesser General Public
+    License along with this library; if not, write to the Free
+    Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+    Boston, MA  02110-1301  USA  
+-->
+
+<!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN" "http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd">
+<node>
+  <interface name="net.connman.Agent">
+    <method name="Release"/>
+
+    <method name="ReportError">
+      <arg name="service" direction="in" type="o"/>
+      <arg name="error" direction="in" type="s"/>
+    </method>
+
+    <method name="RequestBrowser">
+      <arg name="service" direction="in" type="o"/>
+      <arg name="url" direction="in" type="s"/>
+    </method>
+
+    <method name="RequestInput">
+      <arg name="service" direction="in" type="o"/>
+      <arg name="fields" direction="in" type="a{sv}"/>
+    </method>
+
+    <method name="Cancel"/>
+  </interface>
+</node>