[Spice-devel] [PATCH] add vd_agent announce capabilities message

Yonit Halperin yhalperi at redhat.com
Sun Aug 29 22:51:43 PDT 2010


On 29/08/2010 20:22, Alon Levy wrote:
> This adds a 256 bits capabilities bitmap message to spice-protocol.
>
>
> ---
>   spice/vd_agent.h |   17 +++++++++++++++++
>   1 files changed, 17 insertions(+), 0 deletions(-)
>
> diff --git a/spice/vd_agent.h b/spice/vd_agent.h
> index 8e1e6ca..9007bee 100644
> --- a/spice/vd_agent.h
> +++ b/spice/vd_agent.h
> @@ -54,6 +54,7 @@ enum {
>       VD_AGENT_REPLY,
>       VD_AGENT_CLIPBOARD,
>       VD_AGENT_DISPLAY_CONFIG,
> +    VD_AGENT_ANNOUNCE_CAPABILITIES,
>   };
>
>   typedef struct SPICE_ATTR_PACKED VDAgentMonConfig {
> @@ -119,6 +120,22 @@ enum {
>       VD_AGENT_CLIPBOARD_UTF8_TEXT = 1,
>   };
>
> +enum {
> +    // supports DisplayConfig message
> +    VD_AGENT_CAP_DISPLAY_CONFIG=0,
> +
> +    VD_AGENT_CAP_MAX=256,
> +};
> +
> +typedef struct SPICE_ATTR_PACKED VDAgentAnnounceCapabilities {
> +    uint32_t caps[256/(sizeof(uint32_t)*8)];
> +} VDAgentAnnounceCapabilities;
> +
> +#define VD_AGENT_HAS_CAPABILITY(caps, index) \
> +    (caps[index>>  8]&  (1<<  (index&  0xf)))
> +
> +#define VD_AGENT_SET_CAPABILITY(caps, index) \
> +    { caps[index>>  8] |= (1<<  (index&  0xf)); }
>
>   #include<spice/end-packed.h>
>
>    
Ack


More information about the Spice-devel mailing list