[gnome-boxes] Add UnattendedRawFile class



commit 7d2221fb010b75b8e84a9892524c3152939fa13b
Author: Christophe Fergeau <cfergeau redhat com>
Date:   Thu Jul 5 11:18:53 2012 +0200

    Add UnattendedRawFile class
    
    https://bugzilla.gnome.org/show_bug.cgi?id=679752

 src/unattended-installer.vala |   17 +++++++++++++++++
 1 files changed, 17 insertions(+), 0 deletions(-)
---
diff --git a/src/unattended-installer.vala b/src/unattended-installer.vala
index 5fe513d..bf7ef2f 100644
--- a/src/unattended-installer.vala
+++ b/src/unattended-installer.vala
@@ -370,6 +370,23 @@ private interface Boxes.UnattendedFile : GLib.Object {
     protected abstract async File get_source_file (Cancellable? cancellable)  throws GLib.Error;
 }
 
+private class Boxes.UnattendedRawFile : GLib.Object, Boxes.UnattendedFile {
+    protected string src_path { get; set; }
+    protected string dest_name { get; set; }
+
+    protected UnattendedInstaller installer  { get; set; }
+
+    public UnattendedRawFile (UnattendedInstaller installer, string src_path, string dest_name) {
+       this.installer = installer;
+       this.src_path = src_path;
+       this.dest_name = dest_name;
+    }
+
+    protected async File get_source_file (Cancellable? cancellable)  throws GLib.Error {
+        return File.new_for_path (src_path);
+    }
+}
+
 private class Boxes.UnattendedTextFile : GLib.Object, Boxes.UnattendedFile {
     protected string src_path { get; set; }
     protected string dest_name { get; set; }



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