> 
> The message serves for passing the device address and device display ID
> information for all display channels from SPICE server to the vd_agent.
> 
> Signed-off-by: Lukáš Hrázký <lhra...@redhat.com>
> ---
>  spice/vd_agent.h | 15 +++++++++++++++
>  1 file changed, 15 insertions(+)
> 
> diff --git a/spice/vd_agent.h b/spice/vd_agent.h
> index dda7044..5e618b7 100644
> --- a/spice/vd_agent.h
> +++ b/spice/vd_agent.h
> @@ -91,6 +91,7 @@ enum {
>      VD_AGENT_CLIENT_DISCONNECTED,
>      VD_AGENT_MAX_CLIPBOARD,
>      VD_AGENT_AUDIO_VOLUME_SYNC,
> +    VD_AGENT_GRAPHICS_DEVICE_INFO,
>      VD_AGENT_END_MESSAGE,
>  };
>  
> @@ -248,6 +249,19 @@ typedef struct SPICE_ATTR_PACKED VDAgentAudioVolumeSync
> {
>      uint16_t volume[0];
>  } VDAgentAudioVolumeSync;
>  
> +typedef struct SPICE_ATTR_PACKED VDAgentDeviceDisplayInfo {
> +    uint32_t channel_id;
> +    uint32_t monitor_id;

Other parts of the SPICE protocol use 8 bit for these.
Do you want to extend them in the future?
Maybe better to put some comment on possible limits?

> +    uint32_t device_display_id;
> +    uint32_t device_address_len;
> +    uint8_t device_address[0];  // a zero-terminated string

Similar comments for spice-protocol for these last 2 fields.

> +} VDAgentDeviceDisplayInfo;
> +
> +typedef struct SPICE_ATTR_PACKED VDAgentGraphicsDeviceInfo {
> +    uint32_t count;
> +    VDAgentDeviceDisplayInfo device_info[0];
> +} VDAgentGraphicsDeviceInfo;
> +
>  enum {
>      VD_AGENT_CAP_MOUSE_STATE = 0,
>      VD_AGENT_CAP_MONITORS_CONFIG,
> @@ -264,6 +278,7 @@ enum {
>      VD_AGENT_CAP_MONITORS_CONFIG_POSITION,
>      VD_AGENT_CAP_FILE_XFER_DISABLED,
>      VD_AGENT_CAP_FILE_XFER_DETAILED_ERRORS,
> +    VD_AGENT_CAP_GRAPHICS_DEVICE_INFO,
>      VD_AGENT_END_CAP,
>  };
>  

Frediano
_______________________________________________
Spice-devel mailing list
Spice-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/spice-devel

Reply via email to