On Thu, Jul 21, 2011 at 11:28:28AM +0200, Michal Privoznik wrote:
This introduces new API virDomainDestroyWithFlags to allow
domain destroying with flags, as the existing API virDomainDestroy
misses flags.
The set of flags is defined in virDomainDestroyFlags enum, which is
currently commented, because it is empty.
Calling this API with no flags set (@flags == 0) is equivalent calling
virDomainDestroy.
---
include/libvirt/libvirt.h.in | 7 +++++
src/driver.h | 4 +++
src/libvirt.c | 52 ++++++++++++++++++++++++++++++++++++++++++
src/libvirt_public.syms | 1 +
4 files changed, 64 insertions(+), 0 deletions(-)
diff --git a/include/libvirt/libvirt.h.in b/include/libvirt/libvirt.h.in
index 6afd591..0a06684 100644
--- a/include/libvirt/libvirt.h.in
+++ b/include/libvirt/libvirt.h.in
@@ -913,6 +913,11 @@ virConnectPtr virDomainGetConnect (virDomainPtr
domain);
/*
* Domain creation and destruction
*/
+
+/*
+ * typedef enum {
+ * } virDomainDestroyFlags;
+ */
virDomainPtr virDomainCreateXML (virConnectPtr conn,
const char *xmlDesc,
unsigned int flags);
@@ -929,6 +934,8 @@ int virDomainShutdown (virDomainPtr
domain);
int virDomainReboot (virDomainPtr domain,
unsigned int flags);
int virDomainDestroy (virDomainPtr domain);
+int virDomainDestroyWithFlags(virDomainPtr domain,
+ unsigned int flags);
This is not our usual naming convention. I'd expect the API to
be named 'virDomainDestroyFlags', and give the enum a different
typedef name.
Regards,
Daniel
--
|:
http://berrange.com -o-
http://www.flickr.com/photos/dberrange/ :|
|:
http://libvirt.org -o-
http://virt-manager.org :|
|:
http://autobuild.org -o-
http://search.cpan.org/~danberr/ :|
|:
http://entangle-photo.org -o-
http://live.gnome.org/gtk-vnc :|