spice/server/red-channel-client-private.h
Pavel Grunt 40545d0403 rcc: Make OutgoingHandler private
Acked-by: Frediano Ziglio <fziglio@redhat.com>
2016-10-14 15:00:23 +01:00

88 lines
2.2 KiB
C

/*
Copyright (C) 2009-2015 Red Hat, Inc.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, see <http://www.gnu.org/licenses/>.
*/
#ifndef _H_RED_CHANNEL_CLIENT_PRIVATE
#define _H_RED_CHANNEL_CLIENT_PRIVATE
#include "red-channel.h"
#include "red-channel-client.h"
typedef struct OutgoingHandler {
OutgoingHandlerInterface *cb;
void *opaque;
struct iovec vec_buf[IOV_MAX];
int vec_size;
struct iovec *vec;
int pos;
int size;
} OutgoingHandler;
struct RedChannelClientPrivate
{
RedChannel *channel;
RedClient *client;
RedsStream *stream;
gboolean monitor_latency;
uint32_t refs;
struct {
uint32_t generation;
uint32_t client_generation;
uint32_t messages_window;
uint32_t client_window;
} ack_data;
struct {
/* this can be either main.marshaller or urgent.marshaller */
SpiceMarshaller *marshaller;
SpiceDataHeaderOpaque header;
uint32_t size;
RedPipeItem *item;
int blocked;
uint64_t last_sent_serial;
struct {
SpiceMarshaller *marshaller;
uint8_t *header_data;
RedPipeItem *item;
} main;
struct {
SpiceMarshaller *marshaller;
} urgent;
} send_data;
int during_send;
int id; // debugging purposes
GQueue pipe;
RedChannelCapabilities remote_caps;
int is_mini_header;
gboolean destroying;
int wait_migrate_data;
int wait_migrate_flush_mark;
RedChannelClientLatencyMonitor latency_monitor;
RedChannelClientConnectivityMonitor connectivity_monitor;
OutgoingHandler outgoing;
};
#endif /* _H_RED_CHANNEL_CLIENT_PRIVATE */