blob: 49a7abee955d750665dfb36b22aefc6dee9898fa [file] [log] [blame]
Michael Roth13a286d2011-07-19 15:41:53 -05001/*
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 */
13#include "qapi/qmp-core.h"
14#include "qemu-common.h"
15
Michael Roth125b3102012-01-19 00:18:20 -060016#define QGA_READ_COUNT_DEFAULT 4096
Michael Roth13a286d2011-07-19 15:41:53 -050017
Michael Roth48ff7a62011-07-20 15:19:37 -050018typedef struct GAState GAState;
Michael Roth13a286d2011-07-19 15:41:53 -050019typedef struct GACommandState GACommandState;
Michael Roth3cf0bed2012-02-07 13:56:48 -060020extern GAState *ga_state;
Michael Roth13a286d2011-07-19 15:41:53 -050021
Michael Rothe3d4d252011-07-19 15:41:55 -050022void ga_command_state_init(GAState *s, GACommandState *cs);
Michael Roth13a286d2011-07-19 15:41:53 -050023void ga_command_state_add(GACommandState *cs,
24 void (*init)(void),
25 void (*cleanup)(void));
26void ga_command_state_init_all(GACommandState *cs);
27void ga_command_state_cleanup_all(GACommandState *cs);
28GACommandState *ga_command_state_new(void);
Michael Roth48ff7a62011-07-20 15:19:37 -050029bool ga_logging_enabled(GAState *s);
30void ga_disable_logging(GAState *s);
31void ga_enable_logging(GAState *s);
Michael Roth42074a92012-01-19 22:19:27 -060032void slog(const gchar *fmt, ...);
Michael Roth3cf0bed2012-02-07 13:56:48 -060033void ga_set_response_delimited(GAState *s);
Michael Rothf22d85e2012-04-17 19:01:45 -050034bool ga_is_frozen(GAState *s);
35void ga_set_frozen(GAState *s);
36void ga_unset_frozen(GAState *s);
Luiz Capitulino04b4e752012-05-10 16:50:41 -030037
38#ifndef _WIN32
39void reopen_fd_to_null(int fd);
40#endif