xref: /openbmc/qemu/qga/guest-agent-core.h (revision 04b4e75f)
113a286d5SMichael Roth /*
213a286d5SMichael Roth  * QEMU Guest Agent core declarations
313a286d5SMichael Roth  *
413a286d5SMichael Roth  * Copyright IBM Corp. 2011
513a286d5SMichael Roth  *
613a286d5SMichael Roth  * Authors:
713a286d5SMichael Roth  *  Adam Litke        <aglitke@linux.vnet.ibm.com>
813a286d5SMichael Roth  *  Michael Roth      <mdroth@linux.vnet.ibm.com>
913a286d5SMichael Roth  *
1013a286d5SMichael Roth  * This work is licensed under the terms of the GNU GPL, version 2 or later.
1113a286d5SMichael Roth  * See the COPYING file in the top-level directory.
1213a286d5SMichael Roth  */
1313a286d5SMichael Roth #include "qapi/qmp-core.h"
1413a286d5SMichael Roth #include "qemu-common.h"
1513a286d5SMichael Roth 
1613a286d5SMichael Roth #define QGA_VERSION "1.0"
17125b310eSMichael Roth #define QGA_READ_COUNT_DEFAULT 4096
1813a286d5SMichael Roth 
1948ff7a62SMichael Roth typedef struct GAState GAState;
2013a286d5SMichael Roth typedef struct GACommandState GACommandState;
213cf0bed8SMichael Roth extern GAState *ga_state;
2213a286d5SMichael Roth 
23e3d4d252SMichael Roth void ga_command_state_init(GAState *s, GACommandState *cs);
2413a286d5SMichael Roth void ga_command_state_add(GACommandState *cs,
2513a286d5SMichael Roth                           void (*init)(void),
2613a286d5SMichael Roth                           void (*cleanup)(void));
2713a286d5SMichael Roth void ga_command_state_init_all(GACommandState *cs);
2813a286d5SMichael Roth void ga_command_state_cleanup_all(GACommandState *cs);
2913a286d5SMichael Roth GACommandState *ga_command_state_new(void);
3048ff7a62SMichael Roth bool ga_logging_enabled(GAState *s);
3148ff7a62SMichael Roth void ga_disable_logging(GAState *s);
3248ff7a62SMichael Roth void ga_enable_logging(GAState *s);
3342074a9dSMichael Roth void slog(const gchar *fmt, ...);
343cf0bed8SMichael Roth void ga_set_response_delimited(GAState *s);
35f22d85e9SMichael Roth bool ga_is_frozen(GAState *s);
36f22d85e9SMichael Roth void ga_set_frozen(GAState *s);
37f22d85e9SMichael Roth void ga_unset_frozen(GAState *s);
38*04b4e75fSLuiz Capitulino 
39*04b4e75fSLuiz Capitulino #ifndef _WIN32
40*04b4e75fSLuiz Capitulino void reopen_fd_to_null(int fd);
41*04b4e75fSLuiz Capitulino #endif
42