diff options
author | Frediano Ziglio <fziglio@redhat.com> | 2018-05-05 16:43:31 +0100 |
---|---|---|
committer | Frediano Ziglio <fziglio@redhat.com> | 2018-05-10 19:49:03 +0100 |
commit | b98f19b1681003c6adb096ff71b29ad562db6e3a (patch) | |
tree | 6d89717c35c516f31ceaf79f162dad98917a3496 /spice.proto | |
parent | fc46379b37e8dd9d06c96c074af4cc1738cacffd (diff) |
protocol: Use a typedef to specify stream_id type
This change does not affect generated code but make source more
readable. Also document in a single location the range of this
type.
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Jonathon Jongsma <jjongsma@redhat.com>
Diffstat (limited to 'spice.proto')
-rw-r--r-- | spice.proto | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/spice.proto b/spice.proto index 6f873a2..4d916bb 100644 --- a/spice.proto +++ b/spice.proto @@ -4,6 +4,11 @@ typedef fixed28_4 int32 @ctype(SPICE_FIXED28_4); +/* IDs of the video stream messages. + * These IDs are in the interval [0, SPICE_MAX_NUM_STREAMS) + */ +typedef stream_id_t uint32; + struct Point { int32 x; int32 y; @@ -698,7 +703,7 @@ struct String { }; struct StreamDataHeader { - uint32 id; + stream_id_t id; uint32 multi_media_time; }; @@ -756,7 +761,7 @@ channel DisplayChannel : BaseChannel { message { uint32 surface_id; - uint32 id; + stream_id_t id; stream_flags flags; video_codec_type codec_type; uint64 stamp; @@ -775,12 +780,12 @@ channel DisplayChannel : BaseChannel { } stream_data; message { - uint32 id; + stream_id_t id; Clip clip; } stream_clip; message { - uint32 id; + stream_id_t id; } stream_destroy; Empty stream_destroy_all; @@ -954,7 +959,7 @@ channel DisplayChannel : BaseChannel { } draw_composite; message { - uint32 stream_id; + stream_id_t stream_id; uint32 unique_id; uint32 max_window_size; uint32 timeout_ms; @@ -986,7 +991,7 @@ channel DisplayChannel : BaseChannel { } init = 101; message { - uint32 stream_id; + stream_id_t stream_id; uint32 unique_id; // the mm_time of the first frame included in the report uint32 start_frame_mm_time; |