Re: [Spice-devel] [PATCH spice-protocol] Add agent information message

2014-10-24 Thread Pavel Grunt
Hi,

I wanted to show information about the agent in the Guest Details dialog of 
virt-viewer ( http://people.freedesktop.org/~pgrunt/guest_details.png ).
The information about other components (qxl driver, spice server) may also be 
displayed there as well. 
I think this can be useful for a user when posting a bug, because it won't be 
necessary to use other tools to get these version informations.


- Original Message -
> 
> Hi
> 
> - Original Message -
> > Message will be used by client for requesting an information about
> > a version of the agent running on the guest side.
> 
> Assuming the information is cheap to compute and send, and will be
> (almost) always queried, why not send it at beginning of session,
> when the client has a special cap set?
> 
> Regarding the protocol change, I would rather not introduce the
> sub-"type" field in a message, and instead rely on existing message
> type. This is what I'd propose:
> 
> - client: set AGENT_CAP_GUEST_VERSION
> - agent: send a  VDAgentGuestVersion when cap is set (define it as
> utf8 string)
> 
> Tbh, I worry about the usefulness of this feature. You may as well be
> interested about the version of other components in the guest. And
> to query that, you have better tools in the guest (and other
> agents/tools/daemons export that information). I am not quite sure
> what the spice client could do with this information but just expose
> it to the user, and then?...
> 
> Please clarify and provide a bug with the description of the issue.
> 
> thanks!
> 
___
Spice-devel mailing list
Spice-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/spice-devel


Re: [Spice-devel] [PATCH spice-protocol] Add agent information message

2014-10-23 Thread Marc-André Lureau
Hi

- Original Message -
> Message will be used by client for requesting an information about
> a version of the agent running on the guest side.

Assuming the information is cheap to compute and send, and will be (almost) 
always queried, why not send it at beginning of session, when the client has a 
special cap set? 

Regarding the protocol change, I would rather not introduce the sub-"type" 
field in a message, and instead rely on existing message type. This is what I'd 
propose:

- client: set AGENT_CAP_GUEST_VERSION
- agent: send a  VDAgentGuestVersion when cap is set (define it as utf8 string)

Tbh, I worry about the usefulness of this feature. You may as well be 
interested about the version of other components in the guest. And to query 
that, you have better tools in the guest (and other agents/tools/daemons export 
that information). I am not quite sure what the spice client could do with this 
information but just expose it to the user, and then?...

Please clarify and provide a bug with the description of the issue.

thanks!

> ---
> The intention is to show this information in virt-viewer
> ---
>  spice/vd_agent.h | 10 ++
>  1 file changed, 10 insertions(+)
> 
> diff --git a/spice/vd_agent.h b/spice/vd_agent.h
> index 7464661..ef37e9e 100644
> --- a/spice/vd_agent.h
> +++ b/spice/vd_agent.h
> @@ -77,6 +77,7 @@ enum {
>  VD_AGENT_FILE_XFER_DATA,
>  VD_AGENT_CLIENT_DISCONNECTED,
>  VD_AGENT_MAX_CLIPBOARD,
> +VD_AGENT_INFORMATION,
>  VD_AGENT_END_MESSAGE,
>  };
>  
> @@ -245,6 +246,15 @@ typedef struct SPICE_ATTR_PACKED
> VDAgentAnnounceCapabilities {
>  #define VD_AGENT_SET_CAPABILITY(caps, index) \
>  { (caps)[(index) / 32] |= (1 << ((index) % 32)); }
>  
> +typedef struct SPICE_ATTR_PACKED VDAgentInformation {
> +uint32_t type;
> +uint32_t data[0];
> +} VDAgentInformation;
> +
> +enum {
> +VD_AGENT_INFORMATION_VERSION,
> +};
> +
>  #include 
>  
>  #endif /* _H_VD_AGENT */
> --
> 1.9.3
> 
> ___
> Spice-devel mailing list
> Spice-devel@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/spice-devel
> 
___
Spice-devel mailing list
Spice-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/spice-devel


[Spice-devel] [PATCH spice-protocol] Add agent information message

2014-10-23 Thread Pavel Grunt
Message will be used by client for requesting an information about
a version of the agent running on the guest side.
---
The intention is to show this information in virt-viewer
---
 spice/vd_agent.h | 10 ++
 1 file changed, 10 insertions(+)

diff --git a/spice/vd_agent.h b/spice/vd_agent.h
index 7464661..ef37e9e 100644
--- a/spice/vd_agent.h
+++ b/spice/vd_agent.h
@@ -77,6 +77,7 @@ enum {
 VD_AGENT_FILE_XFER_DATA,
 VD_AGENT_CLIENT_DISCONNECTED,
 VD_AGENT_MAX_CLIPBOARD,
+VD_AGENT_INFORMATION,
 VD_AGENT_END_MESSAGE,
 };
 
@@ -245,6 +246,15 @@ typedef struct SPICE_ATTR_PACKED 
VDAgentAnnounceCapabilities {
 #define VD_AGENT_SET_CAPABILITY(caps, index) \
 { (caps)[(index) / 32] |= (1 << ((index) % 32)); }
 
+typedef struct SPICE_ATTR_PACKED VDAgentInformation {
+uint32_t type;
+uint32_t data[0];
+} VDAgentInformation;
+
+enum {
+VD_AGENT_INFORMATION_VERSION,
+};
+
 #include 
 
 #endif /* _H_VD_AGENT */
-- 
1.9.3

___
Spice-devel mailing list
Spice-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/spice-devel