aboutsummaryrefslogtreecommitdiff
path: root/include/qemu/dbus.h
blob: 08f00dfd534208c19422cd24694007a0dc7b22cf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
/*
 * Helpers for using D-Bus
 *
 * Copyright (C) 2019 Red Hat, Inc.
 *
 * This work is licensed under the terms of the GNU GPL, version 2.  See
 * the COPYING file in the top-level directory.
 */

#ifndef DBUS_H
#define DBUS_H

#include <gio/gio.h>

#include "qom/object.h"
#include "chardev/char.h"
#include "qemu/notify.h"
#include "qemu/typedefs.h"

/* glib/gio 2.68 */
#define DBUS_METHOD_INVOCATION_HANDLED TRUE
#define DBUS_METHOD_INVOCATION_UNHANDLED FALSE

/* in msec */
#define DBUS_DEFAULT_TIMEOUT 1000

#define DBUS_DISPLAY1_ROOT "/org/qemu/Display1"

#define DBUS_DISPLAY_ERROR (dbus_display_error_quark())
GQuark dbus_display_error_quark(void);

typedef enum {
    DBUS_DISPLAY_ERROR_FAILED,
    DBUS_DISPLAY_ERROR_INVALID,
    DBUS_DISPLAY_ERROR_UNSUPPORTED,
    DBUS_DISPLAY_N_ERRORS,
} DBusDisplayError;

GStrv qemu_dbus_get_queued_owners(GDBusConnection *connection,
                                  const char *name,
                                  Error **errp);

#endif /* DBUS_H */