aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTambet Ingo <tambet@gmail.com>2008-09-16 13:03:38 +0300
committerTambet Ingo <tambet@gmail.com>2008-09-16 13:10:44 +0300
commitda3bbdc893b43c52dec20216945a572632c56806 (patch)
tree757e97e6930725231239a130876d18076b63c858
parente0c720e19c02c43c56f09be9de09cc90d46543a3 (diff)
Add marshallers so that RegistrationInfo signal can be enabled.
-rw-r--r--.gitignore3
-rw-r--r--Makefile.am2
-rw-r--r--configure.in4
-rw-r--r--marshallers/Makefile.am21
-rw-r--r--marshallers/mm-marshal-main.c2
-rw-r--r--marshallers/mm-marshal.list1
-rw-r--r--src/Makefile.am4
-rw-r--r--src/mm-modem-gsm-network.c4
-rw-r--r--src/mm-serial.c2
-rwxr-xr-xtest/mm-test.py2
10 files changed, 38 insertions, 7 deletions
diff --git a/.gitignore b/.gitignore
index 066c0c06..21592d41 100644
--- a/.gitignore
+++ b/.gitignore
@@ -15,12 +15,13 @@ stamp-h1
*.o
*.lo
*.la
+*.loT
libtool
.deps
.libs
*-glue.h
org.freedesktop.ModemManager.service
ModemManager.pc
+marshallers/mm-marshal.[ch]
src/modem-manager
docs/spec.html
-
diff --git a/Makefile.am b/Makefile.am
index 28a8b1b2..f7e7f7de 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -20,7 +20,7 @@ clean:
rm -f $(GENERATED_FILES)
endif
-SUBDIRS = src plugins introspection test
+SUBDIRS = marshallers src plugins introspection test
dbusservicedir = $(DBUS_SYS_DIR)
dbusservice_DATA = org.freedesktop.ModemManager.conf
diff --git a/configure.in b/configure.in
index f802dd36..cba00dce 100644
--- a/configure.in
+++ b/configure.in
@@ -23,6 +23,9 @@ else
fi
AC_SUBST(DBUS_SYS_DIR)
+GLIB_GENMARSHAL=`pkg-config --variable=glib_genmarshal glib-2.0`
+AC_SUBST(GLIB_GENMARSHAL)
+
AC_ARG_WITH(docs, AC_HELP_STRING([--with-docs], [Build ModemManager documentation]))
AM_CONDITIONAL(WITH_DOCS, test "x$with_docs" = "xyes")
case $with_docs in
@@ -34,6 +37,7 @@ esac
AC_CONFIG_FILES([
Makefile
+marshallers/Makefile
src/Makefile
plugins/Makefile
test/Makefile
diff --git a/marshallers/Makefile.am b/marshallers/Makefile.am
new file mode 100644
index 00000000..11ce370a
--- /dev/null
+++ b/marshallers/Makefile.am
@@ -0,0 +1,21 @@
+noinst_LTLIBRARIES = libmarshallers.la
+
+BUILT_SOURCES = \
+ mm-marshal.h \
+ mm-marshal.c
+
+libmarshallers_la_SOURCES = mm-marshal-main.c
+
+EXTRA_DIST = mm-marshal.list
+CLEANFILES = $(BUILT_SOURCES)
+
+libmarshallers_la_CPPFLAGS = $(MM_CFLAGS)
+libmarshallers_la_LIBADD = $(MM_LIBS)
+
+mm-marshal.h: mm-marshal.list
+ $(GLIB_GENMARSHAL) $< --prefix=mm_marshal --header > $@
+
+mm-marshal.c: mm-marshal.list
+ $(GLIB_GENMARSHAL) $< --prefix=mm_marshal --body > $@
+
+mm-marshal-main.c: mm-marshal.c mm-marshal.h
diff --git a/marshallers/mm-marshal-main.c b/marshallers/mm-marshal-main.c
new file mode 100644
index 00000000..01e9c815
--- /dev/null
+++ b/marshallers/mm-marshal-main.c
@@ -0,0 +1,2 @@
+#include "mm-marshal.h"
+#include "mm-marshal.c"
diff --git a/marshallers/mm-marshal.list b/marshallers/mm-marshal.list
new file mode 100644
index 00000000..0ef23b37
--- /dev/null
+++ b/marshallers/mm-marshal.list
@@ -0,0 +1 @@
+VOID:UINT,STRING,STRING
diff --git a/src/Makefile.am b/src/Makefile.am
index f0204704..8896e47e 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -2,10 +2,12 @@ sbin_PROGRAMS = modem-manager
modem_manager_CPPFLAGS = \
$(MM_CFLAGS) \
+ -I${top_builddir}/marshallers \
-DPLUGINDIR=\"$(pkglibdir)\"
modem_manager_LDADD = \
- $(MM_LIBS)
+ $(MM_LIBS) \
+ $(top_builddir)/marshallers/libmarshallers.la
modem_manager_SOURCES = \
main.c \
diff --git a/src/mm-modem-gsm-network.c b/src/mm-modem-gsm-network.c
index 7e170803..d7f52b7f 100644
--- a/src/mm-modem-gsm-network.c
+++ b/src/mm-modem-gsm-network.c
@@ -6,6 +6,7 @@
#include "mm-modem-gsm-network.h"
#include "mm-errors.h"
#include "mm-callback-info.h"
+#include "mm-marshal.h"
static void impl_gsm_modem_register (MMModemGsmNetwork *modem,
const char *network_id,
@@ -451,8 +452,6 @@ mm_modem_gsm_network_init (gpointer g_iface)
G_TYPE_NONE, 1,
G_TYPE_UINT);
- /* FIXME */
-#if 0
signals[REGISTRATION_INFO] =
g_signal_new ("registration-info",
iface_type,
@@ -462,7 +461,6 @@ mm_modem_gsm_network_init (gpointer g_iface)
mm_marshal_VOID__UINT_STRING_STRING,
G_TYPE_NONE, 3,
G_TYPE_UINT, G_TYPE_STRING, G_TYPE_STRING);
-#endif
signals[NETWORK_MODE] =
g_signal_new ("network-mode",
diff --git a/src/mm-serial.c b/src/mm-serial.c
index 353c5af5..103ef7f7 100644
--- a/src/mm-serial.c
+++ b/src/mm-serial.c
@@ -387,7 +387,7 @@ mm_serial_timed_out (gpointer data)
"Serial command timed out");
/* FIXME: This is not completely correct - if the response finally arrives and there's
some other command waiting for response right now, the other command will
- get the output of the timed out command. Maybe flashing would help here? */
+ get the output of the timed out command. Not sure what to do here. */
mm_serial_got_response (self, error);
return FALSE;
diff --git a/test/mm-test.py b/test/mm-test.py
index f6b24d27..e27b3e23 100755
--- a/test/mm-test.py
+++ b/test/mm-test.py
@@ -8,6 +8,8 @@ MM_DBUS_SERVICE='org.freedesktop.ModemManager'
MM_DBUS_PATH='/org/freedesktop/ModemManager'
MM_DBUS_INTERFACE='org.freedesktop.ModemManager'
MM_DBUS_INTERFACE_MODEM='org.freedesktop.ModemManager.Modem'
+MM_DBUS_INTERFACE_MODEM_GSM_CARD='org.freedesktop.ModemManager.Modem.Gsm.Card'
+MM_DBUS_INTERFACE_MODEM_GSM_NETWORK='org.freedesktop.ModemManager.Modem.Gsm.Network'
bus = dbus.SystemBus()
manager_proxy = bus.get_object(MM_DBUS_SERVICE, MM_DBUS_PATH)