client: remove c++ wrappers

client/ contains several .cpp file which only #include a .c file
of the same name. This is unusual and seems to only be done to
get C++ name mangling on the symbols defined in the C file.
Now that all headers files in common/ use extern "C", these
wrappers are no longer useful.
This commit is contained in:
Christophe Fergeau 2011-04-19 22:37:53 +02:00
parent 9605351863
commit 04780d6996
17 changed files with 36 additions and 338 deletions

View File

@ -19,8 +19,6 @@ generated_marshallers1.cpp: $(top_srcdir)/spice1.proto
if SUPPORT_GL
GL_SRCS = \
gl_canvas.cpp \
glc.cpp \
red_gl_canvas.cpp \
red_gl_canvas.h \
red_pixmap_gl.h
@ -42,12 +40,8 @@ RED_COMMON_SRCS = \
audio_channels.h \
audio_devices.h \
cache.hpp \
sw_canvas.cpp \
pixman_utils.cpp \
lines.cpp \
canvas.cpp \
canvas.h \
canvas_utils.cpp \
red_sw_canvas.cpp \
red_sw_canvas.h \
client_net_socket.cpp \
@ -59,7 +53,6 @@ RED_COMMON_SRCS = \
marshallers.h \
generated_demarshallers.cpp \
generated_demarshallers1.cpp \
marshaller.cpp \
generated_marshallers.cpp \
generated_marshallers1.cpp \
controller.cpp \
@ -85,7 +78,6 @@ RED_COMMON_SRCS = \
inputs_handler.h \
jpeg_decoder.cpp \
jpeg_decoder.h \
lz.cpp \
monitor.cpp \
monitor.h \
mem.cpp \
@ -99,7 +91,6 @@ RED_COMMON_SRCS = \
playback_channel.cpp \
process_loop.cpp \
process_loop.h \
quic.cpp \
read_write_mutex.h \
record_channel.cpp \
red_channel.cpp \
@ -114,8 +105,6 @@ RED_COMMON_SRCS = \
red_pixmap.h \
red_types.h \
red_window.h \
region.cpp \
rop3.cpp \
screen.cpp \
screen.h \
screen_layer.cpp \
@ -134,7 +123,6 @@ RED_COMMON_SRCS = \
$(NULL)
GDI_FILES = \
gdi_canvas.cpp \
red_gdi_canvas.cpp \
red_gdi_canvas.h \
red_pixmap_gdi.h \

View File

@ -1,25 +0,0 @@
/*
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/canvas_utils.c"

View File

@ -1,24 +0,0 @@
/*
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/gdi_canvas.c"

View File

@ -1,20 +0,0 @@
/*
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 "../common/gl_canvas.c"

View File

@ -1,20 +0,0 @@
/*
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 "../common/glc.c"

View File

@ -1,24 +0,0 @@
/*
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/lines.c"

View File

@ -1,20 +0,0 @@
/*
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 "../common/lz.c"

View File

@ -1,24 +0,0 @@
/*
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"

View File

@ -1,24 +0,0 @@
/*
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 MALLOC_ERROR(format, ...) THROW(format, ## __VA_ARGS__)
#include "../common/mem.c"

View File

@ -1,25 +0,0 @@
/*
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/pixman_utils.c"

View File

@ -1,20 +0,0 @@
/*
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 "../common/quic.c"

View File

@ -1,20 +0,0 @@
/*
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 "../common/region.c"

View File

@ -1,20 +0,0 @@
/*
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 "../common/rop3.c"

View File

@ -1,24 +0,0 @@
/*
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/sw_canvas.c"

View File

@ -34,15 +34,15 @@ RED_COMMON_SRCS = \
$(CLIENT_DIR)/demarshallers.h \
$(CLIENT_DIR)/generated_demarshallers.cpp \
$(CLIENT_DIR)/generated_demarshallers1.cpp \
$(CLIENT_DIR)/marshaller.cpp \
$(COMMON_DIR)/marshaller.c \
$(CLIENT_DIR)/marshallers.h \
$(CLIENT_DIR)/generated_marshallers.cpp \
$(CLIENT_DIR)/generated_marshallers1.cpp \
$(CLIENT_DIR)/sw_canvas.cpp \
$(COMMON_DIR)/sw_canvas.c \
$(CLIENT_DIR)/canvas.cpp \
$(CLIENT_DIR)/gdi_canvas.cpp \
$(COMMON_DIR)/gdi_canvas.c \
$(CLIENT_DIR)/canvas.h \
$(CLIENT_DIR)/canvas_utils.cpp \
$(COMMON_DIR)/canvas_utils.c \
$(CLIENT_DIR)/red_sw_canvas.cpp \
$(CLIENT_DIR)/red_sw_canvas.h \
$(CLIENT_DIR)/cmd_line_parser.cpp \
@ -72,21 +72,21 @@ RED_COMMON_SRCS = \
$(CLIENT_DIR)/inputs_handler.h \
$(CLIENT_DIR)/jpeg_decoder.cpp \
$(CLIENT_DIR)/jpeg_decoder.h \
$(CLIENT_DIR)/lz.cpp \
$(CLIENT_DIR)/lines.cpp \
$(COMMON_DIR)/lz.c \
$(COMMON_DIR)/lines.c \
$(CLIENT_DIR)/monitor.cpp \
$(CLIENT_DIR)/monitor.h \
$(CLIENT_DIR)/mem.cpp \
$(COMMON_DIR)/mem.c \
$(CLIENT_DIR)/menu.cpp \
$(CLIENT_DIR)/menu.h \
$(CLIENT_DIR)/mjpeg_decoder.h \
$(CLIENT_DIR)/mjpeg_decoder.cpp \
$(CLIENT_DIR)/pixels_source.h \
$(CLIENT_DIR)/pixman_utils.cpp \
$(COMMON_DIR)/pixman_utils.c \
$(CLIENT_DIR)/platform.h \
$(CLIENT_DIR)/playback_channel.cpp \
$(CLIENT_DIR)/process_loop.cpp \
$(CLIENT_DIR)/quic.cpp \
$(COMMON_DIR)/quic.c \
$(CLIENT_DIR)/record_channel.cpp \
$(CLIENT_DIR)/red_channel.cpp \
$(CLIENT_DIR)/red_channel.h \
@ -101,8 +101,8 @@ RED_COMMON_SRCS = \
$(CLIENT_DIR)/red_pixmap.h \
$(CLIENT_DIR)/red_types.h \
$(CLIENT_DIR)/red_window.h \
$(CLIENT_DIR)/region.cpp \
$(CLIENT_DIR)/rop3.cpp \
$(COMMON_DIR)/region.c \
$(COMMON_DIR)/rop3.c \
$(CLIENT_DIR)/screen.cpp \
$(CLIENT_DIR)/screen.h \
$(CLIENT_DIR)/screen_layer.cpp \
@ -137,8 +137,8 @@ endif
if SUPPORT_GL
RED_OGL_SRCS = \
$(CLIENT_DIR)/gl_canvas.cpp \
$(CLIENT_DIR)/glc.cpp \
$(COMMON_DIR)/gl_canvas.c \
$(COMMON_DIR)/glc.c \
$(CLIENT_DIR)/red_gl_canvas.cpp \
$(CLIENT_DIR)/red_gl_canvas.h \
$(CLIENT_DIR)/red_pixmap_gl.h

View File

@ -377,7 +377,7 @@
>
</File>
<File
RelativePath="..\canvas_utils.cpp"
RelativePath="..\..\common\canvas_utils.c"
>
</File>
<File
@ -413,7 +413,7 @@
>
</File>
<File
RelativePath="..\gdi_canvas.cpp"
RelativePath="..\..\common\gdi_canvas.c"
>
</File>
<File
@ -457,11 +457,11 @@
>
</File>
<File
RelativePath="..\lines.cpp"
RelativePath="..\..\common\lines.c"
>
</File>
<File
RelativePath="..\lz.cpp"
RelativePath="..\..\common\lz.c"
>
</File>
<File
@ -469,7 +469,7 @@
>
</File>
<File
RelativePath="..\mem.cpp"
RelativePath="..\..\common\mem.c"
>
</File>
<File
@ -533,7 +533,7 @@
>
</File>
<File
RelativePath="..\pixman_utils.cpp"
RelativePath="..\..\common\pixman_utils.c"
>
</File>
<File
@ -557,7 +557,7 @@
>
</File>
<File
RelativePath="..\quic.cpp"
RelativePath="..\..\common\quic.c"
>
</File>
<File
@ -609,7 +609,7 @@
>
</File>
<File
RelativePath="..\region.cpp"
RelativePath="..\..\common\region.c"
>
</File>
<File
@ -617,7 +617,7 @@
>
</File>
<File
RelativePath="..\rop3.cpp"
RelativePath="..\..\common\rop3.c"
>
</File>
<File
@ -637,7 +637,7 @@
>
</File>
<File
RelativePath="..\sw_canvas.cpp"
RelativePath="..\..\common\sw_canvas.c"
>
</File>
<File
@ -767,7 +767,7 @@
>
</File>
<File
RelativePath="..\marshaller.cpp"
RelativePath="..\..\common\marshaller.c"
>
</File>
<File

View File

@ -41,14 +41,14 @@ RED_COMMON_SRCS = \
$(CLIENT_DIR)/demarshallers.h \
$(CLIENT_DIR)/generated_demarshallers.cpp \
$(CLIENT_DIR)/generated_demarshallers1.cpp \
$(CLIENT_DIR)/marshaller.cpp \
$(COMMON_DIR)/marshaller.c \
$(CLIENT_DIR)/marshallers.h \
$(CLIENT_DIR)/generated_marshallers.cpp \
$(CLIENT_DIR)/generated_marshallers1.cpp \
$(CLIENT_DIR)/sw_canvas.cpp \
$(COMMON_DIR)/sw_canvas.c \
$(CLIENT_DIR)/canvas.cpp \
$(CLIENT_DIR)/canvas.h \
$(CLIENT_DIR)/canvas_utils.cpp \
$(COMMON_DIR)/canvas_utils.c \
$(CLIENT_DIR)/red_sw_canvas.cpp \
$(CLIENT_DIR)/red_sw_canvas.h \
$(CLIENT_DIR)/cmd_line_parser.cpp \
@ -78,21 +78,21 @@ RED_COMMON_SRCS = \
$(CLIENT_DIR)/inputs_handler.h \
$(CLIENT_DIR)/jpeg_decoder.cpp \
$(CLIENT_DIR)/jpeg_decoder.h \
$(CLIENT_DIR)/lz.cpp \
$(CLIENT_DIR)/lines.cpp \
$(COMMON_DIR)/lz.c \
$(COMMON_DIR)/lines.c \
$(CLIENT_DIR)/monitor.cpp \
$(CLIENT_DIR)/monitor.h \
$(CLIENT_DIR)/mem.cpp \
$(COMMON_DIR)/mem.c \
$(CLIENT_DIR)/menu.cpp \
$(CLIENT_DIR)/menu.h \
$(CLIENT_DIR)/mjpeg_decoder.h \
$(CLIENT_DIR)/mjpeg_decoder.cpp \
$(CLIENT_DIR)/pixels_source.h \
$(CLIENT_DIR)/pixman_utils.cpp \
$(COMMON_DIR)/pixman_utils.c \
$(CLIENT_DIR)/platform.h \
$(CLIENT_DIR)/playback_channel.cpp \
$(CLIENT_DIR)/process_loop.cpp \
$(CLIENT_DIR)/quic.cpp \
$(COMMON_DIR)/quic.c \
$(CLIENT_DIR)/record_channel.cpp \
$(CLIENT_DIR)/red_channel.cpp \
$(CLIENT_DIR)/red_channel.h \
@ -106,8 +106,8 @@ RED_COMMON_SRCS = \
$(CLIENT_DIR)/red_pixmap.h \
$(CLIENT_DIR)/red_types.h \
$(CLIENT_DIR)/red_window.h \
$(CLIENT_DIR)/region.cpp \
$(CLIENT_DIR)/rop3.cpp \
$(COMMON_DIR)/region.c \
$(COMMON_DIR)/rop3.c \
$(CLIENT_DIR)/screen.cpp \
$(CLIENT_DIR)/screen.h \
$(CLIENT_DIR)/screen_layer.cpp \
@ -150,8 +150,8 @@ endif
if SUPPORT_GL
RED_OGL_SRCS = \
$(CLIENT_DIR)/gl_canvas.cpp \
$(CLIENT_DIR)/glc.cpp \
$(COMMON_DIR)/gl_canvas.c \
$(COMMON_DIR)/glc.c \
$(CLIENT_DIR)/red_gl_canvas.cpp \
$(CLIENT_DIR)/red_gl_canvas.h \
$(CLIENT_DIR)/red_pixmap_gl.h \