*
*/
-#ifndef LIBVIRT_ESX_DRIVER_H
-# define LIBVIRT_ESX_DRIVER_H
+#pragma once
int esxRegister(void);
-
-#endif /* LIBVIRT_ESX_DRIVER_H */
*
*/
-#ifndef LIBVIRT_ESX_INTERFACE_DRIVER_H
-# define LIBVIRT_ESX_INTERFACE_DRIVER_H
+#pragma once
-# include "driver.h"
+#include "driver.h"
extern virInterfaceDriver esxInterfaceDriver;
-
-#endif /* LIBVIRT_ESX_INTERFACE_DRIVER_H */
*
*/
-#ifndef LIBVIRT_ESX_NETWORK_DRIVER_H
-# define LIBVIRT_ESX_NETWORK_DRIVER_H
+#pragma once
-# include "driver.h"
+#include "driver.h"
extern virNetworkDriver esxNetworkDriver;
-
-#endif /* LIBVIRT_ESX_NETWORK_DRIVER_H */
*
*/
-#ifndef LIBVIRT_ESX_PRIVATE_H
-# define LIBVIRT_ESX_PRIVATE_H
+#pragma once
-# include "internal.h"
-# include "virerror.h"
-# include "capabilities.h"
-# include "domain_conf.h"
-# include "esx_vi.h"
+#include "internal.h"
+#include "virerror.h"
+#include "capabilities.h"
+#include "domain_conf.h"
+#include "esx_vi.h"
typedef struct _esxPrivate {
esxVI_Context *primary; /* points to host or vCenter */
esxVI_Boolean supportsScreenshot;
int32_t usedCpuTimeCounterId;
} esxPrivate;
-
-#endif /* LIBVIRT_ESX_PRIVATE_H */
*
*/
-#ifndef LIBVIRT_ESX_STORAGE_BACKEND_ISCSI_H
-# define LIBVIRT_ESX_STORAGE_BACKEND_ISCSI_H
+#pragma once
-# include "driver.h"
+#include "driver.h"
extern virStorageDriver esxStorageBackendISCSI;
-
-#endif /* LIBVIRT_ESX_STORAGE_BACKEND_ISCSI_H */
*
*/
-#ifndef LIBVIRT_ESX_STORAGE_BACKEND_VMFS_H
-# define LIBVIRT_ESX_STORAGE_BACKEND_VMFS_H
+#pragma once
-# include "driver.h"
+#include "driver.h"
extern virStorageDriver esxStorageBackendVMFS;
-
-#endif /* LIBVIRT_ESX_STORAGE_BACKEND_VMFS_H */
*
*/
-#ifndef LIBVIRT_ESX_STORAGE_DRIVER_H
-# define LIBVIRT_ESX_STORAGE_DRIVER_H
+#pragma once
-# include "driver.h"
+#include "driver.h"
extern virStorageDriver esxStorageDriver;
-
-#endif /* LIBVIRT_ESX_STORAGE_DRIVER_H */
*
*/
-#ifndef LIBVIRT_ESX_STREAM_H
-# define LIBVIRT_ESX_STREAM_H
+#pragma once
-# include "internal.h"
-# include "esx_private.h"
+#include "internal.h"
+#include "esx_private.h"
int esxStreamOpenUpload(virStreamPtr stream, esxPrivate *priv, const char *url);
int esxStreamOpenDownload(virStreamPtr stream, esxPrivate *priv, const char *url,
unsigned long long offset, unsigned long long length);
-
-#endif /* LIBVIRT_ESX_STREAM_H */
*
*/
-#ifndef LIBVIRT_ESX_UTIL_H
-# define LIBVIRT_ESX_UTIL_H
+#pragma once
-# include <netdb.h>
-# include "internal.h"
-# include "viruri.h"
+#include <netdb.h>
+#include "internal.h"
+#include "viruri.h"
-# define ESX_VI_CHECK_ARG_LIST(val) \
+#define ESX_VI_CHECK_ARG_LIST(val) \
do { \
if (!val || *val) { \
virReportError(VIR_ERR_INTERNAL_ERROR, "%s", _("Invalid argument")); \
char *esxUtil_EscapeDatastoreItem(const char *string);
char *esxUtil_EscapeForXml(const char *string);
-
-#endif /* LIBVIRT_ESX_UTIL_H */
*
*/
-#ifndef LIBVIRT_ESX_VI_H
-# define LIBVIRT_ESX_VI_H
+#pragma once
-# include <libxml/tree.h>
-# include <libxml/xpath.h>
-# include <curl/curl.h>
+#include <libxml/tree.h>
+#include <libxml/xpath.h>
+#include <curl/curl.h>
-# include "internal.h"
-# include "virerror.h"
-# include "datatypes.h"
-# include "esx_vi_types.h"
-# include "esx_util.h"
+#include "internal.h"
+#include "virerror.h"
+#include "datatypes.h"
+#include "esx_vi_types.h"
+#include "esx_util.h"
/* curl_multi_wait was added in libcurl 7.28.0, emulate it on older versions */
-# define ESX_EMULATE_CURL_MULTI_WAIT (LIBCURL_VERSION_NUM < 0x071C00)
+#define ESX_EMULATE_CURL_MULTI_WAIT (LIBCURL_VERSION_NUM < 0x071C00)
-# define ESX_VI__SOAP__REQUEST_HEADER \
+#define ESX_VI__SOAP__REQUEST_HEADER \
"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n" \
"<soapenv:Envelope\n" \
" xmlns:soapenv=\"http://schemas.xmlsoap.org/soap/envelope/\"\n" \
-# define ESX_VI__SOAP__REQUEST_FOOTER \
+#define ESX_VI__SOAP__REQUEST_FOOTER \
"</soapenv:Body>\n" \
"</soapenv:Envelope>"
-# define ESV_VI__XML_TAG__OPEN(_buffer, _element, _type) \
+#define ESV_VI__XML_TAG__OPEN(_buffer, _element, _type) \
do { \
virBufferAddLit(_buffer, "<"); \
virBufferAdd(_buffer, _element, -1); \
-# define ESV_VI__XML_TAG__CLOSE(_buffer, _element) \
+#define ESV_VI__XML_TAG__CLOSE(_buffer, _element) \
do { \
virBufferAddLit(_buffer, "</"); \
virBufferAdd(_buffer, _element, -1); \
struct _esxVI_MultiCURL {
CURLM *handle;
size_t count; /* number of added easy handle */
-# if ESX_EMULATE_CURL_MULTI_WAIT
+#if ESX_EMULATE_CURL_MULTI_WAIT
struct pollfd *pollfds;
size_t npollfds;
bool timeoutPending;
-# endif
+#endif
};
int esxVI_MultiCURL_Alloc(esxVI_MultiCURL **multi);
int esxVI_LookupStoragePoolNameByScsiLunKey(esxVI_Context *ctx, const char *key,
char **poolName);
-# include "esx_vi.generated.h"
-
-#endif /* LIBVIRT_ESX_VI_H */
+#include "esx_vi.generated.h"
*
*/
-#ifndef LIBVIRT_ESX_VI_METHODS_H
-# define LIBVIRT_ESX_VI_METHODS_H
+#pragma once
-# include "esx_vi.h"
-# include "esx_vi_types.h"
+#include "esx_vi.h"
+#include "esx_vi_types.h"
esxVI_ManagedObjectReference *host, /* optional */
esxVI_Event **output); /* optional, list */
-# include "esx_vi_methods.generated.h"
-
-#endif /* LIBVIRT_ESX_VI_METHODS_H */
+#include "esx_vi_methods.generated.h"
*
*/
-#ifndef LIBVIRT_ESX_VI_TYPES_H
-# define LIBVIRT_ESX_VI_TYPES_H
+#pragma once
-# include "virbuffer.h"
+#include "virbuffer.h"
typedef enum _esxVI_Type esxVI_Type;
typedef struct _esxVI_Object esxVI_Object;
typedef struct _esxVI_ManagedObjectReference esxVI_ManagedObjectReference;
typedef struct _esxVI_Event esxVI_Event;
-# include "esx_vi_types.generated.typedef"
+#include "esx_vi_types.generated.typedef"
esxVI_Type_ManagedObjectReference,
esxVI_Type_Event,
-# include "esx_vi_types.generated.typeenum"
+#include "esx_vi_types.generated.typeenum"
esxVI_Type_Other,
};
-# include "esx_vi_types.generated.h"
+#include "esx_vi_types.generated.h"
int esxVI_VirtualMachinePowerState_ConvertToLibvirt
(esxVI_VirtualMachinePowerState powerState);
-
-#endif /* LIBVIRT_ESX_VI_TYPES_H */