From b0aad552082fdfed6d6b9e91f3830f716f0c898a Mon Sep 17 00:00:00 2001 From: Marc-André Lureau Date: Fri, 11 Feb 2011 22:19:47 +0100 Subject: gtk: add spice_channel_set_common_capability() --- gtk/spice-channel-priv.h | 1 + gtk/spice-channel.c | 12 ++++++++++++ 2 files changed, 13 insertions(+) diff --git a/gtk/spice-channel-priv.h b/gtk/spice-channel-priv.h index 7224c65..97b48ba 100644 --- a/gtk/spice-channel-priv.h +++ b/gtk/spice-channel-priv.h @@ -147,6 +147,7 @@ void spice_channel_handle_migrate(SpiceChannel *channel, spice_msg_in *in); gint spice_channel_get_channel_id(SpiceChannel *channel); gint spice_channel_get_channel_type(SpiceChannel *channel); void spice_channel_swap(SpiceChannel *channel, SpiceChannel *swap); +void spice_channel_set_common_capability(SpiceChannel *channel, guint32 cap); /* coroutine context */ #define emit_main_context(object, event, args...) \ diff --git a/gtk/spice-channel.c b/gtk/spice-channel.c index 5ed4768..972b32b 100644 --- a/gtk/spice-channel.c +++ b/gtk/spice-channel.c @@ -1648,6 +1648,7 @@ static void set_capability(GArray *caps, guint32 cap) * * Enable specific channel-kind capability. **/ +/* FIXME: we may want to make caps read only from outside */ void spice_channel_set_capability(SpiceChannel *channel, guint32 cap) { spice_channel *c; @@ -1658,6 +1659,17 @@ void spice_channel_set_capability(SpiceChannel *channel, guint32 cap) set_capability(c->caps, cap); } +G_GNUC_INTERNAL +void spice_channel_set_common_capability(SpiceChannel *channel, guint32 cap) +{ + spice_channel *c; + + g_return_if_fail(SPICE_IS_CHANNEL(channel)); + + c = channel->priv; + set_capability(c->common_caps, cap); +} + G_GNUC_INTERNAL SpiceSession* spice_channel_get_session(SpiceChannel *channel) { -- cgit v1.2.3