summaryrefslogtreecommitdiff
path: root/qga/vss-win32/requester.h
blob: 374f9b8d16ba5814d50014dc2e5ec6f9002cb2ec (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
/*
 * QEMU Guest Agent VSS requester declarations
 *
 * Copyright Hitachi Data Systems Corp. 2013
 *
 * Authors:
 *  Tomoki Sekiyama   <tomoki.sekiyama@hds.com>
 *
 * This work is licensed under the terms of the GNU GPL, version 2 or later.
 * See the COPYING file in the top-level directory.
 */

#ifndef VSS_WIN32_REQUESTER_H
#define VSS_WIN32_REQUESTER_H

#include <basetyps.h>           /* STDAPI */
#include "qemu/compiler.h"

#ifdef __cplusplus
extern "C" {
#endif

/* Callback to set Error; used to avoid linking glib to the DLL */
typedef void (*ErrorSetFunc)(void **errp, int win32_err, int err_class,
                             const char *fmt, ...) GCC_FMT_ATTR(4, 5);
typedef struct ErrorSet {
    ErrorSetFunc error_set;
    void **errp;
    int err_class;
} ErrorSet;

STDAPI requester_init(void);
STDAPI requester_deinit(void);

typedef void (*QGAVSSRequesterFunc)(int *, ErrorSet *);
void requester_freeze(int *num_vols, ErrorSet *errset);
void requester_thaw(int *num_vols, ErrorSet *errset);

#ifdef __cplusplus
}
#endif

#endif