*
*/
-#ifndef LIBVIRT_HYPERV_DRIVER_H
-# define LIBVIRT_HYPERV_DRIVER_H
+#pragma once
int hypervRegister(void);
-
-#endif /* LIBVIRT_HYPERV_DRIVER_H */
*
*/
-#ifndef LIBVIRT_HYPERV_PRIVATE_H
-# define LIBVIRT_HYPERV_PRIVATE_H
+#pragma once
-# include "internal.h"
-# include "virerror.h"
-# include "hyperv_util.h"
-# include "openwsman.h"
+#include "internal.h"
+#include "virerror.h"
+#include "hyperv_util.h"
+#include "openwsman.h"
typedef enum _hypervWmiVersion hypervWmiVersion;
enum _hypervWmiVersion {
WsManClient *client;
hypervWmiVersion wmiVersion;
};
-
-#endif /* LIBVIRT_HYPERV_PRIVATE_H */
*
*/
-#ifndef LIBVIRT_HYPERV_UTIL_H
-# define LIBVIRT_HYPERV_UTIL_H
+#pragma once
-# include "internal.h"
-# include "viruri.h"
+#include "internal.h"
+#include "viruri.h"
typedef struct _hypervParsedUri hypervParsedUri;
int hypervParseUri(hypervParsedUri **parsedUri, virURIPtr uri);
void hypervFreeParsedUri(hypervParsedUri **parsedUri);
-
-#endif /* LIBVIRT_HYPERV_UTIL_H */
*
*/
-#ifndef LIBVIRT_HYPERV_WMI_H
-# define LIBVIRT_HYPERV_WMI_H
+#pragma once
-# include "virbuffer.h"
-# include "hyperv_private.h"
-# include "hyperv_wmi_classes.h"
-# include "openwsman.h"
-# include "virhash.h"
+#include "virbuffer.h"
+#include "hyperv_private.h"
+#include "hyperv_wmi_classes.h"
+#include "openwsman.h"
+#include "virhash.h"
-# define HYPERV_WQL_QUERY_INITIALIZER { NULL, NULL }
+#define HYPERV_WQL_QUERY_INITIALIZER { NULL, NULL }
-# define HYPERV_DEFAULT_PARAM_COUNT 5
+#define HYPERV_DEFAULT_PARAM_COUNT 5
-# define MSVM_VIRTUALSYSTEMMANAGEMENTSERVICE_SELECTOR \
+#define MSVM_VIRTUALSYSTEMMANAGEMENTSERVICE_SELECTOR \
"CreationClassName=Msvm_VirtualSystemManagementService"
int hypervVerifyResponse(WsManClient *client, WsXmlDocH response,
int hypervMsvmComputerSystemFromDomain(virDomainPtr domain,
Msvm_ComputerSystem **computerSystem);
-
-#endif /* LIBVIRT_HYPERV_WMI_H */
*
*/
-#ifndef LIBVIRT_HYPERV_WMI_CLASSES_H
-# define LIBVIRT_HYPERV_WMI_CLASSES_H
+#pragma once
-# include "internal.h"
-# include "openwsman.h"
+#include "internal.h"
+#include "openwsman.h"
-# include "hyperv_wmi_classes.generated.typedef"
+#include "hyperv_wmi_classes.generated.typedef"
-# define ROOT_CIMV2 \
+#define ROOT_CIMV2 \
"http://schemas.microsoft.com/wbem/wsman/1/wmi/root/cimv2/*"
-# define ROOT_VIRTUALIZATION \
+#define ROOT_VIRTUALIZATION \
"http://schemas.microsoft.com/wbem/wsman/1/wmi/root/virtualization/*"
-# define ROOT_VIRTUALIZATION_V2 \
+#define ROOT_VIRTUALIZATION_V2 \
"http://schemas.microsoft.com/wbem/wsman/1/wmi/root/virtualization/v2/*"
* Msvm_ComputerSystem
*/
-# define MSVM_COMPUTERSYSTEM_WQL_VIRTUAL \
+#define MSVM_COMPUTERSYSTEM_WQL_VIRTUAL \
"Description = \"Microsoft Virtual Machine\" "
-# define MSVM_COMPUTERSYSTEM_WQL_PHYSICAL \
+#define MSVM_COMPUTERSYSTEM_WQL_PHYSICAL \
"Description = \"Microsoft Hosting Computer System\" "
-# define MSVM_COMPUTERSYSTEM_WQL_ACTIVE \
+#define MSVM_COMPUTERSYSTEM_WQL_ACTIVE \
"(EnabledState != 0 and EnabledState != 3 and EnabledState != 32769) "
-# define MSVM_COMPUTERSYSTEM_WQL_INACTIVE \
+#define MSVM_COMPUTERSYSTEM_WQL_INACTIVE \
"(EnabledState = 0 or EnabledState = 3 or EnabledState = 32769) "
enum _Msvm_ComputerSystem_EnabledState {
hypervWmiClassInfoPtr *objs;
};
-# include "hyperv_wmi_classes.generated.h"
-
-#endif /* LIBVIRT_HYPERV_WMI_CLASSES_H */
+#include "hyperv_wmi_classes.generated.h"
*
*/
-#ifndef LIBVIRT_OPENWSMAN_H
-# define LIBVIRT_OPENWSMAN_H
+#pragma once
/* Workaround openwsman <= 2.2.6 unconditionally defining optarg. Just pretend
* that u/os.h was already included. Need to explicitly include time.h because
* wsman-xml-serializer.h needs it and u/os.h would have included it. */
-# include <time.h>
-# define _LIBU_OS_H_
-# include <wsman-api.h>
+#include <time.h>
+#define _LIBU_OS_H_
+#include <wsman-api.h>
/* wsman-xml-serializer.h in openwsman <= 2.2.6 is missing this defines */
-# ifndef SER_NS_INT8
-# define SER_NS_INT8(ns, n, x) SER_NS_INT8_FLAGS(ns, n, x, 0)
-# endif
-# ifndef SER_NS_INT16
-# define SER_NS_INT16(ns, n, x) SER_NS_INT16_FLAGS(ns, n, x, 0)
-# endif
-# ifndef SER_NS_INT32
-# define SER_NS_INT32(ns, n, x) SER_NS_INT32_FLAGS(ns, n, x, 0)
-# endif
-# ifndef SER_NS_INT64
-# define SER_NS_INT64(ns, n, x) SER_NS_INT64_FLAGS(ns, n, x, 0)
-# endif
+#ifndef SER_NS_INT8
+# define SER_NS_INT8(ns, n, x) SER_NS_INT8_FLAGS(ns, n, x, 0)
+#endif
+#ifndef SER_NS_INT16
+# define SER_NS_INT16(ns, n, x) SER_NS_INT16_FLAGS(ns, n, x, 0)
+#endif
+#ifndef SER_NS_INT32
+# define SER_NS_INT32(ns, n, x) SER_NS_INT32_FLAGS(ns, n, x, 0)
+#endif
+#ifndef SER_NS_INT64
+# define SER_NS_INT64(ns, n, x) SER_NS_INT64_FLAGS(ns, n, x, 0)
+#endif
/* wsman-xml.h */
WsXmlDocH ws_xml_create_doc(const char *rootNsUri, const char *rootName);
WsXmlNodeH xml_parser_get_root(WsXmlDocH doc);
-
-#endif /* LIBVIRT_OPENWSMAN_H */