[Spice-commits] 2 commits - spice/vd_agent.h
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Thu Mar 19 14:36:16 UTC 2020
spice/vd_agent.h | 33 ++++++++++++++++++++++++++++++++-
1 file changed, 32 insertions(+), 1 deletion(-)
New commits:
commit dfc27e60d7775f988d3f710263cbd6aa682b86fa
Author: Frediano Ziglio <fziglio at redhat.com>
Date: Wed Mar 18 10:08:04 2020 +0000
vd_agent: Add structure for VD_AGENT_FILE_XFER_STATUS_NOT_ENOUGH_SPACE details
Signed-off-by: Frediano Ziglio <fziglio at redhat.com>
Acked-by: Victor Toso <victortoso at redhat.com>
diff --git a/spice/vd_agent.h b/spice/vd_agent.h
index b0d6fde..5a2eb81 100644
--- a/spice/vd_agent.h
+++ b/spice/vd_agent.h
@@ -127,7 +127,7 @@ typedef struct SPICE_ATTR_PACKED VDAgentFileXferStatusMessage {
* Type of data varies with the result:
* result : data type (NULL if no data)
* VD_AGENT_FILE_XFER_STATUS_ERROR : VDAgentFileXferStatusError
- * VD_AGENT_FILE_XFER_STATUS_NOT_ENOUGH_SPACE : uint64_t
+ * VD_AGENT_FILE_XFER_STATUS_NOT_ENOUGH_SPACE : VDAgentFileXferStatusNotEnoughSpace
* VD_AGENT_FILE_XFER_STATUS_SESSION_LOCKED : NULL
* VD_AGENT_FILE_XFER_STATUS_VDAGENT_NOT_CONNECTED : NULL
* VD_AGENT_FILE_XFER_STATUS_DISABLED : NULL
@@ -135,6 +135,15 @@ typedef struct SPICE_ATTR_PACKED VDAgentFileXferStatusMessage {
uint8_t data[0];
} VDAgentFileXferStatusMessage;
+/* Detailed error for VD_AGENT_FILE_XFER_STATUS_NOT_ENOUGH_SPACE.
+ * Only present if VD_AGENT_CAP_FILE_XFER_DETAILED_ERRORS is
+ * negotiated and the size of the message can contain it.
+ */
+typedef struct SPICE_ATTR_PACKED VDAgentFileXferStatusNotEnoughSpace {
+ /* Disk free space in bytes. */
+ uint64_t disk_free_space;
+} VDAgentFileXferStatusNotEnoughSpace;
+
enum {
/* Error number is a G_IO_ERROR_xxx defined in
* https://developer.gnome.org/gio/stable/gio-GIOError.html
commit f224422c0d0e18ef6b1c3c70f923b6fb81d0e7f3
Author: Frediano Ziglio <fziglio at redhat.com>
Date: Tue Mar 17 12:56:00 2020 +0000
vd_agent: Add a new detail for VD_AGENT_FILE_XFER_STATUS_ERROR status
This will allow the agent to send back a more detailed error code.
More comments on header file.
Signed-off-by: Frediano Ziglio <fziglio at redhat.com>
Acked-by: Victor Toso <victortoso at redhat.com>
diff --git a/spice/vd_agent.h b/spice/vd_agent.h
index 51889fc..b0d6fde 100644
--- a/spice/vd_agent.h
+++ b/spice/vd_agent.h
@@ -126,6 +126,7 @@ typedef struct SPICE_ATTR_PACKED VDAgentFileXferStatusMessage {
* to clients with VD_AGENT_CAP_FILE_XFER_DETAILED_ERRORS capability.
* Type of data varies with the result:
* result : data type (NULL if no data)
+ * VD_AGENT_FILE_XFER_STATUS_ERROR : VDAgentFileXferStatusError
* VD_AGENT_FILE_XFER_STATUS_NOT_ENOUGH_SPACE : uint64_t
* VD_AGENT_FILE_XFER_STATUS_SESSION_LOCKED : NULL
* VD_AGENT_FILE_XFER_STATUS_VDAGENT_NOT_CONNECTED : NULL
@@ -134,6 +135,27 @@ typedef struct SPICE_ATTR_PACKED VDAgentFileXferStatusMessage {
uint8_t data[0];
} VDAgentFileXferStatusMessage;
+enum {
+ /* Error number is a G_IO_ERROR_xxx defined in
+ * https://developer.gnome.org/gio/stable/gio-GIOError.html
+ */
+ VD_AGENT_FILE_XFER_STATUS_ERROR_GLIB_IO,
+};
+
+/* Detailed error for VD_AGENT_FILE_XFER_STATUS_ERROR.
+ * Only present if VD_AGENT_CAP_FILE_XFER_DETAILED_ERRORS is
+ * negotiated and the size of the message can contain it.
+ * Otherwise a generic error should be assumed and reported.
+ */
+typedef struct SPICE_ATTR_PACKED VDAgentFileXferStatusError {
+ /* One of VD_AGENT_FILE_XFER_STATUS_ERROR_xxx enumeration
+ */
+ uint8_t error_type;
+ /* An error code which enumeration depends on error_type
+ */
+ uint32_t error_code;
+} VDAgentFileXferStatusError;
+
typedef struct SPICE_ATTR_PACKED VDAgentFileXferStartMessage {
uint32_t id;
uint8_t data[0];
More information about the Spice-commits
mailing list