Declare public exported functions as C

Allows to link externally from a C program.
This will allow C++ code to respect C ABI.

Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
This commit is contained in:
Frediano Ziglio 2019-05-18 20:19:50 +01:00 committed by Frediano Ziglio
parent 505b90e179
commit 238f53d702
7 changed files with 28 additions and 0 deletions

View File

@ -24,6 +24,8 @@
#include "spice-core.h"
SPICE_BEGIN_DECLS
/* sound interfaces */
#define SPICE_INTERFACE_PLAYBACK "playback"
@ -93,4 +95,6 @@ void spice_server_set_playback_rate(SpicePlaybackInstance *sin, uint32_t fre
uint32_t spice_server_get_best_record_rate(SpiceRecordInstance *sin);
void spice_server_set_record_rate(SpiceRecordInstance *sin, uint32_t frequency);
SPICE_END_DECLS
#endif /* SPICE_AUDIO_H_ */

View File

@ -24,6 +24,8 @@
#include "spice-core.h"
SPICE_BEGIN_DECLS
/* char device interfaces */
#define SPICE_INTERFACE_CHAR_DEVICE "char_device"
@ -85,4 +87,6 @@ void spice_server_port_event(SpiceCharDeviceInstance *char_device, uint8_t event
/* TODO change return to const char *const * when API break */
const char** spice_server_char_device_recognized_subtypes(void);
SPICE_END_DECLS
#endif /* SPICE_CHAR_H_ */

View File

@ -24,6 +24,8 @@
#include "spice-core.h"
SPICE_BEGIN_DECLS
/* input interfaces */
#define SPICE_INTERFACE_KEYBOARD "keyboard"
@ -88,4 +90,6 @@ struct SpiceTabletInstance {
SpiceTabletState *st;
};
SPICE_END_DECLS
#endif /* SPICE_INPUT_H_ */

View File

@ -24,6 +24,8 @@
#include "spice-core.h"
SPICE_BEGIN_DECLS
/* migration interface */
#define SPICE_INTERFACE_MIGRATION "migration"
#define SPICE_INTERFACE_MIGRATION_MAJOR 1
@ -58,4 +60,6 @@ int spice_server_migrate_end(SpiceServer *s, int completed);
void spice_server_set_seamless_migration(SpiceServer *s, int enable);
SPICE_END_DECLS
#endif /* SPICE_MIGRATION_H_ */

View File

@ -24,6 +24,8 @@
#include "spice-core.h"
SPICE_BEGIN_DECLS
#ifndef SPICE_CAPABILITIES_SIZE
#define SPICE_CAPABILITIES_SIZE (sizeof(((QXLRom*)0)->client_capabilities))
#endif
@ -232,4 +234,6 @@ struct QXLInstance {
QXLState *st;
};
SPICE_END_DECLS
#endif /* SPICE_QXL_H_ */

View File

@ -26,6 +26,8 @@
#include <stdio.h>
#include "spice-core.h"
SPICE_BEGIN_DECLS
typedef struct SpiceReplay SpiceReplay;
/* reads until encountering a cmd, processing any recorded messages (io) on the
@ -35,4 +37,6 @@ void spice_replay_free_cmd(SpiceReplay *replay, QXLCommandExt *cmd);
void spice_replay_free(SpiceReplay *replay);
SpiceReplay * spice_replay_new(FILE *file, int nsurfaces);
SPICE_END_DECLS
#endif /* SPICE_REPLAY_H_ */

View File

@ -24,6 +24,8 @@
#include "spice-core.h"
SPICE_BEGIN_DECLS
/* Don't use features incompatible with a specific spice
version, so that migration to/from that version works. */
typedef enum {
@ -170,4 +172,6 @@ void spice_server_vm_stop(SpiceServer *s);
int spice_server_get_num_clients(SpiceServer *s) SPICE_GNUC_DEPRECATED;
SPICE_END_DECLS
#endif /* SPICE_SERVER_H_ */