aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael 'Mickey' Lauer <mickey@vanille-media.de>2009-04-21 17:14:13 +0200
committerMichael 'Mickey' Lauer <mickey@vanille-media.de>2009-04-21 17:14:13 +0200
commita57f1513482a960807b0f10d265ee6886ebad999 (patch)
tree1716ecc3b039fcf7810afb60b13a46e34c48fb35
parent48fe1f80f786fc526619d31e69175efbc6b64d8b (diff)
downloadcornucopia-a57f1513482a960807b0f10d265ee6886ebad999.tar.gz
cornucopia-a57f1513482a960807b0f10d265ee6886ebad999.tar.bz2
cornucopia-a57f1513482a960807b0f10d265ee6886ebad999.zip
fsogsmd: Libgsm0710muxTransport now lives in its library
-rw-r--r--fsogsmd/configure.ac10
-rw-r--r--fsogsmd/src/lib/Makefile.am5
-rw-r--r--fsogsmd/src/lib/transport.vala67
-rw-r--r--fsogsmd/src/plugins/gsm_device/Makefile.am2
-rw-r--r--fsogsmd/src/plugins/modem_cinterion_mc75/Makefile.am1
-rw-r--r--fsogsmd/src/plugins/modem_singleline/Makefile.am1
-rw-r--r--fsogsmd/src/plugins/modem_ti_calypso/Makefile.am1
-rw-r--r--fsogsmd/tests/Makefile.am1
8 files changed, 87 insertions, 1 deletions
diff --git a/fsogsmd/configure.ac b/fsogsmd/configure.ac
index ac75e5a2..f712aa50 100644
--- a/fsogsmd/configure.ac
+++ b/fsogsmd/configure.ac
@@ -19,6 +19,7 @@ VALA_REQUIRED=0.6.0
GLIB_REQUIRED=2.18.0
DBUS_REQUIRED=1.2.1
DBUS_GLIB_REQUIRED=0.76
+GSMMUX_REQUIRED=0.3.4
FSO_REQUIRED=0.0.0.0
# vala
@@ -40,9 +41,16 @@ PKG_CHECK_MODULES(DBUS,
AC_SUBST(DBUS_CFLAGS)
AC_SUBST(DBUS_LIBS)
+# gsm0710mux
+PKG_CHECK_MODULES(GSMMUX,
+ gsm0710mux-1.0 >= $GSMMUX_REQUIRED)
+AC_SUBST(GSMMUX_CFLAGS)
+AC_SUBST(GSMMUX_LIBS)
+
# framework
PKG_CHECK_MODULES(FSO,
- fsoframework-2.0 >= $FSO_REQUIRED)
+ fsoframework-2.0 >= $FSO_REQUIRED
+ fsotransport-2.0 >= $FSO_REQUIRED)
AC_SUBST(FSO_CFLAGS)
AC_SUBST(FSO_LIBS)
diff --git a/fsogsmd/src/lib/Makefile.am b/fsogsmd/src/lib/Makefile.am
index 496bc31e..0e3b5193 100644
--- a/fsogsmd/src/lib/Makefile.am
+++ b/fsogsmd/src/lib/Makefile.am
@@ -6,6 +6,7 @@ AM_CPPFLAGS = \
-I$(top_srcdir) \
$(FSO_CFLAGS) \
$(GLIB_CFLAGS) \
+ $(GSMMUX_CFLAGS) \
$(NULL)
VALAC_ARGS = \
@@ -16,7 +17,9 @@ VALAC_ARGS = \
--pkg dbus-glib-1 \
--pkg glib-2.0 \
--pkg gio-2.0 \
+ --pkg gsm0710mux-1.0 \
--pkg fsoframework-2.0 \
+ --pkg fsotransport-2.0 \
--library fsogsm-2.0
BUILT_SOURCES = .vala.stamp fsogsm-2.0.vapi
@@ -34,6 +37,7 @@ libfsogsm_la_VALASOURCES = \
mediators.vala \
modem.vala \
parser.vala \
+ transport.vala \
$(NULL)
libfsogsm_la_SOURCES = \
@@ -55,6 +59,7 @@ $(BUILT_SOURCES): $(libfsogsm_la_VALASOURCES)
libfsogsm_la_LIBADD = \
$(FSO_LIBS) \
$(GLIB_LIBS) \
+ $(GSMMUX_LIBS) \
$(NULL)
vapidir = $(datadir)/vala/vapi
diff --git a/fsogsmd/src/lib/transport.vala b/fsogsmd/src/lib/transport.vala
new file mode 100644
index 00000000..8fc6c40c
--- /dev/null
+++ b/fsogsmd/src/lib/transport.vala
@@ -0,0 +1,67 @@
+/**
+ * Copyright (C) 2009 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;
+
+//===========================================================================
+public class LibGsm0710muxTransport : FsoFramework.BaseTransport
+//===========================================================================
+{
+ Gsm0710mux.Manager manager;
+ Gsm0710mux.ChannelInfo channelinfo;
+
+ public LibGsm0710muxTransport( int channel = 0 )
+ {
+ manager = new Gsm0710mux.Manager();
+ var version = manager.getVersion();
+ var hasAutoSession = manager.hasAutoSession();
+ assert( hasAutoSession ); // we do not support non-autosession yet
+
+ channelinfo.number = channel;
+
+ debug( "TransportLibGsm0710mux created, using libgsm0710mux version %s; autosession is %s".printf( version, hasAutoSession.to_string() ) );
+ }
+
+ public override bool open()
+ {
+ assert( readfunc != null );
+ assert( hupfunc != null );
+
+ channelinfo.type = Gsm0710mux.ChannelType.DELEGATE;
+ /*
+ channelinfo.readfunc = readfunc;
+ channelinfo.hupfunc = hupfunc;
+ */
+
+ /*
+ try
+ {
+ manager.allocChannel( ref channelinfo );
+ // ...
+ */
+
+ return false;
+ }
+
+ public override string repr()
+ {
+ return "<LibGsm0710muxTransport>";
+ }
+
+}
diff --git a/fsogsmd/src/plugins/gsm_device/Makefile.am b/fsogsmd/src/plugins/gsm_device/Makefile.am
index 8dd0d93f..3da19901 100644
--- a/fsogsmd/src/plugins/gsm_device/Makefile.am
+++ b/fsogsmd/src/plugins/gsm_device/Makefile.am
@@ -18,7 +18,9 @@ VALAC_ARGS = \
--pkg posix \
--pkg glib-2.0 \
--pkg dbus-glib-1 \
+ --pkg gsm0710mux-1.0 \
--pkg fsoframework-2.0 \
+ --pkg fsotransport-2.0 \
--pkg fsogsm-2.0
#
diff --git a/fsogsmd/src/plugins/modem_cinterion_mc75/Makefile.am b/fsogsmd/src/plugins/modem_cinterion_mc75/Makefile.am
index 15a53a6f..fa3d338f 100644
--- a/fsogsmd/src/plugins/modem_cinterion_mc75/Makefile.am
+++ b/fsogsmd/src/plugins/modem_cinterion_mc75/Makefile.am
@@ -19,6 +19,7 @@ VALAC_ARGS = \
--pkg glib-2.0 \
--pkg dbus-glib-1 \
--pkg fsoframework-2.0 \
+ --pkg fsotransport-2.0 \
--pkg fsogsm-2.0
#
diff --git a/fsogsmd/src/plugins/modem_singleline/Makefile.am b/fsogsmd/src/plugins/modem_singleline/Makefile.am
index c72f0489..238425ff 100644
--- a/fsogsmd/src/plugins/modem_singleline/Makefile.am
+++ b/fsogsmd/src/plugins/modem_singleline/Makefile.am
@@ -19,6 +19,7 @@ VALAC_ARGS = \
--pkg glib-2.0 \
--pkg dbus-glib-1 \
--pkg fsoframework-2.0 \
+ --pkg fsotransport-2.0 \
--pkg fsogsm-2.0
#
diff --git a/fsogsmd/src/plugins/modem_ti_calypso/Makefile.am b/fsogsmd/src/plugins/modem_ti_calypso/Makefile.am
index 9543f8a1..45eb0327 100644
--- a/fsogsmd/src/plugins/modem_ti_calypso/Makefile.am
+++ b/fsogsmd/src/plugins/modem_ti_calypso/Makefile.am
@@ -19,6 +19,7 @@ VALAC_ARGS = \
--pkg glib-2.0 \
--pkg dbus-glib-1 \
--pkg fsoframework-2.0 \
+ --pkg fsotransport-2.0 \
--pkg fsogsm-2.0
#
diff --git a/fsogsmd/tests/Makefile.am b/fsogsmd/tests/Makefile.am
index e8abb232..40224743 100644
--- a/fsogsmd/tests/Makefile.am
+++ b/fsogsmd/tests/Makefile.am
@@ -25,6 +25,7 @@ VALAC_ARGS = \
--pkg gio-2.0 \
--pkg dbus-glib-1 \
--pkg fsoframework-2.0 \
+ --pkg fsotransport-2.0 \
--pkg fsogsm-2.0
TEST_PROGS += testatcommand