diff options
author | Alon Levy <alevy@redhat.com> | 2011-04-13 08:52:44 +0300 |
---|---|---|
committer | Alon Levy <alevy@redhat.com> | 2011-04-26 13:50:57 +0300 |
commit | 1853239409ee6e392bc45b72ea12b4ec672a5919 (patch) | |
tree | d55d1c859349e2511c09b0f90f61ffaaf3672047 | |
parent | 83fc5385532b23416bfe7f5b8b998e09228acc79 (diff) |
server/red_channel: add pipe_size helpers
-rw-r--r-- | server/red_channel.c | 15 | ||||
-rw-r--r-- | server/red_channel.h | 4 |
2 files changed, 19 insertions, 0 deletions
diff --git a/server/red_channel.c b/server/red_channel.c index 4625158f..34916fd6 100644 --- a/server/red_channel.c +++ b/server/red_channel.c @@ -1100,3 +1100,18 @@ void red_channel_pipes_new_add_tail(RedChannel *channel, new_pipe_item_t creator red_channel_client_pipe_add_tail_no_push); red_channel_push(channel); } + +uint32_t red_channel_max_pipe_size(RedChannel *channel) +{ + return channel->rcc ? channel->rcc->pipe_size : 0; +} + +uint32_t red_channel_min_pipe_size(RedChannel *channel) +{ + return channel->rcc ? channel->rcc->pipe_size : 0; +} + +uint32_t red_channel_sum_pipes_size(RedChannel *channel) +{ + return channel->rcc ? channel->rcc->pipe_size : 0; +} diff --git a/server/red_channel.h b/server/red_channel.h index 261aa604..38043f1b 100644 --- a/server/red_channel.h +++ b/server/red_channel.h @@ -367,6 +367,10 @@ RedClient *red_channel_client_get_client(RedChannelClient *rcc); * not via the below accessor and direct header manipulation. */ SpiceDataHeader *red_channel_client_get_header(RedChannelClient *rcc); +uint32_t red_channel_max_pipe_size(RedChannel *channel); +uint32_t red_channel_min_pipe_size(RedChannel *channel); +uint32_t red_channel_sum_pipes_size(RedChannel *channel); + /* apply given function to all connected clients */ typedef void (*channel_client_visitor)(RedChannelClient *rcc); typedef void (*channel_client_visitor_data)(RedChannelClient *rcc, void *data); |