summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArnel A. Borja <arnelborja@src.gnome.org>2013-08-31 01:24:55 +0800
committerArnel A. Borja <arnelborja@src.gnome.org>2013-08-31 01:29:11 +0800
commit8ee1bc3bc614a7ea19327650bd9fbd493b398688 (patch)
tree800bb90af988133ca72ab6c87e250ca5afe905fb
parentc2fcedd9d199ff27f68a6a9e303c519954712d99 (diff)
downloadlibmediaart-8ee1bc3bc614a7ea19327650bd9fbd493b398688.tar.gz
libmediaart: Add marshaler
-rw-r--r--configure.ac3
-rw-r--r--libmediaart/Makefile.am22
-rw-r--r--libmediaart/marshal.list2
-rw-r--r--libmediaart/tracker-storage.c6
4 files changed, 29 insertions, 4 deletions
diff --git a/configure.ac b/configure.ac
index 9015d84..36cb95e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -146,6 +146,9 @@ TRACKER_REQUIRED=0.16.0
LIBMEDIAART_REQUIRED="glib-2.0 >= $GLIB_REQUIRED tracker-sparql-0.16 >= $TRACKER_REQUIRED"
PKG_CHECK_MODULES(LIBMEDIAART, [$LIBMEDIAART_REQUIRED])
+GLIB_GENMARSHAL=`$PKG_CONFIG glib-2.0 --variable=glib_genmarshal`
+AC_SUBST(GLIB_GENMARSHAL)
+
LIBMEDIAART_LIBS="$LIBMEDIAART_LIBS -lz -lm"
####################################################################
diff --git a/libmediaart/Makefile.am b/libmediaart/Makefile.am
index 55931c1..908b01c 100644
--- a/libmediaart/Makefile.am
+++ b/libmediaart/Makefile.am
@@ -27,6 +27,8 @@ libmediaartinclude_HEADERS = \
libmediaart_@LIBMEDIAART_API_VERSION@_la_SOURCES = \
$(libmediaart_sources) \
+ marshal.c \
+ marshal.h \
tracker-storage.c \
tracker-storage.h
@@ -49,6 +51,24 @@ libmediaart_@LIBMEDIAART_API_VERSION@_la_LIBADD = \
$(LIBMEDIAART_LIBS)
+marshal.h: marshal.list
+ $(AM_V_GEN)$(GLIB_GENMARSHAL) $< --prefix=media_art_marshal --header > $@
+
+marshal.c: marshal.list
+ $(AM_V_GEN)(echo "#include \"marshal.h\""; \
+ $(GLIB_GENMARSHAL) $< --prefix=media_art_marshal --body) > $@
+
+
+BUILT_SOURCES = \
+ marshal.c \
+ marshal.h
+
+CLEANFILES = $(BUILT_SOURCES)
+
+EXTRA_DIST = \
+ marshal.list
+
+
-include $(INTROSPECTION_MAKEFILE)
INTROSPECTION_GIRS =
INTROSPECTION_SCANNER_ARGS = --add-include-path=$(srcdir) --symbol-prefix=media_art
@@ -71,7 +91,7 @@ gir_DATA = $(INTROSPECTION_GIRS)
typelibdir = $(libdir)/girepository-1.0
typelib_DATA = $(INTROSPECTION_GIRS:.gir=.typelib)
-CLEANFILES = $(gir_DATA) $(typelib_DATA)
+BUILT_SOURCES += $(gir_DATA) $(typelib_DATA)
endif
if ENABLE_VAPIGEN
diff --git a/libmediaart/marshal.list b/libmediaart/marshal.list
new file mode 100644
index 0000000..f7cef75
--- /dev/null
+++ b/libmediaart/marshal.list
@@ -0,0 +1,2 @@
+VOID:STRING,STRING
+VOID:STRING,STRING,STRING,BOOLEAN,BOOLEAN
diff --git a/libmediaart/tracker-storage.c b/libmediaart/tracker-storage.c
index bd83940..e13be7d 100644
--- a/libmediaart/tracker-storage.c
+++ b/libmediaart/tracker-storage.c
@@ -25,7 +25,7 @@
#include <gio/gunixmounts.h>
#include "tracker-storage.h"
-#include "tracker-marshal.h"
+#include "marshal.h"
/**
* SECTION:tracker-storage
@@ -111,7 +111,7 @@ tracker_storage_class_init (TrackerStorageClass *klass)
G_SIGNAL_RUN_LAST,
0,
NULL, NULL,
- tracker_marshal_VOID__STRING_STRING_STRING_BOOLEAN_BOOLEAN,
+ media_art_marshal_VOID__STRING_STRING_STRING_BOOLEAN_BOOLEAN,
G_TYPE_NONE,
5,
G_TYPE_STRING,
@@ -126,7 +126,7 @@ tracker_storage_class_init (TrackerStorageClass *klass)
G_SIGNAL_RUN_LAST,
0,
NULL, NULL,
- tracker_marshal_VOID__STRING_STRING,
+ media_art_marshal_VOID__STRING_STRING,
G_TYPE_NONE,
2,
G_TYPE_STRING,