[gnome-boxes/wip/resize-snapshots2: 3/6] libvirt-machine-props: Async failable construction
- From: Zeeshan Ali Khattak <zeeshanak src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-boxes/wip/resize-snapshots2: 3/6] libvirt-machine-props: Async failable construction
- Date: Wed, 6 Apr 2016 22:38:57 +0000 (UTC)
commit 79bf088c44bf44baac6b5e6282eece70bdb4397e
Author: Zeeshan Ali (Khattak) <zeeshanak gnome org>
Date: Wed Apr 6 15:48:50 2016 +0100
libvirt-machine-props: Async failable construction
In a following patch, we'll be adding an async call to construction
method that throws an error. So we need to make construction method
async and error-thrower too.
src/libvirt-machine-properties.vala | 2 +-
src/libvirt-machine.vala | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/src/libvirt-machine-properties.vala b/src/libvirt-machine-properties.vala
index 198bad0..edc1b4b 100644
--- a/src/libvirt-machine-properties.vala
+++ b/src/libvirt-machine-properties.vala
@@ -7,7 +7,7 @@ private class Boxes.LibvirtMachineProperties: GLib.Object, Boxes.IPropertiesProv
private weak LibvirtMachine machine; // Weak ref for avoiding cyclic ref */
- public LibvirtMachineProperties (LibvirtMachine machine) {
+ public async LibvirtMachineProperties (LibvirtMachine machine) throws GLib.Error {
this.machine = machine;
machine.notify["name"].connect (() => {
diff --git a/src/libvirt-machine.vala b/src/libvirt-machine.vala
index ce72c57..ada1b13 100644
--- a/src/libvirt-machine.vala
+++ b/src/libvirt-machine.vala
@@ -161,7 +161,7 @@ private class Boxes.LibvirtMachine: Boxes.Machine {
debug ("new libvirt machine: " + domain.get_name ());
this.connection = connection;
this.domain = domain;
- this.properties = new LibvirtMachineProperties (this);
+ this.properties = yield new LibvirtMachineProperties (this);
try {
var s = domain.get_info ().state;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]