contrib/spice-protocol/Add-port-channel-enum-values.patch
2013-04-09 16:30:34 +02:00

78 lines
1.9 KiB
Diff

From patchwork Fri Nov 30 12:42:57 2012
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Subject: [Spice-devel,spice-protocol] Add port channel enum values
Date: Fri, 30 Nov 2012 12:42:57 -0000
From: Marc-Andre Lureau <marcandre.lureau@gmail.com>
X-Patchwork-Id: 12544
Message-Id: <1354279377-10892-1-git-send-email-marcandre.lureau@gmail.com>
To: spice-devel@lists.freedesktop.org
The channel is based on Spicevmc which simply tunnels data between
client and server. A few messages have been added:
SPICE_MSG_PORT_INIT: Describes the port state and fqdn name, should be
sent only once when the client connects.
SPICE_MSG_PORT_EVENT: Server port event. SPICE_PORT_EVENT_OPENED and
SPICE_PORT_EVENT_CLOSED are typical values when the chardev is opened
or closed.
SPICE_MSGC_PORT_EVENT: Client port event.
(See related spice.proto change in spice-common)
---
spice/enums.h | 14 ++++++++++++++
spice/protocol.h | 6 ++++++
2 files changed, 20 insertions(+)
diff --git a/spice/enums.h b/spice/enums.h
index ba876cd..cf5715f 100644
--- a/spice/enums.h
+++ b/spice/enums.h
@@ -375,6 +375,7 @@ enum {
SPICE_CHANNEL_TUNNEL,
SPICE_CHANNEL_SMARTCARD,
SPICE_CHANNEL_USBREDIR,
+ SPICE_CHANNEL_PORT,
SPICE_END_CHANNEL
};
@@ -596,4 +597,17 @@ enum {
SPICE_MSGC_END_SPICEVMC
};
+enum {
+ SPICE_MSG_PORT_INIT = 201,
+ SPICE_MSG_PORT_EVENT,
+
+ SPICE_MSG_END_PORT
+};
+
+enum {
+ SPICE_MSGC_PORT_EVENT = 201,
+
+ SPICE_MSGC_END_PORT
+};
+
#endif /* _H_SPICE_ENUMS */
diff --git a/spice/protocol.h b/spice/protocol.h
index 0671292..e500a17 100644
--- a/spice/protocol.h
+++ b/spice/protocol.h
@@ -135,6 +135,12 @@ enum {
SPICE_INPUTS_CAP_KEY_SCANCODE,
};
+enum {
+ SPICE_PORT_EVENT_OPENED,
+ SPICE_PORT_EVENT_CLOSED,
+ SPICE_PORT_EVENT_BREAK,
+};
+
#include <spice/end-packed.h>
#endif /* _H_SPICE_PROTOCOL */