Added D-Bus introspection XML for settingsd connman Agent. 75/10975/1
authorOssama Othman <ossama.othman@intel.com>
Tue, 15 Oct 2013 20:29:41 +0000 (13:29 -0700)
committerOssama Othman <ossama.othman@intel.com>
Tue, 15 Oct 2013 20:29:41 +0000 (13:29 -0700)
Change-Id: I47a43428741b33e2918c4a5fc5e6418894427773
Signed-off-by: Ossama Othman <ossama.othman@intel.com>
.gitignore
plugins/connman/Makefile.am
plugins/connman/agent.xml [new file with mode: 0644]
plugins/connman/config.h [new file with mode: 0644]

index 6d23065..08376aa 100644 (file)
@@ -27,7 +27,7 @@ etc/settingsd.conf
 src/settingsd
 tests/settings_test
 config.*
-!src/config.h
+!plugins/connman/config.h
 !packaging/settingsd.socket
 *.tar.*
 docs
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>
diff --git a/plugins/connman/config.h b/plugins/connman/config.h
new file mode 100644 (file)
index 0000000..ca39022
--- /dev/null
@@ -0,0 +1,32 @@
+/**
+ * @file config.h
+ *
+ * @brief Dummy config header.
+ *
+ * This dummy configuration header merely exists to satisfy a
+ * dependency in glue code generated by @c gdbus-codegen.  None of the
+ * preprocessor symbol definitions generated by the configure script
+ * are needed by the generated glue code.
+ *
+ * @author Ossama Othman @<ossama.othman@@intel.com@>
+ *
+ * @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
+ *
+ * @note This header is internal.
+ */