[gnome-boxes] Add Machine.save() with libvirt implementation



commit 71f5b167b6f28634b197a5f2e981e71048ddcac6
Author: Alexander Larsson <alexl redhat com>
Date:   Thu Oct 25 18:57:09 2012 +0200

    Add Machine.save() with libvirt implementation
    
    This will be used to explicitly save a vm.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=686777

 src/libvirt-machine.vala |    4 ++++
 src/machine.vala         |    3 +++
 2 files changed, 7 insertions(+), 0 deletions(-)
---
diff --git a/src/libvirt-machine.vala b/src/libvirt-machine.vala
index 43b63ef..ce9e50a 100644
--- a/src/libvirt-machine.vala
+++ b/src/libvirt-machine.vala
@@ -440,6 +440,10 @@ private class Boxes.LibvirtMachine: Boxes.Machine {
         }
     }
 
+    public async override void save () throws GLib.Error {
+        yield domain.save_async (0, null);
+    }
+
     public async void suspend () throws GLib.Error {
         (save_on_quit) ? yield domain.save_async (0, null) : domain.suspend ();
     }
diff --git a/src/machine.vala b/src/machine.vala
index cc39364..3717bce 100644
--- a/src/machine.vala
+++ b/src/machine.vala
@@ -204,6 +204,9 @@ private abstract class Boxes.Machine: Boxes.CollectionItem, Boxes.IPropertiesPro
         return Boxes.get_screenshot_filename (config.uuid);
     }
 
+    public virtual async void save () throws GLib.Error {
+    }
+
     public virtual async Gdk.Pixbuf? take_screenshot () throws GLib.Error {
         return null;
     }



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