]> git.proxmox.com Git - qemu.git/blame - event_notifier.h
Avoid asprintf() which is not available on mingw
[qemu.git] / event_notifier.h
CommitLineData
6b620ca3
PB
1/*
2 * event notifier support
3 *
4 * Copyright Red Hat, Inc. 2010
5 *
6 * Authors:
7 * Michael S. Tsirkin <mst@redhat.com>
8 *
9 * This work is licensed under the terms of the GNU GPL, version 2 or later.
10 * See the COPYING file in the top-level directory.
11 */
12
2292b339
MT
13#ifndef QEMU_EVENT_NOTIFIER_H
14#define QEMU_EVENT_NOTIFIER_H
15
16#include "qemu-common.h"
17
18struct EventNotifier {
e80c262b 19 int fd;
2292b339
MT
20};
21
6bf819f0
PB
22typedef void EventNotifierHandler(EventNotifier *);
23
e80c262b 24void event_notifier_init_fd(EventNotifier *, int fd);
2292b339
MT
25int event_notifier_init(EventNotifier *, int active);
26void event_notifier_cleanup(EventNotifier *);
27int event_notifier_get_fd(EventNotifier *);
2ec10b95 28int event_notifier_set(EventNotifier *);
2292b339 29int event_notifier_test_and_clear(EventNotifier *);
6bf819f0 30int event_notifier_set_handler(EventNotifier *, EventNotifierHandler *);
2292b339
MT
31
32#endif