@@ -54,7 +54,7 @@ IGNORE_HFILES= \
$(NULL)
# CFLAGS and LDFLAGS for compiling gtkdoc-scangobj with your library.
-GTKDOC_CFLAGS = -I$(top_srcdir) -I$(top_builddir) -I$(top_srcdir)/src -I$(top_builddir)/src $(SPICE_GLIB_CFLAGS) $(SPICE_GTK_CFLAGS) $(COMMON_CFLAGS)
+GTKDOC_CFLAGS = -I$(top_srcdir) -I$(top_builddir) -I$(top_srcdir)/src -I$(top_builddir)/src $(SPICE_GLIB_CFLAGS) $(SPICE_GTK_CFLAGS) $(COMMON_CFLAGS) -DSPICE_COMPILATION
GTKDOC_LIBS = $(top_builddir)/src/libspice-client-glib-2.0.la $(top_builddir)/src/libspice-client-gtk-$(SPICE_GTK_API_VERSION).la $(GTK_LIBS)
include $(top_srcdir)/gtk-doc.make
@@ -79,6 +79,7 @@ endif
KEYMAP_GEN = $(srcdir)/keymap-gen.pl
SPICE_COMMON_CPPFLAGS = \
+ -DSPICE_COMPILATION \
-DG_LOG_DOMAIN=\"GSpice\" \
-DSPICE_NO_DEPRECATED \
-DSPICE_GTK_LOCALEDIR=\"${SPICE_GTK_LOCALEDIR}\" \
@@ -32,7 +32,7 @@
* @section_id:
* @see_also: #SpiceChannel, and the GTK widget #SpiceDisplay
* @stability: Stable
- * @include: channel-cursor.h
+ * @include: spice-client.h
*
* The Spice protocol defines a set of messages for controlling cursor
* shape and position on the remote display area. The cursor changes
@@ -18,6 +18,10 @@
#ifndef __SPICE_CLIENT_CURSOR_CHANNEL_H__
#define __SPICE_CLIENT_CURSOR_CHANNEL_H__
+#if !defined(__SPICE_CLIENT_H_INSIDE__) && !defined(SPICE_COMPILATION)
+#error "Only <spice-client.h> can be included directly"
+#endif
+
#include "spice-client.h"
G_BEGIN_DECLS
@@ -46,7 +46,7 @@
* @section_id:
* @see_also: #SpiceChannel, and the GTK widget #SpiceDisplay
* @stability: Stable
- * @include: channel-display.h
+ * @include: spice-client.h
*
* A class that handles the rendering of the remote display and inform
* of its updates.
@@ -18,6 +18,10 @@
#ifndef __SPICE_CLIENT_DISPLAY_CHANNEL_H__
#define __SPICE_CLIENT_DISPLAY_CHANNEL_H__
+#if !defined(__SPICE_CLIENT_H_INSIDE__) && !defined(SPICE_COMPILATION)
+#error "Only <spice-client.h> can be included directly"
+#endif
+
#include "spice-client.h"
G_BEGIN_DECLS
@@ -28,7 +28,7 @@
* @section_id:
* @see_also: #SpiceChannel, and the GTK widget #SpiceDisplay
* @stability: Stable
- * @include: channel-inputs.h
+ * @include: spice-client.h
*
* Spice supports sending keyboard key events and keyboard leds
* synchronization. The key events are sent using
@@ -18,6 +18,10 @@
#ifndef __SPICE_CLIENT_INPUTS_CHANNEL_H__
#define __SPICE_CLIENT_INPUTS_CHANNEL_H__
+#if !defined(__SPICE_CLIENT_H_INSIDE__) && !defined(SPICE_COMPILATION)
+#error "Only <spice-client.h> can be included directly"
+#endif
+
#include "spice-client.h"
G_BEGIN_DECLS
@@ -39,7 +39,7 @@
* @section_id:
* @see_also: #SpiceChannel, and the GTK widget #SpiceDisplay
* @stability: Stable
- * @include: channel-main.h
+ * @include: spice-client.h
*
* The main channel is the Spice session control channel. It handles
* communication initialization (channels list), migrations, mouse
@@ -18,6 +18,10 @@
#ifndef __SPICE_CLIENT_MAIN_CHANNEL_H__
#define __SPICE_CLIENT_MAIN_CHANNEL_H__
+#if !defined(__SPICE_CLIENT_H_INSIDE__) && !defined(SPICE_COMPILATION)
+#error "Only <spice-client.h> can be included directly"
+#endif
+
#include "spice-client.h"
G_BEGIN_DECLS
@@ -33,7 +33,7 @@
* @section_id:
* @see_also: #SpiceChannel, and #SpiceAudio
* @stability: Stable
- * @include: channel-playback.h
+ * @include: spice-client.h
*
* #SpicePlaybackChannel class handles an audio playback stream. The
* audio data is received via #SpicePlaybackChannel::playback-data
@@ -18,6 +18,10 @@
#ifndef __SPICE_CLIENT_PLAYBACK_CHANNEL_H__
#define __SPICE_CLIENT_PLAYBACK_CHANNEL_H__
+#if !defined(__SPICE_CLIENT_H_INSIDE__) && !defined(SPICE_COMPILATION)
+#error "Only <spice-client.h> can be included directly"
+#endif
+
#include "spice-client.h"
G_BEGIN_DECLS
@@ -30,7 +30,7 @@
* @section_id:
* @see_also: #SpiceChannel
* @stability: Stable
- * @include: channel-port.h
+ * @include: spice-client.h
*
* A Spice port channel carry arbitrary data between the Spice client
* and the Spice server. It may be used to provide additional
@@ -18,6 +18,10 @@
#ifndef __SPICE_CLIENT_PORT_CHANNEL_H__
#define __SPICE_CLIENT_PORT_CHANNEL_H__
+#if !defined(__SPICE_CLIENT_H_INSIDE__) && !defined(SPICE_COMPILATION)
+#error "Only <spice-client.h> can be included directly"
+#endif
+
#include <gio/gio.h>
#include "spice-channel.h"
@@ -33,7 +33,7 @@
* @section_id:
* @see_also: #SpiceChannel, and #SpiceAudio
* @stability: Stable
- * @include: channel-record.h
+ * @include: spice-client.h
*
* #SpiceRecordChannel class handles an audio recording stream. The
* audio stream should start when #SpiceRecordChannel::record-start is
@@ -18,6 +18,10 @@
#ifndef __SPICE_CLIENT_RECORD_CHANNEL_H__
#define __SPICE_CLIENT_RECORD_CHANNEL_H__
+#if !defined(__SPICE_CLIENT_H_INSIDE__) && !defined(SPICE_COMPILATION)
+#error "Only <spice-client.h> can be included directly"
+#endif
+
#include "spice-client.h"
G_BEGIN_DECLS
@@ -36,7 +36,7 @@
* @section_id:
* @see_also: #SpiceSmartcardManager, #SpiceSession
* @stability: API Stable (channel in development)
- * @include: channel-smartcard.h
+ * @include: spice-client.h
*
* The Spice protocol defines a set of messages to forward smartcard
* information from the Spice client to the VM. This channel handles
@@ -18,6 +18,10 @@
#ifndef __SPICE_CLIENT_SMARTCARD_CHANNEL_H__
#define __SPICE_CLIENT_SMARTCARD_CHANNEL_H__
+#if !defined(__SPICE_CLIENT_H_INSIDE__) && !defined(SPICE_COMPILATION)
+#error "Only <spice-client.h> can be included directly"
+#endif
+
#include "spice-client.h"
G_BEGIN_DECLS
@@ -44,7 +44,7 @@
* @title: USB Redirection Channel
* @section_id:
* @stability: API Stable (channel in development)
- * @include: channel-usbredir.h
+ * @include: spice-client.h
*
* The Spice protocol defines a set of messages to redirect USB devices
* from the Spice client to the VM. This channel handles these messages.
@@ -21,6 +21,10 @@
#ifndef __SPICE_CLIENT_USBREDIR_CHANNEL_H__
#define __SPICE_CLIENT_USBREDIR_CHANNEL_H__
+#if !defined(__SPICE_CLIENT_H_INSIDE__) && !defined(SPICE_COMPILATION)
+#error "Only <spice-client.h> can be included directly"
+#endif
+
#include "spice-client.h"
G_BEGIN_DECLS
@@ -33,7 +33,7 @@
* @section_id:
* @see_also: #SpiceChannel
* @stability: Stable
- * @include: channel-webdav.h
+ * @include: spice-client.h
*
* The "webdav" channel exports a directory to the guest for file
* manipulation (read/write/copy etc). The underlying protocol is
@@ -18,6 +18,10 @@
#ifndef __SPICE_WEBDAV_CHANNEL_H__
#define __SPICE_WEBDAV_CHANNEL_H__
+#if !defined(__SPICE_CLIENT_H_INSIDE__) && !defined(SPICE_COMPILATION)
+#error "Only <spice-client.h> can be included directly"
+#endif
+
#include <gio/gio.h>
#include "spice-client.h"
#include "channel-port.h"
@@ -40,7 +40,7 @@
* @section_id:
* @see_also:
* @stability: Stable
- * @include: smartcard-manager.h
+ * @include: spice-client.h
*
* #SpiceSmartcardManager monitors smartcard reader plugging/unplugging,
* and smartcard insertions/removals. It also provides methods to handle
@@ -18,6 +18,10 @@
#ifndef __SPICE_SMARTCARD_MANAGER_H__
#define __SPICE_SMARTCARD_MANAGER_H__
+#if !defined(__SPICE_CLIENT_H_INSIDE__) && !defined(SPICE_COMPILATION)
+#error "Only <spice-client.h> can be included directly"
+#endif
+
G_BEGIN_DECLS
#include "spice-types.h"
@@ -26,7 +26,7 @@
* @section_id:
* @see_also: #SpiceRecordChannel, and #SpicePlaybackChannel
* @stability: Stable
- * @include: spice-audio.h
+ * @include: spice-client.h
*
* A class that handles the playback and record channels for your
* application, and connect them to the default sound system.
@@ -18,6 +18,10 @@
#ifndef __SPICE_CLIENT_AUDIO_H__
#define __SPICE_CLIENT_AUDIO_H__
+#if !defined(__SPICE_CLIENT_H_INSIDE__) && !defined(SPICE_COMPILATION)
+#error "Only <spice-client.h> can be included directly"
+#endif
+
#include <glib-object.h>
#include <gio/gio.h>
#include "spice-util.h"
@@ -63,7 +63,7 @@ static gboolean channel_connect(SpiceChannel *channel, gboolean tls);
* @section_id:
* @see_also: #SpiceSession, #SpiceMainChannel and other channels
* @stability: Stable
- * @include: spice-channel.h
+ * @include: spice-client.h
*
* #SpiceChannel is the base class for the different kind of Spice
* channel connections, such as #SpiceMainChannel, or
@@ -18,6 +18,10 @@
#ifndef __SPICE_CLIENT_CHANNEL_H__
#define __SPICE_CLIENT_CHANNEL_H__
+#if !defined(__SPICE_CLIENT_H_INSIDE__) && !defined(SPICE_COMPILATION)
+#error "Only <spice-client.h> can be included directly"
+#endif
+
G_BEGIN_DECLS
#include <gio/gio.h>
@@ -22,6 +22,8 @@
#include <glib.h>
#include <glib-object.h>
+#define __SPICE_CLIENT_H_INSIDE__
+
/* spice-protocol */
#include <spice/enums.h>
#include <spice/protocol.h>
@@ -88,4 +90,6 @@ GQuark spice_client_error_quark(void);
G_END_DECLS
+#undef __SPICE_CLIENT_H_INSIDE__
+
#endif /* __SPICE_CLIENT_CLIENT_H__ */
@@ -18,6 +18,10 @@
#ifndef SPICE_OPTION_H
#define SPICE_OPTION_H
+#if !defined(__SPICE_CLIENT_H_INSIDE__) && !defined(SPICE_COMPILATION)
+#error "Only <spice-client.h> can be included directly"
+#endif
+
#include <glib.h>
#include "spice-session.h"
@@ -134,7 +134,7 @@ struct _SpiceSessionPrivate {
* @section_id:
* @see_also: #SpiceChannel, and the GTK widget #SpiceDisplay
* @stability: Stable
- * @include: spice-session.h
+ * @include: spice-client.h
*
* The #SpiceSession class handles all the #SpiceChannel connections.
* It's also the class that contains connections informations, such as
@@ -18,6 +18,10 @@
#ifndef __SPICE_CLIENT_SESSION_H__
#define __SPICE_CLIENT_SESSION_H__
+#if !defined(__SPICE_CLIENT_H_INSIDE__) && !defined(SPICE_COMPILATION)
+#error "Only <spice-client.h> can be included directly"
+#endif
+
#include <glib-object.h>
#include "spice-types.h"
#include "spice-uri.h"
@@ -18,6 +18,10 @@
#ifndef __SPICE_CLIENT_TYPES_H__
#define __SPICE_CLIENT_TYPES_H__
+#if !defined(__SPICE_CLIENT_H_INSIDE__) && !defined(SPICE_COMPILATION)
+#error "Only <spice-client.h> can be included directly"
+#endif
+
G_BEGIN_DECLS
/* SpiceSession */
@@ -30,7 +30,7 @@
* @title: SpiceURI
* @section_id:
* @stability: Stable
- * @include: spice-uri.h
+ * @include: spice-client.h
*
* A SpiceURI represents a (parsed) URI.
* Since: 0.24
@@ -18,6 +18,10 @@
#ifndef __SPICE_URI_H__
#define __SPICE_URI_H__
+#if !defined(__SPICE_CLIENT_H_INSIDE__) && !defined(SPICE_COMPILATION)
+#error "Only <spice-client.h> can be included directly"
+#endif
+
#include <glib-object.h>
G_BEGIN_DECLS
@@ -33,7 +33,7 @@
* @title: Utilities
* @section_id:
* @stability: Stable
- * @include: spice-util.h
+ * @include: spice-client.h
*
* Various functions for debugging and informational purposes.
*/
@@ -18,6 +18,10 @@
#ifndef __SPICE_VERSION_H__
#define __SPICE_VERSION_H__
+#if !defined(__SPICE_CLIENT_H_INSIDE__) && !defined(SPICE_COMPILATION)
+#error "Only <spice-client.h> can be included directly"
+#endif
+
/**
* SECTION:spice-version
* @short_description: Spice-Gtk version checking
@@ -64,7 +64,7 @@
* @section_id:
* @see_also:
* @stability: Stable
- * @include: usb-device-manager.h
+ * @include: spice-client.h
*
* #SpiceUsbDeviceManager monitors USB redirection channels and USB
* devices plugging/unplugging. If #SpiceUsbDeviceManager:auto-connect
@@ -21,6 +21,10 @@
#ifndef __SPICE_USB_DEVICE_MANAGER_H__
#define __SPICE_USB_DEVICE_MANAGER_H__
+#if !defined(__SPICE_CLIENT_H_INSIDE__) && !defined(SPICE_COMPILATION)
+#error "Only <spice-client.h> can be included directly"
+#endif
+
#include "spice-client.h"
#include <gio/gio.h>