Should probably be merged with 37/62 use pipe_size helpers. It's a bit awkward to have 3 similar functions, even though they will be completed later on. A bit of documentation to understand the intended usage could help.
>From my understanding, - sum_pipes_size(): return the sum of all the rcc pipe size - min_pipe_size(): return the min size of all the rcc pipe - max_pipes_size(): return the max size of all the rcc pipe On Tue, Apr 26, 2011 at 12:55 PM, Alon Levy <[email protected]> wrote: > --- > server/red_channel.c | 15 +++++++++++++++ > 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 4625158..34916fd 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 261aa60..38043f1 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); > -- > 1.7.4.4 > > _______________________________________________ > Spice-devel mailing list > [email protected] > http://lists.freedesktop.org/mailman/listinfo/spice-devel > -- Marc-André Lureau _______________________________________________ Spice-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/spice-devel
