[Spice-devel] [PATCH 4/4] add some comments to cursor-channel.h header
Jonathon Jongsma
jjongsma at redhat.com
Wed May 25 20:19:36 UTC 2016
On Fri, 2016-05-13 at 10:16 +0100, Frediano Ziglio wrote:
> Explain usage of the class.
>
> Signed-off-by: Frediano Ziglio <fziglio at redhat.com>
> ---
> server/cursor-channel.h | 30 +++++++++++++++++++++++++++++-
> 1 file changed, 29 insertions(+), 1 deletion(-)
>
> diff --git a/server/cursor-channel.h b/server/cursor-channel.h
> index 6c89bc3..7e801a4 100644
> --- a/server/cursor-channel.h
> +++ b/server/cursor-channel.h
> @@ -23,20 +23,48 @@
> #include "red-worker.h"
> #include "red-parse-qxl.h"
>
> +/**
> + * This type it's a RedChannel class which implement cursor (mouse)
it's -> is
implement -> implements
> + * movements.
> + * A pointer to CursorChannel can be converted to a RedChannel.
> + */
> typedef struct CursorChannel CursorChannel;
>
> +/**
> + * Create CursorChannel.
> + * CursorChannel is intended to be run in a separate thread so
> + * so users of this class should attempt to serialize the class
> + * execution and setup client callbacks after creating the class
> + * using cursor_channel_client_migrate and cursor_channel_connect
> + * as helpers.
> + */
I'm afraid I don't fully understand what this comment is trying to communicate.
> CursorChannel* cursor_channel_new (RedWorker *worker);
> -void cursor_channel_disconnect (CursorChannel
> *cursor_channel);
> +
> +/**
> + * Cause the channel to disconnect all clients
> + */
> +void cursor_channel_disconnect (CursorChannel *cursor);
> void cursor_channel_reset (CursorChannel *cursor);
> void cursor_channel_init (CursorChannel *cursor);
> void cursor_channel_process_cmd (CursorChannel *cursor,
> RedCursorCmd *cursor_cmd);
> void cursor_channel_set_mouse_mode(CursorChannel *cursor,
> uint32_t mode);
> +
> +/**
> + * Connect a new client to CursorChannel.
> + * This is the equivalent of ReChannel client connect callback.
> + * See comment on cursor_channel_new.
> + */
> void cursor_channel_connect (CursorChannel *cursor,
> RedClient *client,
> RedsStream *stream,
> int migrate,
> uint32_t *common_caps, int
> num_common_caps,
> uint32_t *caps, int
> num_caps);
>
> +/**
> + * Migrate a client channel from a CursorChannel.
> + * This is the equivalent of ReChannel client migrate callback.
> + * See comment on cursor_channel_new.
> + */
> void cursor_channel_client_migrate(RedChannelClient *client);
>
> #endif /* CURSOR_CHANNEL_H_ */
Otherwise looks fine.
Reviewed-by: Jonathon Jongsma <jjongsma at redhat.com>
More information about the Spice-devel
mailing list