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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
|
/*
* xenapi_driver_private.h: Xen API driver's private header file.
* Copyright (C) 2009, 2010 Citrix Ltd.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library. If not, see
* <http://www.gnu.org/licenses/>.
*
* Author: Sharadha Prabhakar <sharadha.prabhakar@citrix.com>
*/
#ifndef __VIR_XENAPI_H__
# define __VIR_XENAPI_H__
# include <libxml/tree.h>
# include <xen/api/xen_common.h>
# include "virterror_internal.h"
/*# define PRINT_XML*/
# define VIR_FROM_THIS VIR_FROM_XENAPI
# define LIBVIRT_MODELNAME_LEN (32)
# define xenapiSessionErrorHandler(conn, errNum, buf) \
xenapiSessionErrorHandle(conn, errNum, buf, \
__FILE__, __FUNCTION__, __LINE__)
void
xenapiSessionErrorHandle(virConnectPtr conn, virErrorNumber errNum,
const char *buf, const char *filename,
const char *func, size_t lineno);
typedef struct
{
xen_result_func func;
void *handle;
} xen_comms;
int
call_func(const void *data, size_t len, void *user_handle,
void *result_handle, xen_result_func result_func);
size_t
write_func(void *ptr, size_t size, size_t nmemb, void *comms);
/* xenAPI driver's private data structure */
struct _xenapiPrivate {
xen_session *session;
char *url;
int noVerify;
virCapsPtr caps;
};
#endif /* __VIR_XENAPI_H__ */
|