ui/cocoa.m: Drop old macOS-10.12-and-earlier compat ifdefs
[qemu/armbru.git] / tests / qtest / libqmp.h
blob3445b753ff44c0cccb304cd7671458ec28aa496c
1 /*
2 * libqmp test unit
4 * Copyright IBM, Corp. 2012
5 * Copyright Red Hat, Inc. 2012
6 * Copyright SUSE LINUX Products GmbH 2013
8 * Authors:
9 * Anthony Liguori <aliguori@us.ibm.com>
10 * Paolo Bonzini <pbonzini@redhat.com>
11 * Andreas Färber <afaerber@suse.de>
13 * This work is licensed under the terms of the GNU GPL, version 2 or later.
14 * See the COPYING file in the top-level directory.
18 #ifndef LIBQMP_H
19 #define LIBQMP_H
21 #include "qapi/qmp/qdict.h"
23 QDict *qmp_fd_receive(int fd);
24 #ifndef _WIN32
25 void qmp_fd_vsend_fds(int fd, int *fds, size_t fds_num,
26 const char *fmt, va_list ap) G_GNUC_PRINTF(4, 0);
27 #endif
28 void qmp_fd_vsend(int fd, const char *fmt, va_list ap) G_GNUC_PRINTF(2, 0);
29 void qmp_fd_send(int fd, const char *fmt, ...) G_GNUC_PRINTF(2, 3);
30 void qmp_fd_send_raw(int fd, const char *fmt, ...) G_GNUC_PRINTF(2, 3);
31 void qmp_fd_vsend_raw(int fd, const char *fmt, va_list ap) G_GNUC_PRINTF(2, 0);
32 QDict *qmp_fdv(int fd, const char *fmt, va_list ap) G_GNUC_PRINTF(2, 0);
33 QDict *qmp_fd(int fd, const char *fmt, ...) G_GNUC_PRINTF(2, 3);
35 /**
36 * qmp_rsp_is_err:
37 * @rsp: QMP response to check for error
39 * Test @rsp for error and discard @rsp.
40 * Returns 'true' if there is error in @rsp and 'false' otherwise.
42 bool qmp_rsp_is_err(QDict *rsp);
44 /**
45 * qmp_expect_error_and_unref:
46 * @rsp: QMP response to check for error
47 * @class: an error class
49 * Assert the response has the given error class and discard @rsp.
51 void qmp_expect_error_and_unref(QDict *rsp, const char *class);
53 #endif /* LIBQMP_H */