summaryrefslogtreecommitdiff
path: root/gtk/channel-main.c
diff options
context:
space:
mode:
Diffstat (limited to 'gtk/channel-main.c')
-rw-r--r--gtk/channel-main.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/gtk/channel-main.c b/gtk/channel-main.c
index b2df547..0689368 100644
--- a/gtk/channel-main.c
+++ b/gtk/channel-main.c
@@ -736,6 +736,7 @@ static void do_emit_main_context(GObject *object, int signum, gpointer params)
/* ------------------------------------------------------------------ */
+
static void agent_free_msg_queue(SpiceMainChannel *channel)
{
SpiceMainChannelPrivate *c = channel->priv;
@@ -1716,6 +1717,27 @@ static gboolean timer_set_display(gpointer data)
}
/**
+ * spice_main_agent_test_capability:
+ * @channel:
+ * @cap: an agent capability identifier
+ *
+ * Test capability of a remote agent.
+ *
+ * Returns: %TRUE if @cap (channel kind capability) is available.
+ **/
+gboolean spice_main_agent_test_capability(SpiceMainChannel *channel, guint32 cap)
+{
+ g_return_val_if_fail(SPICE_IS_MAIN_CHANNEL(channel), FALSE);
+
+ SpiceMainChannelPrivate *c = channel->priv;
+
+ if (!c->agent_caps_received)
+ return FALSE;
+
+ return VD_AGENT_HAS_CAPABILITY(c->agent_caps, sizeof(c->agent_caps), cap);
+}
+
+/**
* spice_main_set_display:
* @channel:
* @id: display channel ID