]> git.proxmox.com Git - mirror_qemu.git/blame - qga/guest-agent-core.h
s390x/skeys: Fix instance and class size
[mirror_qemu.git] / qga / guest-agent-core.h
CommitLineData
13a286d5
MR
1/*
2 * QEMU Guest Agent core declarations
3 *
4 * Copyright IBM Corp. 2011
5 *
6 * Authors:
7 * Adam Litke <aglitke@linux.vnet.ibm.com>
8 * Michael Roth <mdroth@linux.vnet.ibm.com>
9 *
10 * This work is licensed under the terms of the GNU GPL, version 2 or later.
11 * See the COPYING file in the top-level directory.
12 */
7b1b5d19 13#include "qapi/qmp/dispatch.h"
13a286d5
MR
14#include "qemu-common.h"
15
125b310e 16#define QGA_READ_COUNT_DEFAULT 4096
13a286d5 17
0a982b1b
EB
18/* Mapping of whence codes used by guest-file-seek. */
19enum {
20 QGA_SEEK_SET = 0,
21 QGA_SEEK_CUR = 1,
22 QGA_SEEK_END = 2,
23};
24
48ff7a62 25typedef struct GAState GAState;
13a286d5 26typedef struct GACommandState GACommandState;
3cf0bed8 27extern GAState *ga_state;
13a286d5 28
1281c08a 29GList *ga_command_blacklist_init(GList *blacklist);
e3d4d252 30void ga_command_state_init(GAState *s, GACommandState *cs);
13a286d5
MR
31void ga_command_state_add(GACommandState *cs,
32 void (*init)(void),
33 void (*cleanup)(void));
34void ga_command_state_init_all(GACommandState *cs);
35void ga_command_state_cleanup_all(GACommandState *cs);
36GACommandState *ga_command_state_new(void);
48ff7a62
MR
37bool ga_logging_enabled(GAState *s);
38void ga_disable_logging(GAState *s);
39void ga_enable_logging(GAState *s);
d607a523 40void GCC_FMT_ATTR(1, 2) slog(const gchar *fmt, ...);
3cf0bed8 41void ga_set_response_delimited(GAState *s);
f22d85e9
MR
42bool ga_is_frozen(GAState *s);
43void ga_set_frozen(GAState *s);
44void ga_unset_frozen(GAState *s);
ec0f694c 45const char *ga_fsfreeze_hook(GAState *s);
39097daf 46int64_t ga_get_fd_handle(GAState *s, Error **errp);
04b4e75f
LC
47
48#ifndef _WIN32
49void reopen_fd_to_null(int fd);
50#endif