]> git.proxmox.com Git - mirror_qemu.git/blame - qga/guest-agent-core.h
Merge tag 'pull-aspeed-20240201' of https://github.com/legoater/qemu into staging
[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 */
61baac2f
PM
13#ifndef GUEST_AGENT_CORE_H
14#define GUEST_AGENT_CORE_H
15
7b1b5d19 16#include "qapi/qmp/dispatch.h"
abb297ed 17#include "qga-qapi-types.h"
13a286d5 18
125b310e 19#define QGA_READ_COUNT_DEFAULT 4096
13a286d5 20
48ff7a62 21typedef struct GAState GAState;
13a286d5 22typedef struct GACommandState GACommandState;
1527badb 23
3cf0bed8 24extern GAState *ga_state;
1527badb 25extern QmpCommandList ga_commands;
13a286d5 26
0e4ef702 27GList *ga_command_init_blockedrpcs(GList *blockedrpcs);
e3d4d252 28void ga_command_state_init(GAState *s, GACommandState *cs);
13a286d5
MR
29void ga_command_state_add(GACommandState *cs,
30 void (*init)(void),
31 void (*cleanup)(void));
32void ga_command_state_init_all(GACommandState *cs);
33void ga_command_state_cleanup_all(GACommandState *cs);
34GACommandState *ga_command_state_new(void);
3e3e302f 35void ga_command_state_free(GACommandState *cs);
48ff7a62
MR
36bool ga_logging_enabled(GAState *s);
37void ga_disable_logging(GAState *s);
38void ga_enable_logging(GAState *s);
9edc6313 39void G_GNUC_PRINTF(1, 2) slog(const gchar *fmt, ...);
3cf0bed8 40void ga_set_response_delimited(GAState *s);
f22d85e9
MR
41bool ga_is_frozen(GAState *s);
42void ga_set_frozen(GAState *s);
43void ga_unset_frozen(GAState *s);
ec0f694c 44const char *ga_fsfreeze_hook(GAState *s);
39097daf 45int64_t ga_get_fd_handle(GAState *s, Error **errp);
0b4b4938 46int ga_parse_whence(GuestFileWhence *whence, Error **errp);
04b4e75f
LC
47
48#ifndef _WIN32
49void reopen_fd_to_null(int fd);
50#endif
61baac2f
PM
51
52#endif /* GUEST_AGENT_CORE_H */