[libvirt] [PATCH 2/4] Virsh-edit interface was added

rodinasophie at gmail.com rodinasophie at gmail.com
Mon Nov 2 11:34:44 UTC 2015


From: sonya <rodinasophie at gmail.com>

---
 tools/virsh-edit.h | 44 ++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 44 insertions(+)
 create mode 100644 tools/virsh-edit.h

diff --git a/tools/virsh-edit.h b/tools/virsh-edit.h
new file mode 100644
index 0000000..55af613
--- /dev/null
+++ b/tools/virsh-edit.h
@@ -0,0 +1,44 @@
+/*
+ * virsh-edit.h: Implementation of generic virsh *-edit intelligence
+ *
+ * Copyright (C) 2012, 2015 Red Hat, 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/>.
+ *
+ */
+
+#ifndef __VIRSH_EDIT_H_
+#define __VIRSH_EDIT_H_
+
+#include <config.h>
+#include "internal.h"
+#include "vsh.h"
+
+typedef char *(editGetXMLCallback)(void *args);
+typedef void (editNotChangedCallback)(void *args);
+typedef bool (editDefineCallback)(void *args, char *doc_edited, char *doc);
+typedef void (editRelaxCallback)(void *args);
+
+typedef struct vshEditControl {
+	editGetXMLCallback *editGetXML;
+	editNotChangedCallback *editNotChanged;
+	editDefineCallback *editDefine;
+	editRelaxCallback *editRelax;
+	void *editArgs;
+} vshEditControl;
+
+bool vshEdit(vshControl *ctl, vshEditControl *editCtl);
+
+#endif // __VIRSH_EDIT_H_
-- 
2.1.4




More information about the libvir-list mailing list