aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael 'Mickey' Lauer <mickey@vanille-media.de>2010-02-16 11:34:02 +0100
committerMichael 'Mickey' Lauer <mickey@vanille-media.de>2010-02-16 11:34:02 +0100
commit9a45c02934a1352745f1669a241841ab6f8849d5 (patch)
tree9836a71ecf55061eb634802315254e56e87688f7
parentdf6a5c9a9d99c75dee6bbdcdc39081e810cf4d10 (diff)
downloadcornucopia-9a45c02934a1352745f1669a241841ab6f8849d5.tar.gz
cornucopia-9a45c02934a1352745f1669a241841ab6f8849d5.tar.bz2
cornucopia-9a45c02934a1352745f1669a241841ab6f8849d5.zip
fsogsmd: create plugin skeletons for PDP handling
Depending on firmware and kernel support, different modems have different ways to handle PDP. While PPP is still the most common, it is fading out. For now we will support PPP, PPP_MUX, and PPP_QMI.
-rw-r--r--fsogsmd/NEWS12
-rw-r--r--fsogsmd/configure.ac8
-rw-r--r--fsogsmd/src/plugins/Makefile.am15
-rw-r--r--fsogsmd/src/plugins/pdp_ppp/Makefile.am48
-rw-r--r--fsogsmd/src/plugins/pdp_ppp/plugin.vala50
-rw-r--r--fsogsmd/src/plugins/pdp_ppp_mux/Makefile.am48
-rw-r--r--fsogsmd/src/plugins/pdp_ppp_mux/plugin.vala50
-rw-r--r--fsogsmd/src/plugins/pdp_qmi/Makefile.am48
-rw-r--r--fsogsmd/src/plugins/pdp_qmi/plugin.vala50
9 files changed, 314 insertions, 15 deletions
diff --git a/fsogsmd/NEWS b/fsogsmd/NEWS
index 784c0f87..e6767d2e 100644
--- a/fsogsmd/NEWS
+++ b/fsogsmd/NEWS
@@ -1,11 +1 @@
-fsogsmd 0.0.1.0
-===============
- * Basic structure with command queue, low level parser, modem abstraction, done.
- * Further work pending Vala support for async. dbus.
-
-fsogsmd 0.1.0.0
-===============
- * First bunch of AT mediators and commands implemented
- * Infrastructure for unsolicited result codes done
- * First bunch of dbus commands
-
+This file will be populated after the official releases start.
diff --git a/fsogsmd/configure.ac b/fsogsmd/configure.ac
index 8b038abd..ee1ba49d 100644
--- a/fsogsmd/configure.ac
+++ b/fsogsmd/configure.ac
@@ -94,7 +94,7 @@ AC_SUBST(FSO_LIBS)
##############################################################################
# optional feature: ppp
AC_ARG_ENABLE(ppp-support,
- [ --disable-ppp-support Disable building ppp plugin (default=enabled)],
+ [ --disable-ppp-support Disable building ppp support (default=enabled)],
ppp="no", ppp="yes")
if test "x$ppp" = "xyes"; then
@@ -182,6 +182,9 @@ AC_CONFIG_FILES([
src/plugins/modem_ti_calypso/Makefile
src/plugins/modem_qualcomm_htc/Makefile
src/plugins/modem_qualcomm_palm/Makefile
+ src/plugins/pdp_ppp/Makefile
+ src/plugins/pdp_ppp_mux/Makefile
+ src/plugins/pdp_qmi/Makefile
src/ppp/Makefile
tests/Makefile
])
@@ -199,7 +202,8 @@ echo "------------------------------------------------------------------------"
echo
echo "Configuration Options:"
echo
-echo " ppp2fsogsmd.............: $ppp"
+echo " ppp support.............: $ppp"
+echo " pdp_mux.................: $mux"
echo " modem_ti_calypso........: $mux"
echo " modem_cinterion_mc75....: $mux"
echo " modem_qualcomm_palm.....: $palm"
diff --git a/fsogsmd/src/plugins/Makefile.am b/fsogsmd/src/plugins/Makefile.am
index ca86a365..afd1d584 100644
--- a/fsogsmd/src/plugins/Makefile.am
+++ b/fsogsmd/src/plugins/Makefile.am
@@ -11,11 +11,22 @@ SUBDIRS = \
\
modem_singleline \
modem_qualcomm_htc \
+ \
+ pdp_qmi \
$(NULL)
+
+if WANT_PPP
+SUBDIRS += pdp_ppp
+if WANT_MUX
+SUBDIRS += pdp_ppp_mux
+endif
+endif
if WANT_MUX
-SUBDIRS += modem_ti_calypso modem_cinterion_mc75
-endif
+SUBDIRS += \
+ modem_ti_calypso \
+ modem_cinterion_mc75
+endif
if WANT_PALM
SUBDIRS += modem_qualcomm_palm
diff --git a/fsogsmd/src/plugins/pdp_ppp/Makefile.am b/fsogsmd/src/plugins/pdp_ppp/Makefile.am
new file mode 100644
index 00000000..a44bf732
--- /dev/null
+++ b/fsogsmd/src/plugins/pdp_ppp/Makefile.am
@@ -0,0 +1,48 @@
+include $(top_srcdir)/Makefile.decl
+
+NULL =
+
+AM_CPPFLAGS = \
+ -I$(top_srcdir)/src/lib \
+ -I$(top_srcdir)/src/3rdparty \
+ $(FSO_CFLAGS) \
+ $(NULL)
+
+noinst_PROGRAMS = $(TEST_PROGS)
+
+progs_ldadd = \
+ $(top_srcdir)/src/lib/libfsogsm.la \
+ $(FSO_LIBS) \
+ $(NULL)
+
+VALAC_ARGS = \
+ --basedir $(top_srcdir) \
+ --vapidir $(top_srcdir)/src/lib \
+ --pkg glib-2.0 \
+ --pkg fsoframework-2.0 \
+ --pkg fsogsm-2.0
+
+#
+# plugin
+#
+modlibexecdir = $(libdir)/cornucopia/modules/fsogsm
+modlibexec_LTLIBRARIES = pdp_ppp.la
+pdp_ppp_la_SOURCES = plugin.c
+pdp_ppp_la_VALASOURCES = plugin.vala
+$(pdp_ppp_la_SOURCES): $(pdp_ppp_la_VALASOURCES)
+ $(VALAC) -C $(VALAC_ARGS) $^
+ touch $@
+pdp_ppp_la_LIBADD = $(progs_ldadd)
+pdp_ppp_la_LDFLAGS = -no-undefined -module -avoid-version
+pdp_ppp_la_LIBTOOLFLAGS = --tag=disable-static
+
+CLEANFILES = \
+ plugin.c \
+ plugin.h \
+ *.la \
+ *.lo \
+ $(NULL)
+
+MAINTAINERCLEANFILES = \
+ Makefile.in \
+ $(NULL)
diff --git a/fsogsmd/src/plugins/pdp_ppp/plugin.vala b/fsogsmd/src/plugins/pdp_ppp/plugin.vala
new file mode 100644
index 00000000..5abbbd0a
--- /dev/null
+++ b/fsogsmd/src/plugins/pdp_ppp/plugin.vala
@@ -0,0 +1,50 @@
+/**
+ * Copyright (C) 2009-2010 Michael 'Mickey' Lauer <mlauer@vanille-media.de>
+ *
+ * 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; either
+ * version 2.1 of the License, or (at your option) any later version.
+
+ * 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.
+
+ * 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
+ *
+ */
+
+using GLib;
+
+using FsoGsm;
+
+class Pdp.Ppp : /* FsoGsm.PdpHandler, */ FsoFramework.AbstractObject
+{
+ public const string MODULE_NAME = "fsogsm.pdp_ppp";
+
+ public override string repr()
+ {
+ return "<>";
+ }
+}
+
+/**
+ * This function gets called on plugin initialization time.
+ * @return the name of your plugin here
+ * @note that it needs to be a name in the format <subsystem>.<plugin>
+ * else your module will be unloaded immediately.
+ **/
+public static string fso_factory_function( FsoFramework.Subsystem subsystem ) throws Error
+{
+ FsoFramework.theLogger.debug( "pdp_ppp fso_factory_function" );
+ return Pdp.Ppp.MODULE_NAME;
+}
+
+[ModuleInit]
+public static void fso_register_function( TypeModule module )
+{
+ // do not remove this function
+}
diff --git a/fsogsmd/src/plugins/pdp_ppp_mux/Makefile.am b/fsogsmd/src/plugins/pdp_ppp_mux/Makefile.am
new file mode 100644
index 00000000..3fe36f98
--- /dev/null
+++ b/fsogsmd/src/plugins/pdp_ppp_mux/Makefile.am
@@ -0,0 +1,48 @@
+include $(top_srcdir)/Makefile.decl
+
+NULL =
+
+AM_CPPFLAGS = \
+ -I$(top_srcdir)/src/lib \
+ -I$(top_srcdir)/src/3rdparty \
+ $(FSO_CFLAGS) \
+ $(NULL)
+
+noinst_PROGRAMS = $(TEST_PROGS)
+
+progs_ldadd = \
+ $(top_srcdir)/src/lib/libfsogsm.la \
+ $(FSO_LIBS) \
+ $(NULL)
+
+VALAC_ARGS = \
+ --basedir $(top_srcdir) \
+ --vapidir $(top_srcdir)/src/lib \
+ --pkg glib-2.0 \
+ --pkg fsoframework-2.0 \
+ --pkg fsogsm-2.0
+
+#
+# plugin
+#
+modlibexecdir = $(libdir)/cornucopia/modules/fsogsm
+modlibexec_LTLIBRARIES = pdp_ppp_mux.la
+pdp_ppp_mux_la_SOURCES = plugin.c
+pdp_ppp_mux_la_VALASOURCES = plugin.vala
+$(pdp_ppp_mux_la_SOURCES): $(pdp_ppp_mux_la_VALASOURCES)
+ $(VALAC) -C $(VALAC_ARGS) $^
+ touch $@
+pdp_ppp_mux_la_LIBADD = $(progs_ldadd)
+pdp_ppp_mux_la_LDFLAGS = -no-undefined -module -avoid-version
+pdp_ppp_mux_la_LIBTOOLFLAGS = --tag=disable-static
+
+CLEANFILES = \
+ plugin.c \
+ plugin.h \
+ *.la \
+ *.lo \
+ $(NULL)
+
+MAINTAINERCLEANFILES = \
+ Makefile.in \
+ $(NULL)
diff --git a/fsogsmd/src/plugins/pdp_ppp_mux/plugin.vala b/fsogsmd/src/plugins/pdp_ppp_mux/plugin.vala
new file mode 100644
index 00000000..c4091397
--- /dev/null
+++ b/fsogsmd/src/plugins/pdp_ppp_mux/plugin.vala
@@ -0,0 +1,50 @@
+/**
+ * Copyright (C) 2009-2010 Michael 'Mickey' Lauer <mlauer@vanille-media.de>
+ *
+ * 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; either
+ * version 2.1 of the License, or (at your option) any later version.
+
+ * 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.
+
+ * 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
+ *
+ */
+
+using GLib;
+
+using FsoGsm;
+
+class Pdp.PppMux : /* FsoGsm.PdpHandler, */ FsoFramework.AbstractObject
+{
+ public const string MODULE_NAME = "fsogsm.pdp_ppp_mux";
+
+ public override string repr()
+ {
+ return "<>";
+ }
+}
+
+/**
+ * This function gets called on plugin initialization time.
+ * @return the name of your plugin here
+ * @note that it needs to be a name in the format <subsystem>.<plugin>
+ * else your module will be unloaded immediately.
+ **/
+public static string fso_factory_function( FsoFramework.Subsystem subsystem ) throws Error
+{
+ FsoFramework.theLogger.debug( "pdp_ppp_mux fso_factory_function" );
+ return Pdp.PppMux.MODULE_NAME;
+}
+
+[ModuleInit]
+public static void fso_register_function( TypeModule module )
+{
+ // do not remove this function
+}
diff --git a/fsogsmd/src/plugins/pdp_qmi/Makefile.am b/fsogsmd/src/plugins/pdp_qmi/Makefile.am
new file mode 100644
index 00000000..7847ed75
--- /dev/null
+++ b/fsogsmd/src/plugins/pdp_qmi/Makefile.am
@@ -0,0 +1,48 @@
+include $(top_srcdir)/Makefile.decl
+
+NULL =
+
+AM_CPPFLAGS = \
+ -I$(top_srcdir)/src/lib \
+ -I$(top_srcdir)/src/3rdparty \
+ $(FSO_CFLAGS) \
+ $(NULL)
+
+noinst_PROGRAMS = $(TEST_PROGS)
+
+progs_ldadd = \
+ $(top_srcdir)/src/lib/libfsogsm.la \
+ $(FSO_LIBS) \
+ $(NULL)
+
+VALAC_ARGS = \
+ --basedir $(top_srcdir) \
+ --vapidir $(top_srcdir)/src/lib \
+ --pkg glib-2.0 \
+ --pkg fsoframework-2.0 \
+ --pkg fsogsm-2.0
+
+#
+# plugin
+#
+modlibexecdir = $(libdir)/cornucopia/modules/fsogsm
+modlibexec_LTLIBRARIES = pdp_qmi.la
+pdp_qmi_la_SOURCES = plugin.c
+pdp_qmi_la_VALASOURCES = plugin.vala
+$(pdp_qmi_la_SOURCES): $(pdp_qmi_la_VALASOURCES)
+ $(VALAC) -C $(VALAC_ARGS) $^
+ touch $@
+pdp_qmi_la_LIBADD = $(progs_ldadd)
+pdp_qmi_la_LDFLAGS = -no-undefined -module -avoid-version
+pdp_qmi_la_LIBTOOLFLAGS = --tag=disable-static
+
+CLEANFILES = \
+ plugin.c \
+ plugin.h \
+ *.la \
+ *.lo \
+ $(NULL)
+
+MAINTAINERCLEANFILES = \
+ Makefile.in \
+ $(NULL)
diff --git a/fsogsmd/src/plugins/pdp_qmi/plugin.vala b/fsogsmd/src/plugins/pdp_qmi/plugin.vala
new file mode 100644
index 00000000..72a7ae24
--- /dev/null
+++ b/fsogsmd/src/plugins/pdp_qmi/plugin.vala
@@ -0,0 +1,50 @@
+/**
+ * Copyright (C) 2009-2010 Michael 'Mickey' Lauer <mlauer@vanille-media.de>
+ *
+ * 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; either
+ * version 2.1 of the License, or (at your option) any later version.
+
+ * 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.
+
+ * 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
+ *
+ */
+
+using GLib;
+
+using FsoGsm;
+
+class Pdp.Qmi : /* FsoGsm.PdpHandler, */ FsoFramework.AbstractObject
+{
+ public const string MODULE_NAME = "fsogsm.pdp_qmi";
+
+ public override string repr()
+ {
+ return "<>";
+ }
+}
+
+/**
+ * This function gets called on plugin initialization time.
+ * @return the name of your plugin here
+ * @note that it needs to be a name in the format <subsystem>.<plugin>
+ * else your module will be unloaded immediately.
+ **/
+public static string fso_factory_function( FsoFramework.Subsystem subsystem ) throws Error
+{
+ FsoFramework.theLogger.debug( "pdp_qmi fso_factory_function" );
+ return Pdp.Qmi.MODULE_NAME;
+}
+
+[ModuleInit]
+public static void fso_register_function( TypeModule module )
+{
+ // do not remove this function
+}