[Spice-devel] [PATCH spice-gtk 2/4] Deprecate spice_channel_set_capability()

Marc-André Lureau marcandre.lureau at gmail.com
Fri Jun 8 03:13:27 PDT 2012


This was initially public to eventually let a derived class
implement more capabilities. Even though it is technically
doable to derive and tweak exisiting channels, there is a
lack of support in spice-gtk for doing that.
---
 gtk/spice-channel.c |    2 +-
 gtk/spice-channel.h |    5 +++++
 gtk/spice-util.h    |    5 +++--
 3 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/gtk/spice-channel.c b/gtk/spice-channel.c
index 75b171b..fda0666 100644
--- a/gtk/spice-channel.c
+++ b/gtk/spice-channel.c
@@ -2537,9 +2537,9 @@ static void set_capability(GArray *caps, guint32 cap)
  * @cap: a capability
  *
  * Enable specific channel-kind capability.
+ * Deprecated: 0.13: this function has been removed
  **/
 #undef spice_channel_set_capability
-/* FIXME: we may want to make caps read only from outside */
 void spice_channel_set_capability(SpiceChannel *channel, guint32 cap)
 {
     SpiceChannelPrivate *c;
diff --git a/gtk/spice-channel.h b/gtk/spice-channel.h
index 982b73b..73be1ef 100644
--- a/gtk/spice-channel.h
+++ b/gtk/spice-channel.h
@@ -108,10 +108,15 @@ gboolean spice_channel_open_fd(SpiceChannel *channel, int fd);
 void spice_channel_disconnect(SpiceChannel *channel, SpiceChannelEvent reason);
 gboolean spice_channel_test_capability(SpiceChannel *channel, guint32 cap);
 gboolean spice_channel_test_common_capability(SpiceChannel *channel, guint32 cap);
+
+#ifndef SPICE_DISABLE_DEPRECATED
+SPICE_DEPRECATED
 void spice_channel_set_capability(SpiceChannel *channel, guint32 cap);
+#endif
 
 const gchar* spice_channel_type_to_string(gint type);
 
+
 G_END_DECLS
 
 #endif /* __SPICE_CLIENT_CHANNEL_H__ */
diff --git a/gtk/spice-util.h b/gtk/spice-util.h
index 7a617f4..271f3be 100644
--- a/gtk/spice-util.h
+++ b/gtk/spice-util.h
@@ -40,10 +40,11 @@ gulong spice_g_signal_connect_object(gpointer instance,
 #define SPICE_RESERVED_PADDING (10 * sizeof(void*))
 
 #ifndef SPICE_NO_DEPRECATED
-#define SPICE_DEPRECATED_FOR(f) \
-    G_GNUC_DEPRECATED_FOR(f)
+#define SPICE_DEPRECATED_FOR(f)  G_GNUC_DEPRECATED_FOR(f)
+#define SPICE_DEPRECATED  G_GNUC_DEPRECATED
 #else
 #define SPICE_DEPRECATED_FOR(f)
+#define SPICE_DEPRECATED
 #endif
 
 G_END_DECLS
-- 
1.7.10.2



More information about the Spice-devel mailing list