[PATCH 07/55] hyperv: enable automatic cleanup for OpenWSMAN types

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Matt Coleman <matt@xxxxxxxxx>
---
 src/hyperv/hyperv_private.h |  3 +--
 src/hyperv/hyperv_wsman.h   | 28 ++++++++++++++++++++++++++++
 2 files changed, 29 insertions(+), 2 deletions(-)
 create mode 100644 src/hyperv/hyperv_wsman.h

diff --git a/src/hyperv/hyperv_private.h b/src/hyperv/hyperv_private.h
index 58abad61a4..a8855e8118 100644
--- a/src/hyperv/hyperv_private.h
+++ b/src/hyperv/hyperv_private.h
@@ -22,11 +22,10 @@
 
 #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
index 0000000000..c69619d2c1
--- /dev/null
+++ b/src/hyperv/hyperv_wsman.h
@@ -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);
-- 
2.30.0





[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux