From 93fa0300df9834e655d384b980bd07f9fcf56d05 Mon Sep 17 00:00:00 2001 From: Marcel Holtmann Date: Tue, 30 Jun 2009 13:40:05 -0700 Subject: [PATCH] Add skeleton for Ericsson MBM device plugin --- bootstrap-configure | 1 + configure.ac | 6 ++++++ plugins/Makefile.am | 14 ++++++++++++++ plugins/mbm.c | 39 +++++++++++++++++++++++++++++++++++++++ 4 files changed, 60 insertions(+) create mode 100644 plugins/mbm.c diff --git a/bootstrap-configure b/bootstrap-configure index 541d663..236579d 100755 --- a/bootstrap-configure +++ b/bootstrap-configure @@ -29,6 +29,7 @@ fi --enable-novatel \ --enable-huawei \ --enable-hso=builtin \ + --enable-mbm=builtin \ --enable-ppp \ --enable-udev \ --enable-iwmx \ diff --git a/configure.ac b/configure.ac index 5f835b1..776afd0 100644 --- a/configure.ac +++ b/configure.ac @@ -162,6 +162,12 @@ AC_ARG_ENABLE(hso, AM_CONDITIONAL(HSO, test "${enable_hso}" != "no") AM_CONDITIONAL(HSO_BUILTIN, test "${enable_hso}" = "builtin") +AC_ARG_ENABLE(mbm, + AC_HELP_STRING([--enable-mbm], [enable MBM support]), + [enable_mbm=${enableval}], [enable_mbm="no"]) +AM_CONDITIONAL(MBM, test "${enable_mbm}" != "no") +AM_CONDITIONAL(MBM_BUILTIN, test "${enable_mbm}" = "builtin") + AC_ARG_WITH(pppd, AC_HELP_STRING([--with-pppd=PROGRAM], [specify location of pppd binary]), [path_pppd=${withval}]) diff --git a/plugins/Makefile.am b/plugins/Makefile.am index 8c315e5..2b92b07 100644 --- a/plugins/Makefile.am +++ b/plugins/Makefile.am @@ -93,6 +93,20 @@ hso_la_CFLAGS = $(AM_CFLAGS) @GATCHAT_CFLAGS@ endif endif +if MBM +if MBM_BUILTIN +builtin_modules += mbm +builtin_sources += mbm.c +builtin_libadd += @GATCHAT_LIBS@ +builtin_cflags += @GATCHAT_CFLAGS@ +else +plugin_LTLIBRARIES += mbm.la +mbm_la_SOURCES = mbm.c +mbm_la_LIBADD = @GATCHAT_LIBS@ +mbm_la_CFLAGS = $(AM_CFLAGS) @GATCHAT_CFLAGS@ +endif +endif + if UDHCP if UDHCP_BUILTIN builtin_modules += udhcp diff --git a/plugins/mbm.c b/plugins/mbm.c new file mode 100644 index 0000000..b997b16 --- /dev/null +++ b/plugins/mbm.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 mbm_init(void) +{ + return 0; +} + +static void mbm_exit(void) +{ +} + +CONNMAN_PLUGIN_DEFINE(mbm, "Ericsson MBM device plugin", VERSION, + CONNMAN_PLUGIN_PRIORITY_DEFAULT, mbm_init, mbm_exit) -- 2.7.4