mirror of
https://gitlab.uni-freiburg.de/opensourcevdi/spice
synced 2026-01-08 12:24:55 +00:00
rcc: Make OutgoingHandler private
Acked-by: Frediano Ziglio <fziglio@redhat.com>
This commit is contained in:
parent
4dd9e8a93c
commit
40545d0403
@ -21,6 +21,16 @@
|
||||
#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;
|
||||
@ -70,6 +80,8 @@ struct RedChannelClientPrivate
|
||||
|
||||
RedChannelClientLatencyMonitor latency_monitor;
|
||||
RedChannelClientConnectivityMonitor connectivity_monitor;
|
||||
|
||||
OutgoingHandler outgoing;
|
||||
};
|
||||
|
||||
#endif /* _H_RED_CHANNEL_CLIENT_PRIVATE */
|
||||
|
||||
@ -874,10 +874,10 @@ static gboolean red_channel_client_initable_init(GInitable *initable,
|
||||
self->incoming.cb = &self->priv->channel->incoming_cb;
|
||||
self->incoming.header.data = self->incoming.header_buf;
|
||||
|
||||
self->outgoing.opaque = self;
|
||||
self->outgoing.cb = &self->priv->channel->outgoing_cb;
|
||||
self->outgoing.pos = 0;
|
||||
self->outgoing.size = 0;
|
||||
self->priv->outgoing.opaque = self;
|
||||
self->priv->outgoing.cb = &self->priv->channel->outgoing_cb;
|
||||
self->priv->outgoing.pos = 0;
|
||||
self->priv->outgoing.size = 0;
|
||||
|
||||
g_queue_init(&self->priv->pipe);
|
||||
if (self->priv->stream)
|
||||
@ -1189,7 +1189,7 @@ void red_channel_client_receive(RedChannelClient *rcc)
|
||||
void red_channel_client_send(RedChannelClient *rcc)
|
||||
{
|
||||
g_object_ref(rcc);
|
||||
red_peer_handle_outgoing(rcc->priv->stream, &rcc->outgoing);
|
||||
red_peer_handle_outgoing(rcc->priv->stream, &rcc->priv->outgoing);
|
||||
g_object_unref(rcc);
|
||||
}
|
||||
|
||||
|
||||
@ -191,16 +191,6 @@ gboolean red_channel_client_set_migration_seamless(RedChannelClient *rcc);
|
||||
void red_channel_client_set_destroying(RedChannelClient *rcc);
|
||||
gboolean red_channel_client_is_destroying(RedChannelClient *rcc);
|
||||
|
||||
typedef struct OutgoingHandler {
|
||||
OutgoingHandlerInterface *cb;
|
||||
void *opaque;
|
||||
struct iovec vec_buf[IOV_MAX];
|
||||
int vec_size;
|
||||
struct iovec *vec;
|
||||
int pos;
|
||||
int size;
|
||||
} OutgoingHandler;
|
||||
|
||||
typedef struct IncomingHandler {
|
||||
IncomingHandlerInterface *cb;
|
||||
void *opaque;
|
||||
@ -216,7 +206,6 @@ struct RedChannelClient
|
||||
GObject parent;
|
||||
|
||||
/* protected */
|
||||
OutgoingHandler outgoing;
|
||||
IncomingHandler incoming;
|
||||
|
||||
RedChannelClientPrivate *priv;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user