[Spice-devel] [PATCH spice-common 2/2] Add protocol documentation for "channel" and "protocol"

Victor Toso lists at victortoso.com
Tue Oct 18 13:48:28 UTC 2016


Hi,

On Tue, Oct 18, 2016 at 10:20:44AM +0100, Frediano Ziglio wrote:
> Signed-off-by: Frediano Ziglio <fziglio at redhat.com>

Acked-by: Victor Toso <victortoso at redhat.com>
both patches

> ---
>  docs/spice_protocol.txt | 46 +++++++++++++++++++++++++++++++++++++++++++++-
>  1 file changed, 45 insertions(+), 1 deletion(-)
> 
> diff --git a/docs/spice_protocol.txt b/docs/spice_protocol.txt
> index 892872d..e982d26 100644
> --- a/docs/spice_protocol.txt
> +++ b/docs/spice_protocol.txt
> @@ -220,7 +220,51 @@ Example:
>  Channels
>  --------
>  
> -TODO
> +    channel ::= "channel" <identifier> [ ":" <identifier> ] "{" <channel_messages> "}" <attributes> ";" ;
> +    channel_messages ::= <channel_message>|<channel_messages><channel_message> ;
> +    channel_message ::= "server:" | "client:" | "message" <identifier> [ "=" <integer> ] ;
> +
> +Example:
> +
> +    channel ExampleChannel {
> +    server:
> +       message {
> +          uint32 dummy;
> +       } Dummy;
> +    };
> +
> +Note that every message is associated with a number which is used in the protocol.
> +The assignment work in a similar way to enumeration in C beside first message is
> +assigned 1 value and not 0. So first message (if no integer is specified) is assigned
> +1, second 2 and so on.
> +
> +`server:` or `client:` specify the direction of messages following, `server` specify
> +messages from server while `client` from client. If not specified is assumed from
> +server.
> +
> +For each channel you can specify a parent channel. Derived channel inherite all
> +messages specified in the parent.
> +Note that messages from parent can be overrided by derived channels.
> +
> +Protocol
> +--------
> +
> +    protocol ::= "protocol" <identifier> "{" <protocol_channels> "}" ";" ;
> +    protocol_channels ::= <protocol_channel>|<protocol_channels><protocol_channel> ;
> +    protocol_channel ::= <identifier> <identifier> [ "=" <integer> ] ";" ;
> +
> +Example:
> +
> +    protocol Example {
> +        ExampleChannel first = 1001;
> +    };
> +
> +Protocol specify the list of channel supported. Channel have an associated number
> +assigned in a similar way of channels (incremented from one to the next with
> +first starting from 0 if not specified).
> +
> +*NOTE*: Due to the way currently code is generate you should use
> +small numbers.
>  
>  Attributes
>  ----------
> -- 
> 2.7.4
> 
> _______________________________________________
> Spice-devel mailing list
> Spice-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/spice-devel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/spice-devel/attachments/20161018/21c9d5fd/attachment.sig>


More information about the Spice-devel mailing list