summaryrefslogtreecommitdiffstats
path: root/client
diff options
context:
space:
mode:
authorAlexander Larsson <alexl@redhat.com>2010-06-16 10:32:00 +0200
committerAlexander Larsson <alexl@redhat.com>2010-06-18 20:27:32 +0200
commit13026676627887a7d85abb49a0468150ac75ebe6 (patch)
tree75db55fe1d1822d6a2910431334c083bf94d5af6 /client
parentd9772344e60d9930ab35b7e88d4fd491314175d1 (diff)
downloadspice-13026676627887a7d85abb49a0468150ac75ebe6.tar.gz
spice-13026676627887a7d85abb49a0468150ac75ebe6.tar.xz
spice-13026676627887a7d85abb49a0468150ac75ebe6.zip
Generate and link marshallers into client
Diffstat (limited to 'client')
-rw-r--r--client/Makefile.am11
-rw-r--r--client/marshaller.cpp24
-rw-r--r--client/x11/Makefile.am3
3 files changed, 37 insertions, 1 deletions
diff --git a/client/Makefile.am b/client/Makefile.am
index f8ccb984..fa7dbb6a 100644
--- a/client/Makefile.am
+++ b/client/Makefile.am
@@ -3,11 +3,18 @@ NULL =
SUBDIRS = . $(red_target)
DIST_SUBDIRS = x11 #windows
-spice_built_sources = generated_demarshallers.cpp
+spice_built_sources = generated_demarshallers.cpp generated_marshallers.cpp generated_marshallers.h
generated_demarshallers.cpp: $(top_srcdir)/spice.proto
$(PYTHON) $(top_srcdir)/spice_codegen.py --generate-demarshallers --client --include common.h $(top_srcdir)/spice.proto generated_demarshallers.cpp
+STRUCTS=
+generated_marshallers.cpp: $(top_srcdir)/spice.proto
+ $(PYTHON) $(top_srcdir)/spice_codegen.py --generate-marshallers $(STRUCTS) --client $(top_srcdir)/spice.proto generated_marshallers.cpp
+
+generated_marshallers.h: $(top_srcdir)/spice.proto
+ $(PYTHON) $(top_srcdir)/spice_codegen.py --generate-marshallers $(STRUCTS) --client -H $(top_srcdir)/spice.proto generated_marshallers.h
+
RED_COMMON_SRCS = \
application.cpp \
application.h \
@@ -29,6 +36,8 @@ RED_COMMON_SRCS = \
common.h \
demarshallers.h \
generated_demarshallers.cpp \
+ generated_marshallers.cpp \
+ generated_marshallers.h \
cursor_channel.cpp \
cursor_channel.h \
cursor.cpp \
diff --git a/client/marshaller.cpp b/client/marshaller.cpp
new file mode 100644
index 00000000..14bd0965
--- /dev/null
+++ b/client/marshaller.cpp
@@ -0,0 +1,24 @@
+/*
+ Copyright (C) 2009 Red Hat, Inc.
+
+ 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, see <http://www.gnu.org/licenses/>.
+*/
+
+#include "common.h"
+#include "utils.h"
+
+
+#define CANVAS_ERROR(format, ...) THROW(format, ## __VA_ARGS__)
+
+#include "../common/marshaller.c"
diff --git a/client/x11/Makefile.am b/client/x11/Makefile.am
index 82a08dd1..cbc9c529 100644
--- a/client/x11/Makefile.am
+++ b/client/x11/Makefile.am
@@ -39,6 +39,9 @@ RED_COMMON_SRCS = \
$(CLIENT_DIR)/cache.hpp \
$(CLIENT_DIR)/demarshallers.h \
$(CLIENT_DIR)/generated_demarshallers.cpp \
+ $(CLIENT_DIR)/marshaller.cpp \
+ $(CLIENT_DIR)/generated_marshallers.h \
+ $(CLIENT_DIR)/generated_marshallers.cpp \
$(CLIENT_DIR)/sw_canvas.cpp \
$(CLIENT_DIR)/canvas.cpp \
$(CLIENT_DIR)/canvas.h \