]> xenbits.xensource.com Git - libvirt.git/commitdiff
hyperv: enable automatic cleanup for OpenWSMAN types
authorMatt Coleman <mcoleman@datto.com>
Thu, 21 Jan 2021 18:50:47 +0000 (13:50 -0500)
committerLaine Stump <laine@redhat.com>
Fri, 22 Jan 2021 19:04:24 +0000 (14:04 -0500)
Signed-off-by: Matt Coleman <matt@datto.com>
Reviewed-by: Laine Stump <laine@redhat.com>
src/hyperv/hyperv_private.h
src/hyperv/hyperv_wsman.h [new file with mode: 0644]

index 58abad61a4b456e5e69a39bda252b3565193c226..a8855e8118908c47eb4f313b6ed1f520a5865c76 100644 (file)
 
 #pragma once
 
-#include <wsman-api.h>
-
 #include "internal.h"
 #include "virerror.h"
 #include "hyperv_util.h"
+#include "hyperv_wsman.h"
 #include "capabilities.h"
 #include "domain_conf.h"
 
diff --git a/src/hyperv/hyperv_wsman.h b/src/hyperv/hyperv_wsman.h
new file mode 100644 (file)
index 0000000..c69619d
--- /dev/null
@@ -0,0 +1,28 @@
+/*
+ * hyperv_wsman.h: OpenWSMAN include and GLib auto-cleanup
+ *
+ * Copyright (C) 2021 Datto Inc
+ *
+ * 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/>.
+ *
+ */
+
+#pragma once
+
+#include <wsman-api.h>
+
+G_DEFINE_AUTO_CLEANUP_FREE_FUNC(WsXmlDocH, ws_xml_destroy_doc, NULL);
+G_DEFINE_AUTOPTR_CLEANUP_FUNC(client_opt_t, wsmc_options_destroy);
+G_DEFINE_AUTOPTR_CLEANUP_FUNC(filter_t, filter_destroy);