[Spice-devel] [PATCH spice-gtk] Print list of supported channels

Marc-André Lureau marcandre.lureau at gmail.com
Thu Oct 18 05:19:28 PDT 2012


https://bugzilla.redhat.com/show_bug.cgi?id=834513
---
 gtk/spice-session.c | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

diff --git a/gtk/spice-session.c b/gtk/spice-session.c
index 28ebe8a..526d05b 100644
--- a/gtk/spice-session.c
+++ b/gtk/spice-session.c
@@ -118,10 +118,28 @@ static guint signals[SPICE_SESSION_LAST_SIGNAL];
 static void spice_session_init(SpiceSession *session)
 {
     SpiceSessionPrivate *s;
+    gchar *channels;
 
     SPICE_DEBUG("New session (compiled from package " PACKAGE_STRING ")");
     s = session->priv = SPICE_SESSION_GET_PRIVATE(session);
 
+    channels = g_strjoin(", ",
+                         spice_channel_type_to_string(SPICE_CHANNEL_MAIN),
+                         spice_channel_type_to_string(SPICE_CHANNEL_DISPLAY),
+                         spice_channel_type_to_string(SPICE_CHANNEL_INPUTS),
+                         spice_channel_type_to_string(SPICE_CHANNEL_CURSOR),
+                         spice_channel_type_to_string(SPICE_CHANNEL_PLAYBACK),
+                         spice_channel_type_to_string(SPICE_CHANNEL_RECORD),
+#ifdef USE_SMARTCARD
+                         spice_channel_type_to_string(SPICE_CHANNEL_SMARTCARD),
+#endif
+#ifdef USE_USBREDIR
+                         spice_channel_type_to_string(SPICE_CHANNEL_USBREDIR),
+#endif
+                         NULL);
+    SPICE_DEBUG("Supported channels: %s", channels);
+    g_free(channels);
+
     ring_init(&s->channels);
     cache_init(&s->images, "image");
     cache_init(&s->palettes, "palette");
-- 
1.7.11.7



More information about the Spice-devel mailing list