[Spice-commits] spice/vd_agent.h

Victor Toso de Carvalho victortoso at kemper.freedesktop.org
Wed May 31 21:07:06 UTC 2017


 spice/vd_agent.h |    9 +++++++++
 1 file changed, 9 insertions(+)

New commits:
commit 8b025c4ed0733fab6d185d051f9cc027ab4da925
Author: Jakub Janků <janku.jakub.jj at gmail.com>
Date:   Sun May 21 15:09:34 2017 +0200

    agent: Add support for reporting on free space
    
    Agent can send VDAgentFileXferStatusMessage with result
    VD_AGENT_FILE_XFER_STATUS_NOT_ENOUGH_SPACE to indicate lack of free
    space. This enables more detailed error reporting, so the user knows
    why the file transfer has failed.
    
    Add VD_AGENT_CAP_FILE_XFER_DETAILED_ERRORS to ensure detailed errors
    are not sent to clients that do not support it. This can be used
    with more file xfer errors in the future.
    
    Acked-by: Pavel Grunt <pgrunt at redhat.com>

diff --git a/spice/vd_agent.h b/spice/vd_agent.h
index 3b1f183..2a168d0 100644
--- a/spice/vd_agent.h
+++ b/spice/vd_agent.h
@@ -99,11 +99,19 @@ enum {
     VD_AGENT_FILE_XFER_STATUS_CANCELLED,
     VD_AGENT_FILE_XFER_STATUS_ERROR,
     VD_AGENT_FILE_XFER_STATUS_SUCCESS,
+    VD_AGENT_FILE_XFER_STATUS_NOT_ENOUGH_SPACE,
 };
 
 typedef struct SPICE_ATTR_PACKED VDAgentFileXferStatusMessage {
    uint32_t id;
    uint32_t result;
+   /* Used to send additional data for detailed error messages
+    * to clients with VD_AGENT_CAP_FILE_XFER_DETAILED_ERRORS capability.
+    * Type of data varies with the result:
+    * result : data type
+    * VD_AGENT_FILE_XFER_STATUS_NOT_ENOUGH_SPACE : uint64_t
+    */
+   uint8_t data[0];
 } VDAgentFileXferStatusMessage;
 
 typedef struct SPICE_ATTR_PACKED VDAgentFileXferStartMessage {
@@ -248,6 +256,7 @@ enum {
     VD_AGENT_CAP_AUDIO_VOLUME_SYNC,
     VD_AGENT_CAP_MONITORS_CONFIG_POSITION,
     VD_AGENT_CAP_FILE_XFER_DISABLED,
+    VD_AGENT_CAP_FILE_XFER_DETAILED_ERRORS,
     VD_AGENT_END_CAP,
 };
 


More information about the Spice-commits mailing list