From c9e3b058e452e3e00ae009163a5de66e99987492 Mon Sep 17 00:00:00 2001 From: Marc-AndrĂ© Lureau Date: Tue, 3 Sep 2013 19:35:09 +0200 Subject: server: make cursor channel private MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Acked-by: Fabiano FidĂȘncio --- server/red_channel.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'server/red_channel.h') diff --git a/server/red_channel.h b/server/red_channel.h index 1f1538ea..201a4d27 100644 --- a/server/red_channel.h +++ b/server/red_channel.h @@ -32,6 +32,7 @@ #include "red_common.h" #include "demarshallers.h" #include "reds_stream.h" +#include "stat.h" #define MAX_SEND_BUFS 1000 #define CLIENT_ACK_WINDOW 20 @@ -127,6 +128,7 @@ typedef struct OutgoingHandler { /* Red Channel interface */ +typedef struct RedsStream RedsStream; typedef struct RedChannel RedChannel; typedef struct RedChannelClient RedChannelClient; typedef struct RedClient RedClient; @@ -335,10 +337,13 @@ struct RedChannel { // TODO: when different channel_clients are in different threads from Channel -> need to protect! pthread_t thread_id; #ifdef RED_STATISTICS + StatNodeRef stat; uint64_t *out_bytes_counter; #endif }; +#define RED_CHANNEL(Channel) ((RedChannel *)(Channel)) + /* * When an error occurs over a channel, we treat it as a warning * for spice-server and shutdown the channel. @@ -370,6 +375,7 @@ RedChannel *red_channel_create_parser(int size, channel_handle_parsed_proc handle_parsed, ChannelCbs *channel_cbs, uint32_t migration_flags); +void red_channel_set_stat_node(RedChannel *channel, StatNodeRef stat); void red_channel_register_client_cbs(RedChannel *channel, ClientCbs *client_cbs); // caps are freed when the channel is destroyed -- cgit