]> git.proxmox.com Git - mirror_qemu.git/blame - qga/channel.h
qdev: Use GList for global properties
[mirror_qemu.git] / qga / channel.h
CommitLineData
125b310e
MR
1/*
2 * QEMU Guest Agent channel declarations
3 *
4 * Copyright IBM Corp. 2012
5 *
6 * Authors:
7 * Michael Roth <mdroth@linux.vnet.ibm.com>
8 *
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.
11 */
12#ifndef QGA_CHANNEL_H
13#define QGA_CHANNEL_H
14
125b310e
MR
15
16typedef struct GAChannel GAChannel;
17
18typedef enum {
19 GA_CHANNEL_VIRTIO_SERIAL,
20 GA_CHANNEL_ISA_SERIAL,
21 GA_CHANNEL_UNIX_LISTEN,
22} GAChannelMethod;
23
24typedef gboolean (*GAChannelCallback)(GIOCondition condition, gpointer opaque);
25
26GAChannel *ga_channel_new(GAChannelMethod method, const gchar *path,
27 GAChannelCallback cb, gpointer opaque);
28void ga_channel_free(GAChannel *c);
29GIOStatus ga_channel_read(GAChannel *c, gchar *buf, gsize size, gsize *count);
30GIOStatus ga_channel_write_all(GAChannel *c, const gchar *buf, gsize size);
31
32#endif