[Spice-devel] [PATCH spice-gtk 2/6] session: add secure-channels property

Marc-André Lureau marcandre.lureau at gmail.com
Thu Apr 11 06:09:56 PDT 2013


---
 gtk/spice-session-priv.h |  1 +
 gtk/spice-session.c      | 28 +++++++++++++++++++++++++++-
 2 files changed, 28 insertions(+), 1 deletion(-)

diff --git a/gtk/spice-session-priv.h b/gtk/spice-session-priv.h
index d5df378..ee90615 100644
--- a/gtk/spice-session-priv.h
+++ b/gtk/spice-session-priv.h
@@ -73,6 +73,7 @@ struct _SpiceSessionPrivate {
     gboolean          inhibit_keyboard_grab;
 
     GStrv             disable_effects;
+    GStrv             secure_channels;
     gint              color_depth;
 
     int               connection_id;
diff --git a/gtk/spice-session.c b/gtk/spice-session.c
index 3cbfd29..2deb86a 100644
--- a/gtk/spice-session.c
+++ b/gtk/spice-session.c
@@ -106,7 +106,8 @@ enum {
     PROP_UUID,
     PROP_NAME,
     PROP_CA,
-    PROP_PROXY
+    PROP_PROXY,
+    PROP_SECURE_CHANNELS
 };
 
 /* signals */
@@ -261,6 +262,7 @@ spice_session_finalize(GObject *gobject)
     g_strfreev(s->smartcard_certificates);
     g_free(s->smartcard_db);
     g_strfreev(s->disable_effects);
+    g_strfreev(s->secure_channels);
 
     spice_session_palettes_clear(session);
     spice_session_images_clear(session);
@@ -500,6 +502,9 @@ static void spice_session_get_property(GObject    *gobject,
     case PROP_DISABLE_EFFECTS:
         g_value_set_boxed(value, s->disable_effects);
         break;
+    case PROP_SECURE_CHANNELS:
+        g_value_set_boxed(value, s->secure_channels);
+        break;
     case PROP_COLOR_DEPTH:
         g_value_set_int(value, s->color_depth);
         break;
@@ -619,6 +624,10 @@ static void spice_session_set_property(GObject      *gobject,
         g_strfreev(s->disable_effects);
         s->disable_effects = g_value_dup_boxed(value);
         break;
+    case PROP_SECURE_CHANNELS:
+        g_strfreev(s->secure_channels);
+        s->secure_channels = g_value_dup_boxed(value);
+        break;
     case PROP_COLOR_DEPTH:
         s->color_depth = g_value_get_int(value);
         break;
@@ -1021,6 +1030,23 @@ static void spice_session_class_init(SpiceSessionClass *klass)
                             G_PARAM_STATIC_STRINGS));
 
     /**
+     * SpiceSession:secure-channels:
+     *
+     * A string array of channel types to be secured.
+     *
+     * Since: 0.20
+     **/
+    g_object_class_install_property
+        (gobject_class, PROP_SECURE_CHANNELS,
+         g_param_spec_boxed ("secure-channels",
+                             "Secure channels",
+                             "Array of channel type to secure",
+                             G_TYPE_STRV,
+                             G_PARAM_READWRITE |
+                             G_PARAM_STATIC_STRINGS));
+
+
+    /**
      * SpiceSession::channel-new:
      * @session: the session that emitted the signal
      * @channel: the new #SpiceChannel
-- 
1.8.2.1.342.gfa7285d



More information about the Spice-devel mailing list