Add skeleton for oFono plugin
authorMarcel Holtmann <marcel@holtmann.org>
Wed, 13 May 2009 08:03:07 +0000 (01:03 -0700)
committerMarcel Holtmann <marcel@holtmann.org>
Wed, 13 May 2009 08:03:07 +0000 (01:03 -0700)
bootstrap-configure
configure.ac
plugins/Makefile.am
plugins/ofono.c [new file with mode: 0644]

index bef329d..ec0100a 100755 (executable)
@@ -21,6 +21,7 @@ fi
                --enable-ethernet=builtin \
                --enable-wifi=builtin \
                --enable-bluetooth=builtin \
+               --enable-ofono=builtin \
                --enable-modemmgr \
                --enable-udhcp=builtin \
                --enable-dhclient=builtin \
index 5ad8aa1..4e53981 100644 (file)
@@ -75,6 +75,12 @@ AC_ARG_ENABLE(bluetooth,
 AM_CONDITIONAL(BLUETOOTH, test "${enable_bluetooth}" != "no")
 AM_CONDITIONAL(BLUETOOTH_BUILTIN, test "${enable_bluetooth}" = "builtin")
 
+AC_ARG_ENABLE(ofono,
+       AC_HELP_STRING([--enable-ofono], [enable oFono support]),
+                       [enable_ofono=${enableval}], [enable_ofono="no"])
+AM_CONDITIONAL(OFONO, test "${enable_ofono}" != "no")
+AM_CONDITIONAL(OFONO_BUILTIN, test "${enable_ofono}" = "builtin")
+
 AC_ARG_ENABLE(modemmgr,
        AC_HELP_STRING([--enable-modemmgr], [enable Modem Manager support]),
                        [enable_modemmgr=${enableval}], [enable_modemmgr="no"])
index f3d6d1e..8427f7c 100644 (file)
@@ -48,6 +48,16 @@ bluetooth_la_LIBADD = @GDBUS_LIBS@
 endif
 endif
 
+if OFONO
+if OFONO_BUILTIN
+builtin_modules += ofono
+builtin_sources += ofono.c
+else
+plugin_LTLIBRARIES += ofono.la
+bluetooth_la_LIBADD = @GDBUS_LIBS@
+endif
+endif
+
 if MODEMMGR
 plugin_LTLIBRARIES += modemmgr.la
 modemmgr_la_LIBADD = @GDBUS_LIBS@
diff --git a/plugins/ofono.c b/plugins/ofono.c
new file mode 100644 (file)
index 0000000..2055c05
--- /dev/null
@@ -0,0 +1,39 @@
+/*
+ *
+ *  Connection Manager
+ *
+ *  Copyright (C) 2007-2009  Intel Corporation. All rights reserved.
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License version 2 as
+ *  published by the Free Software Foundation.
+ *
+ *  This program 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 General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+ *
+ */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#define CONNMAN_API_SUBJECT_TO_CHANGE
+#include <connman/plugin.h>
+
+static int ofono_init(void)
+{
+       return 0;
+}
+
+static void ofono_exit(void)
+{
+}
+
+CONNMAN_PLUGIN_DEFINE(ofono, "oFono telephony plugin", VERSION,
+               CONNMAN_PLUGIN_PRIORITY_DEFAULT, ofono_init, ofono_exit)