]>
Commit | Line | Data |
---|---|---|
13a286d5 MR |
1 | /* |
2 | * QEMU Guest Agent core declarations | |
3 | * | |
4 | * Copyright IBM Corp. 2011 | |
5 | * | |
6 | * Authors: | |
7 | * Adam Litke <[email protected]> | |
8 | * Michael Roth <[email protected]> | |
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" |
13a286d5 | 17 | #include "qemu-common.h" |
abb297ed | 18 | #include "qga-qapi-types.h" |
13a286d5 | 19 | |
125b310e | 20 | #define QGA_READ_COUNT_DEFAULT 4096 |
13a286d5 | 21 | |
48ff7a62 | 22 | typedef struct GAState GAState; |
13a286d5 | 23 | typedef struct GACommandState GACommandState; |
1527badb | 24 | |
3cf0bed8 | 25 | extern GAState *ga_state; |
1527badb | 26 | extern QmpCommandList ga_commands; |
13a286d5 | 27 | |
1281c08a | 28 | GList *ga_command_blacklist_init(GList *blacklist); |
e3d4d252 | 29 | void ga_command_state_init(GAState *s, GACommandState *cs); |
13a286d5 MR |
30 | void ga_command_state_add(GACommandState *cs, |
31 | void (*init)(void), | |
32 | void (*cleanup)(void)); | |
33 | void ga_command_state_init_all(GACommandState *cs); | |
34 | void ga_command_state_cleanup_all(GACommandState *cs); | |
35 | GACommandState *ga_command_state_new(void); | |
3e3e302f | 36 | void ga_command_state_free(GACommandState *cs); |
48ff7a62 MR |
37 | bool ga_logging_enabled(GAState *s); |
38 | void ga_disable_logging(GAState *s); | |
39 | void ga_enable_logging(GAState *s); | |
d607a523 | 40 | void GCC_FMT_ATTR(1, 2) slog(const gchar *fmt, ...); |
3cf0bed8 | 41 | void ga_set_response_delimited(GAState *s); |
f22d85e9 MR |
42 | bool ga_is_frozen(GAState *s); |
43 | void ga_set_frozen(GAState *s); | |
44 | void ga_unset_frozen(GAState *s); | |
ec0f694c | 45 | const char *ga_fsfreeze_hook(GAState *s); |
39097daf | 46 | int64_t ga_get_fd_handle(GAState *s, Error **errp); |
0b4b4938 | 47 | int ga_parse_whence(GuestFileWhence *whence, Error **errp); |
04b4e75f LC |
48 | |
49 | #ifndef _WIN32 | |
50 | void reopen_fd_to_null(int fd); | |
51 | #endif | |
61baac2f PM |
52 | |
53 | #endif /* GUEST_AGENT_CORE_H */ |