[Spice-devel] session: Improved docs for spice_session_connect()

Submitted by Zeeshan Ali (Khattak) on Nov. 19, 2014, 12:33 p.m.

Details

Message ID 1416400403-315-1-git-send-email-zeeshanak@gnome.org
State New
Headers show

Not browsing as part of any series.

Commit Message

Zeeshan Ali (Khattak) Nov. 19, 2014, 12:33 p.m.
Make it clear that users of this function must provide additional
sockets for individual channels.
---
 gtk/spice-session.c | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

Patch hide | download patch | download mbox

diff --git a/gtk/spice-session.c b/gtk/spice-session.c
index 88bcacd..cfc70bf 100644
--- a/gtk/spice-session.c
+++ b/gtk/spice-session.c
@@ -1322,8 +1322,16 @@  gboolean spice_session_connect(SpiceSession *session)
  * descriptor. This is useful if you create the fd yourself, for
  * example to setup a SSH tunnel.
  *
+ * Note however that additional sockets will be needed by all the channels
+ * created for @session so users of this API should hook into
+ * SpiceChannel::open-fd signal for each channel they are interested in, and
+ * create and pass a new socket to the channel using #spice_channel_open_fd, in
+ * the singal callback.
+ *
  * If @fd is -1, a valid fd will be requested later via the
- * SpiceChannel::open-fd signal.
+ * SpiceChannel::open-fd signal. Typically, you would want to just pass -1 as
+ * @fd this call since you will have to hook to SpiceChannel::open-fd signal
+ * anyway.
  *
  * Returns:
  **/

Comments

ack

On Wed, Nov 19, 2014 at 1:33 PM, Zeeshan Ali (Khattak)
<zeeshanak@gnome.org> wrote:
> Make it clear that users of this function must provide additional
> sockets for individual channels.
> ---
>  gtk/spice-session.c | 10 +++++++++-
>  1 file changed, 9 insertions(+), 1 deletion(-)
>
> diff --git a/gtk/spice-session.c b/gtk/spice-session.c
> index 88bcacd..cfc70bf 100644
> --- a/gtk/spice-session.c
> +++ b/gtk/spice-session.c
> @@ -1322,8 +1322,16 @@ gboolean spice_session_connect(SpiceSession *session)
>   * descriptor. This is useful if you create the fd yourself, for
>   * example to setup a SSH tunnel.
>   *
> + * Note however that additional sockets will be needed by all the channels
> + * created for @session so users of this API should hook into
> + * SpiceChannel::open-fd signal for each channel they are interested in, and
> + * create and pass a new socket to the channel using #spice_channel_open_fd, in
> + * the singal callback.
> + *
>   * If @fd is -1, a valid fd will be requested later via the
> - * SpiceChannel::open-fd signal.
> + * SpiceChannel::open-fd signal. Typically, you would want to just pass -1 as
> + * @fd this call since you will have to hook to SpiceChannel::open-fd signal
> + * anyway.
>   *
>   * Returns:
>   **/
> --
> 2.1.0
>
> _______________________________________________
> Spice-devel mailing list
> Spice-devel@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/spice-devel