From f6107e88c8d93b2354278b16020d60ab038bc993 Mon Sep 17 00:00:00 2001 From: Marcel Holtmann Date: Wed, 13 May 2009 01:03:07 -0700 Subject: [PATCH] Add skeleton for oFono plugin --- bootstrap-configure | 1 + configure.ac | 6 ++++++ plugins/Makefile.am | 10 ++++++++++ plugins/ofono.c | 39 +++++++++++++++++++++++++++++++++++++++ 4 files changed, 56 insertions(+) create mode 100644 plugins/ofono.c diff --git a/bootstrap-configure b/bootstrap-configure index bef329d..ec0100a 100755 --- a/bootstrap-configure +++ b/bootstrap-configure @@ -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 \ diff --git a/configure.ac b/configure.ac index 5ad8aa1..4e53981 100644 --- a/configure.ac +++ b/configure.ac @@ -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"]) diff --git a/plugins/Makefile.am b/plugins/Makefile.am index f3d6d1e..8427f7c 100644 --- a/plugins/Makefile.am +++ b/plugins/Makefile.am @@ -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 index 0000000..2055c05 --- /dev/null +++ b/plugins/ofono.c @@ -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 +#endif + +#define CONNMAN_API_SUBJECT_TO_CHANGE +#include + +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) -- 2.7.4