[spice-gtk PATCH v2 6/7] session: get main channel from spice-session

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is necessary in order to use the main-channel in other channels
for instance to playback and record channels to comunicate with the
agent.
---
 gtk/spice-session-priv.h | 1 +
 gtk/spice-session.c      | 7 +++++++
 2 files changed, 8 insertions(+)

diff --git a/gtk/spice-session-priv.h b/gtk/spice-session-priv.h
index 049973a..de79c51 100644
--- a/gtk/spice-session-priv.h
+++ b/gtk/spice-session-priv.h
@@ -99,6 +99,7 @@ guint spice_session_get_n_display_channels(SpiceSession *session);
 void spice_session_set_main_channel(SpiceSession *session, SpiceChannel *channel);
 gboolean spice_session_set_migration_session(SpiceSession *session, SpiceSession *mig_session);
 SpiceAudio *spice_audio_get(SpiceSession *session, GMainContext *context);
+SpiceChannel *spice_session_get_main_channel(SpiceSession *session);
 G_END_DECLS
 
 #endif /* __SPICE_CLIENT_SESSION_PRIV_H__ */
diff --git a/gtk/spice-session.c b/gtk/spice-session.c
index 1a68d7d..ec68101 100644
--- a/gtk/spice-session.c
+++ b/gtk/spice-session.c
@@ -2721,3 +2721,10 @@ gboolean spice_session_set_migration_session(SpiceSession *session, SpiceSession
 
     return TRUE;
 }
+
+G_GNUC_INTERNAL
+SpiceChannel *spice_session_get_main_channel(SpiceSession *session)
+{
+    g_return_val_if_fail(SPICE_IS_SESSION(session), FALSE);
+    return session->priv->cmain;
+}
-- 
2.1.0

_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/spice-devel





[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]