Add marshallers so that RegistrationInfo signal can be enabled.

This commit is contained in:
Tambet Ingo
2008-09-16 13:10:44 +03:00
parent e0c720e19c
commit da3bbdc893
10 changed files with 38 additions and 7 deletions
+2 -1
View File
@@ -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
+1 -1
View File
@@ -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
+4
View File
@@ -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
+21
View File
@@ -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
+2
View File
@@ -0,0 +1,2 @@
#include "mm-marshal.h"
#include "mm-marshal.c"
+1
View File
@@ -0,0 +1 @@
VOID:UINT,STRING,STRING
+3 -1
View File
@@ -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 \
+1 -3
View File
@@ -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",
+1 -1
View File
@@ -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;
+2
View File
@@ -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)