summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon McVittie <simon.mcvittie@collabora.co.uk>2013-01-04 12:48:26 +0000
committerSimon McVittie <simon.mcvittie@collabora.co.uk>2013-01-04 12:48:26 +0000
commitd8af8813f74bbeacd3a3d3665aad9ac2ccb7b098 (patch)
tree494b08c2a504986ab9c31ddb292cccd56a85d04c
parente5ffaf2a2c442acfccacebf96cf177811c804c9a (diff)
Use GLib generic marshallers in Gibber, too
-rw-r--r--.gitignore3
-rw-r--r--lib/gibber/Makefile.am24
-rw-r--r--lib/gibber/gibber-bytestream-iface.c4
-rw-r--r--lib/gibber/gibber-bytestream-muc.c2
-rw-r--r--lib/gibber/gibber-bytestream-oob.c2
-rw-r--r--lib/gibber/gibber-file-transfer.c7
-rw-r--r--lib/gibber/gibber-listener.c5
-rw-r--r--lib/gibber/gibber-muc-connection.c7
-rw-r--r--lib/gibber/gibber-r-multicast-causal-transport.c5
-rw-r--r--lib/gibber/gibber-r-multicast-sender.c4
-rw-r--r--lib/gibber/gibber-transport.c4
11 files changed, 10 insertions, 57 deletions
diff --git a/.gitignore b/.gitignore
index 3a060a89..1b3ee818 100644
--- a/.gitignore
+++ b/.gitignore
@@ -96,9 +96,6 @@ lib/gibber/examples/test_{ssl,tcp}
tests/telepathy-salut-debug
install-sh
-lib/gibber/gibber-signals-marshal.c
-lib/gibber/gibber-signals-marshal.h
-lib/gibber/gibber-signals-marshal.list
lib/gibber/*-enumtypes.c
lib/gibber/*-enumtypes.h
lib/gibber/examples/test_ssl
diff --git a/lib/gibber/Makefile.am b/lib/gibber/Makefile.am
index d4425318..3d7bd0b5 100644
--- a/lib/gibber/Makefile.am
+++ b/lib/gibber/Makefile.am
@@ -5,9 +5,7 @@ noinst_LTLIBRARIES = libgibber.la
BUILT_SOURCES = \
gibber-file-transfer-enumtypes.c \
gibber-file-transfer-enumtypes.h \
- gibber-signals-marshal.list \
- gibber-signals-marshal.h \
- gibber-signals-marshal.c
+ $(NULL)
HANDWRITTEN_SOURCES = \
gibber-muc-connection.c \
@@ -69,26 +67,6 @@ CLEANFILES=$(BUILT_SOURCES)
dist-hook:
$(shell for x in $(BUILT_SOURCES); do rm -f $(distdir)/$$x ; done)
-gibber-signals-marshal.list: $(HANDWRITTEN_SOURCES) Makefile.am
- $(AM_V_GEN)( cd $(srcdir) && \
- sed -n -e 's/.*_gibber_signals_marshal_\([[:upper:][:digit:]]*__[[:upper:][:digit:]_]*\).*/\1/p' \
- $(HANDWRITTEN_SOURCES) ) \
- | sed -e 's/__/:/' -e 'y/_/,/' | sort -u > $@.tmp
- if cmp -s $@.tmp $@; then \
- rm $@.tmp; \
- else \
- mv $@.tmp $@; \
- fi
-
-%-signals-marshal.h: %-signals-marshal.list Makefile.am
- $(AM_V_GEN)glib-genmarshal --header --prefix=_$(subst -,_,$*)_signals_marshal $< > $@
-
-%-signals-marshal.c: %-signals-marshal.list Makefile.am
- $(AM_V_GEN){ echo '#include "$*-signals-marshal.h"' && \
- glib-genmarshal --body --prefix=_$(subst -,_,$*)_signals_marshal $< ; \
- } > $@
-
-
AM_CFLAGS = $(ERROR_CFLAGS) $(GCOV_CFLAGS) @GLIB_CFLAGS@ @LIBXML2_CFLAGS@ @WOCKY_CFLAGS@ @LIBSOUP_CFLAGS@
AM_LDFLAGS = $(GCOV_LIBS) @GLIB_LIBS@ @LIBXML2_LIBS@ @WOCKY_LIBS@ @LIBSOUP_LIBS@
diff --git a/lib/gibber/gibber-bytestream-iface.c b/lib/gibber/gibber-bytestream-iface.c
index b8ce0ed2..fb7317a7 100644
--- a/lib/gibber/gibber-bytestream-iface.c
+++ b/lib/gibber/gibber-bytestream-iface.c
@@ -18,7 +18,6 @@
*/
#include "gibber-bytestream-iface.h"
-#include "gibber-signals-marshal.h"
#include <glib.h>
@@ -134,8 +133,7 @@ gibber_bytestream_iface_base_init (gpointer klass)
G_TYPE_FROM_INTERFACE (klass),
G_SIGNAL_RUN_LAST | G_SIGNAL_DETAILED,
0,
- NULL, NULL,
- _gibber_signals_marshal_VOID__STRING_POINTER,
+ NULL, NULL, NULL,
G_TYPE_NONE, 2, G_TYPE_STRING, G_TYPE_POINTER);
g_signal_new ("state-changed",
diff --git a/lib/gibber/gibber-bytestream-muc.c b/lib/gibber/gibber-bytestream-muc.c
index 65569ab4..a947eb55 100644
--- a/lib/gibber/gibber-bytestream-muc.c
+++ b/lib/gibber/gibber-bytestream-muc.c
@@ -34,8 +34,6 @@
#define DEBUG_FLAG DEBUG_BYTESTREAM
#include "gibber-debug.h"
-#include "gibber-signals-marshal.h"
-
static void bytestream_iface_init (gpointer g_iface, gpointer iface_data);
G_DEFINE_TYPE_WITH_CODE (GibberBytestreamMuc, gibber_bytestream_muc,
diff --git a/lib/gibber/gibber-bytestream-oob.c b/lib/gibber/gibber-bytestream-oob.c
index 5a7494e6..43e6b5b6 100644
--- a/lib/gibber/gibber-bytestream-oob.c
+++ b/lib/gibber/gibber-bytestream-oob.c
@@ -41,8 +41,6 @@
#define DEBUG_FLAG DEBUG_BYTESTREAM
#include "gibber-debug.h"
-#include "gibber-signals-marshal.h"
-
static void
bytestream_iface_init (gpointer g_iface, gpointer iface_data);
diff --git a/lib/gibber/gibber-file-transfer.c b/lib/gibber/gibber-file-transfer.c
index b6647c23..dc42ff1c 100644
--- a/lib/gibber/gibber-file-transfer.c
+++ b/lib/gibber/gibber-file-transfer.c
@@ -28,7 +28,6 @@
#define DEBUG_FLAG DEBUG_FILE_TRANSFER
#include "gibber-debug.h"
-#include "gibber-signals-marshal.h"
#include "gibber-file-transfer-enumtypes.h"
@@ -301,15 +300,13 @@ gibber_file_transfer_class_init (GibberFileTransferClass *gibber_file_transfer_c
signals[ERROR] = g_signal_new ("error",
G_OBJECT_CLASS_TYPE (gibber_file_transfer_class),
G_SIGNAL_RUN_LAST | G_SIGNAL_DETAILED,
- 0, NULL, NULL,
- _gibber_signals_marshal_VOID__UINT_INT_STRING,
+ 0, NULL, NULL, NULL,
G_TYPE_NONE, 3, G_TYPE_UINT, G_TYPE_INT, G_TYPE_STRING);
signals[TRANSFERRED_CHUNK] = g_signal_new ("transferred-chunk",
G_OBJECT_CLASS_TYPE (gibber_file_transfer_class),
G_SIGNAL_RUN_LAST | G_SIGNAL_DETAILED,
- 0, NULL, NULL,
- _gibber_signals_marshal_VOID__UINT64,
+ 0, NULL, NULL, NULL,
G_TYPE_NONE, 1, G_TYPE_UINT64);
signals[CANCELLED] = g_signal_new ("cancelled",
diff --git a/lib/gibber/gibber-listener.c b/lib/gibber/gibber-listener.c
index a885294c..67ea9563 100644
--- a/lib/gibber/gibber-listener.c
+++ b/lib/gibber/gibber-listener.c
@@ -42,8 +42,6 @@
#define DEBUG_FLAG DEBUG_NET
#include "gibber-debug.h"
-#include "gibber-signals-marshal.h"
-
G_DEFINE_TYPE (GibberListener, gibber_listener, \
G_TYPE_OBJECT);
@@ -160,8 +158,7 @@ gibber_listener_class_init (
G_OBJECT_CLASS_TYPE (gibber_listener_class),
G_SIGNAL_RUN_LAST | G_SIGNAL_DETAILED,
0,
- NULL, NULL,
- _gibber_signals_marshal_VOID__OBJECT_POINTER_UINT,
+ NULL, NULL, NULL,
G_TYPE_NONE, 3, GIBBER_TYPE_TRANSPORT, G_TYPE_POINTER, G_TYPE_UINT);
}
diff --git a/lib/gibber/gibber-muc-connection.c b/lib/gibber/gibber-muc-connection.c
index eb233ac8..31f006c6 100644
--- a/lib/gibber/gibber-muc-connection.c
+++ b/lib/gibber/gibber-muc-connection.c
@@ -26,7 +26,6 @@
#include <sys/types.h>
#include "gibber-muc-connection.h"
-#include "gibber-signals-marshal.h"
#include "gibber-sockets.h"
#include "gibber-multicast-transport.h"
@@ -138,8 +137,7 @@ gibber_muc_connection_class_init (
G_OBJECT_CLASS_TYPE(gibber_muc_connection_class),
G_SIGNAL_RUN_LAST | G_SIGNAL_DETAILED,
0,
- NULL, NULL,
- _gibber_signals_marshal_VOID__STRING_OBJECT,
+ NULL, NULL, NULL,
G_TYPE_NONE, 2, G_TYPE_STRING, WOCKY_TYPE_STANZA);
/* UINT: 16 bit stream id
* POINTER: guint8 * data buffer
@@ -149,8 +147,7 @@ gibber_muc_connection_class_init (
G_OBJECT_CLASS_TYPE(gibber_muc_connection_class),
G_SIGNAL_RUN_LAST | G_SIGNAL_DETAILED,
0,
- NULL, NULL,
- _gibber_signals_marshal_VOID__STRING_UINT_POINTER_ULONG,
+ NULL, NULL, NULL,
G_TYPE_NONE, 4, G_TYPE_STRING,
G_TYPE_UINT, G_TYPE_POINTER, G_TYPE_ULONG);
diff --git a/lib/gibber/gibber-r-multicast-causal-transport.c b/lib/gibber/gibber-r-multicast-causal-transport.c
index 3cdb2a8d..d4036286 100644
--- a/lib/gibber/gibber-r-multicast-causal-transport.c
+++ b/lib/gibber/gibber-r-multicast-causal-transport.c
@@ -32,8 +32,6 @@
#include "gibber-r-multicast-packet.h"
#include "gibber-r-multicast-sender.h"
-#include "gibber-signals-marshal.h"
-
#define SESSION_TIMEOUT_MIN 1500
#define SESSION_TIMEOUT_MAX 3000
@@ -230,8 +228,7 @@ gibber_r_multicast_causal_transport_class_init (
G_OBJECT_CLASS_TYPE (gibber_r_multicast_causal_transport_class),
G_SIGNAL_RUN_LAST,
0,
- NULL, NULL,
- _gibber_signals_marshal_VOID__OBJECT_OBJECT,
+ NULL, NULL, NULL,
G_TYPE_NONE, 2, GIBBER_TYPE_R_MULTICAST_SENDER,
GIBBER_TYPE_R_MULTICAST_PACKET);
diff --git a/lib/gibber/gibber-r-multicast-sender.c b/lib/gibber/gibber-r-multicast-sender.c
index 936dd87b..1090247b 100644
--- a/lib/gibber/gibber-r-multicast-sender.c
+++ b/lib/gibber/gibber-r-multicast-sender.c
@@ -25,7 +25,6 @@
#include "gibber-r-multicast-sender.h"
#include "gibber-util.h"
-#include "gibber-signals-marshal.h"
#define DEBUG_FLAG DEBUG_RMULTICAST_SENDER
#include "gibber-debug.h"
@@ -725,8 +724,7 @@ gibber_r_multicast_sender_class_init (
G_OBJECT_CLASS_TYPE(gibber_r_multicast_sender_class),
G_SIGNAL_RUN_LAST | G_SIGNAL_DETAILED,
0,
- NULL, NULL,
- _gibber_signals_marshal_VOID__UINT_POINTER_ULONG,
+ NULL, NULL, NULL,
G_TYPE_NONE, 3, G_TYPE_UINT, G_TYPE_POINTER, G_TYPE_ULONG);
signals[RECEIVED_CONTROL_PACKET] = g_signal_new ("received-control-packet",
diff --git a/lib/gibber/gibber-transport.c b/lib/gibber/gibber-transport.c
index 82ad73b3..522f0fb1 100644
--- a/lib/gibber/gibber-transport.c
+++ b/lib/gibber/gibber-transport.c
@@ -23,7 +23,6 @@
#include <stdlib.h>
#include "gibber-transport.h"
-#include "gibber-signals-marshal.h"
#define DEBUG_FLAG DEBUG_TRANSPORT
#include "gibber-debug.h"
@@ -124,8 +123,7 @@ gibber_transport_class_init (GibberTransportClass *gibber_transport_class)
G_OBJECT_CLASS_TYPE (gibber_transport_class),
G_SIGNAL_RUN_LAST | G_SIGNAL_DETAILED,
0,
- NULL, NULL,
- _gibber_signals_marshal_VOID__UINT_INT_STRING,
+ NULL, NULL, NULL,
G_TYPE_NONE, 3, G_TYPE_UINT, G_TYPE_INT, G_TYPE_STRING);
}