[Spice-devel] [PATCH spice-gtk] session: update spice_session_connect() doc

Marc-André Lureau marcandre.lureau at redhat.com
Fri Aug 21 05:02:42 PDT 2015


Update the documentation about the return value, and how to watch for
connection success.

Releated to:
https://bugzilla.redhat.com/show_bug.cgi?id=1253848
---
 gtk/spice-session.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/gtk/spice-session.c b/gtk/spice-session.c
index 1a68d7d..234ff54 100644
--- a/gtk/spice-session.c
+++ b/gtk/spice-session.c
@@ -1489,7 +1489,11 @@ SpiceSession *spice_session_new_from_session(SpiceSession *session)
  * Open the session using the #SpiceSession:host and
  * #SpiceSession:port.
  *
- * Returns: %FALSE if the connection failed.
+ * Returns: %FALSE if the session state is invalid for connection
+ * request. %TRUE if the connection is initiated. To know whether the
+ * connection is established, you must watch for channels creation
+ * (#SpiceSession::channel-new) and the channels state
+ * (#SpiceChannel::channel-event).
  **/
 gboolean spice_session_connect(SpiceSession *session)
 {
-- 
2.4.3



More information about the Spice-devel mailing list