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

[libvirt] [PATCH 3/3] Add gvir_domain_resume()



A binding for virDomainResume().
---
 libvirt-gobject/libvirt-gobject-domain.c |   21 +++++++++++++++++++++
 libvirt-gobject/libvirt-gobject-domain.h |    2 ++
 libvirt-gobject/libvirt-gobject.sym      |    1 +
 3 files changed, 24 insertions(+), 0 deletions(-)

diff --git a/libvirt-gobject/libvirt-gobject-domain.c b/libvirt-gobject/libvirt-gobject-domain.c
index 5bbd7d1..bf562ba 100644
--- a/libvirt-gobject/libvirt-gobject-domain.c
+++ b/libvirt-gobject/libvirt-gobject-domain.c
@@ -329,6 +329,27 @@ gboolean gvir_domain_start(GVirDomain *dom,
 }
 
 /**
+ * gvir_domain_resume:
+ * @dom: the domain
+ *
+ * Returns: TRUE on success
+ */
+gboolean gvir_domain_resume(GVirDomain *dom,
+                            GError **err)
+{
+    GVirDomainPrivate *priv = dom->priv;
+
+    if (virDomainResume(priv->handle) < 0) {
+        *err = gvir_error_new_literal(GVIR_DOMAIN_ERROR,
+                                      0,
+                                      "Unable to resume domain");
+        return FALSE;
+    }
+
+    return TRUE;
+}
+
+/**
  * gvir_domain_stop:
  * @dom: the domain
  * @flags:  the flags
diff --git a/libvirt-gobject/libvirt-gobject-domain.h b/libvirt-gobject/libvirt-gobject-domain.h
index 5199f7c..94bd53e 100644
--- a/libvirt-gobject/libvirt-gobject-domain.h
+++ b/libvirt-gobject/libvirt-gobject-domain.h
@@ -102,6 +102,8 @@ gint gvir_domain_get_id(GVirDomain *dom,
 gboolean gvir_domain_start(GVirDomain *dom,
                            guint64 flags,
                            GError **err);
+gboolean gvir_domain_resume(GVirDomain *dom,
+                            GError **err);
 gboolean gvir_domain_stop(GVirDomain *dom,
                           guint64 flags,
                           GError **err);
diff --git a/libvirt-gobject/libvirt-gobject.sym b/libvirt-gobject/libvirt-gobject.sym
index cd24d83..55a0548 100644
--- a/libvirt-gobject/libvirt-gobject.sym
+++ b/libvirt-gobject/libvirt-gobject.sym
@@ -34,6 +34,7 @@ LIBVIRT_GOBJECT_0.0.1 {
 	gvir_domain_get_uuid;
 	gvir_domain_get_id;
 	gvir_domain_start;
+	gvir_domain_resume;
 	gvir_domain_stop;
 	gvir_domain_delete;
 	gvir_domain_shutdown;
-- 
1.7.6.2


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