mirror of
https://gitlab.uni-freiburg.de/opensourcevdi/spice
synced 2025-12-29 08:47:13 +00:00
Make sure is possible to include any headers alone.
I used this script to check independence (run under server directory):
----
#!/bin/bash
set -e
# check not already modified
if grep -q libheaders.la Makefile.am; then
echo "Header library already prepared" >&2
exit 1
fi
add_lib() {
local hdr="$1"
hdr=${hdr%.h}
c="mao_${hdr}.c"
echo "#include \"${hdr}.h\"" > $c
echo -e "\t$c \\" >&3
}
# add library to compile all headers alones
exec 3>> Makefile.am
echo "
noinst_LTLIBRARIES += libheaders.la
libheaders_la_SOURCES = \\" >&3
for hdr in *.h; do
case $hdr in
spice-bitmap-utils.h)
add_lib $hdr
;;
spice*.h)
;;
*)
add_lib $hdr
;;
esac
done
echo -e "\t\$(NULL)" >&3
exec 3>&-
----
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Jonathon Jongsma <jjongsma@redhat.com>
30 lines
1.2 KiB
C
30 lines
1.2 KiB
C
/*
|
|
Copyright (C) 2010 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/>.
|
|
*/
|
|
#ifndef _H_DEMARSHAL
|
|
#define _H_DEMARSHAL
|
|
|
|
#include <stddef.h>
|
|
#include <inttypes.h>
|
|
|
|
typedef void (*message_destructor_t)(uint8_t *message);
|
|
typedef uint8_t * (*spice_parse_channel_func_t)(uint8_t *message_start, uint8_t *message_end, uint16_t message_type, int minor,
|
|
size_t *size_out, message_destructor_t *free_message);
|
|
|
|
spice_parse_channel_func_t spice_get_client_channel_parser(uint32_t channel, unsigned int *max_message_type);
|
|
|
|
#endif
|