diff options
author | Marc-André Lureau <marcandre.lureau@redhat.com> | 2011-02-11 22:19:47 +0100 |
---|---|---|
committer | Marc-André Lureau <marcandre.lureau@redhat.com> | 2011-02-19 00:01:29 +0100 |
commit | b0aad552082fdfed6d6b9e91f3830f716f0c898a (patch) | |
tree | 11911b9bc7afcca08158e208c507a7a66cac9243 | |
parent | 4323e36740d39bdf5b6c94283170edc884d65f82 (diff) |
gtk: add spice_channel_set_common_capability()
-rw-r--r-- | gtk/spice-channel-priv.h | 1 | ||||
-rw-r--r-- | gtk/spice-channel.c | 12 |
2 files changed, 13 insertions, 0 deletions
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; @@ -1659,6 +1660,17 @@ void spice_channel_set_capability(SpiceChannel *channel, guint32 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) { g_return_val_if_fail(SPICE_IS_CHANNEL(channel), NULL); |