Add skeleton for Modem Manager plugin
authorMarcel Holtmann <marcel@holtmann.org>
Sat, 18 Apr 2009 20:46:00 +0000 (22:46 +0200)
committerMarcel Holtmann <marcel@holtmann.org>
Sat, 18 Apr 2009 20:46:00 +0000 (22:46 +0200)
bootstrap-configure
configure.ac
plugins/Makefile.am
plugins/modemmgr.c [new file with mode: 0644]

index ac7d8bd..49e5a64 100755 (executable)
@@ -21,6 +21,7 @@ fi
                --enable-ethernet \
                --enable-wifi \
                --enable-bluetooth \
+               --enable-modemmgr \
                --enable-udhcp \
                --enable-dhclient \
                --enable-resolvconf \
index 80c4611..ba28251 100644 (file)
@@ -66,6 +66,10 @@ AC_ARG_ENABLE(bluetooth, AC_HELP_STRING([--enable-bluetooth],
                [enable Bluetooth support]), [enable_bluetooth=${enableval}])
 AM_CONDITIONAL(BLUETOOTH, test "${enable_bluetooth}" = "yes")
 
+AC_ARG_ENABLE(modemmgr, AC_HELP_STRING([--enable-modemmgr],
+                [enable Modem Manager support]), [enable_modemmgr=${enableval}])
+AM_CONDITIONAL(MODEMMGR, test "${enable_modemmgr}" = "yes")
+
 AC_ARG_WITH(udhcpc, AC_HELP_STRING([--with-udhcpc=PROGRAM],
        [specify location of udhcpc binary]), [path_udhcpc=${withval}])
 
index df912bd..db3977f 100644 (file)
@@ -27,6 +27,12 @@ bluetooth_la_SOURCES = bluetooth.c inet.h inet.c
 bluetooth_la_LIBADD = @GDBUS_LIBS@
 endif
 
+if MODEMMGR
+plugin_LTLIBRARIES += modemmgr.la
+
+modemmgr_la_LIBADD = @GDBUS_LIBS@
+endif
+
 if NOVATEL
 plugin_LTLIBRARIES += novatel.la
 
diff --git a/plugins/modemmgr.c b/plugins/modemmgr.c
new file mode 100644 (file)
index 0000000..9a22684
--- /dev/null
@@ -0,0 +1,40 @@
+/*
+ *
+ *  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>
+#include <connman/log.h>
+
+static int modemmgr_init(void)
+{
+       return 0;
+}
+
+static void modemmgr_exit(void)
+{
+}
+
+CONNMAN_PLUGIN_DEFINE(modemmgr, "Modem Manager plugin", VERSION,
+               CONNMAN_PLUGIN_PRIORITY_DEFAULT, modemmgr_init, modemmgr_exit)