virtio: force VIRTIO_F_IOMMU_PLATFORM
[qemu.git] / qga / channel.h
blob8fd0c8f72c3a807543bc93992d5e58b325053ef6
1 /*
2 * QEMU Guest Agent channel declarations
4 * Copyright IBM Corp. 2012
6 * Authors:
7 * Michael Roth <mdroth@linux.vnet.ibm.com>
9 * This work is licensed under the terms of the GNU GPL, version 2 or later.
10 * See the COPYING file in the top-level directory.
12 #ifndef QGA_CHANNEL_H
13 #define QGA_CHANNEL_H
16 typedef struct GAChannel GAChannel;
18 typedef enum {
19 GA_CHANNEL_VIRTIO_SERIAL,
20 GA_CHANNEL_ISA_SERIAL,
21 GA_CHANNEL_UNIX_LISTEN,
22 GA_CHANNEL_VSOCK_LISTEN,
23 } GAChannelMethod;
25 typedef gboolean (*GAChannelCallback)(GIOCondition condition, gpointer opaque);
27 GAChannel *ga_channel_new(GAChannelMethod method, const gchar *path,
28 GAChannelCallback cb, gpointer opaque);
29 void ga_channel_free(GAChannel *c);
30 GIOStatus ga_channel_read(GAChannel *c, gchar *buf, gsize size, gsize *count);
31 GIOStatus ga_channel_write_all(GAChannel *c, const gchar *buf, gsize size);
33 #endif