[gnome-boxes/wip/download: 2/3] downloader: Move out download class



commit 42113d138d0e419d7c27b4c3ed29d89c8c3afee5
Author: Lasse Schuirmann <lasse schuirmann gmail com>
Date:   Thu Oct 16 15:04:29 2014 +0200

    downloader: Move out download class
    
    The download class will do the real downloading from the following
    commits. It deserves an own file.

 src/Makefile.am     |    1 +
 src/download.vala   |   16 ++++++++++++++++
 src/downloader.vala |   14 --------------
 3 files changed, 17 insertions(+), 14 deletions(-)
---
diff --git a/src/Makefile.am b/src/Makefile.am
index 7709d21..3c8d43e 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -146,6 +146,7 @@ gnome_boxes_SOURCES =                               \
        wizard-source.vala                      \
        wizard-toolbar.vala                     \
        wizard.vala                             \
+       download.vala                           \
        downloader.vala                         \
        empty-boxes.vala                        \
        tracker-iso-query.vala                  \
diff --git a/src/download.vala b/src/download.vala
new file mode 100644
index 0000000..9dd10e2
--- /dev/null
+++ b/src/download.vala
@@ -0,0 +1,16 @@
+// This file is part of GNOME Boxes. License: LGPLv2+
+
+private class Boxes.Download {
+    public string uri;
+    public File remote_file;
+    public File cached_file;
+    public ActivityProgress progress;
+
+    public Download (File remote_file, File cached_file, ActivityProgress progress) {
+        this.remote_file = remote_file;
+        this.uri = remote_file.get_uri ();
+        this.cached_file = cached_file;
+        this.progress = progress;
+    }
+}
+
diff --git a/src/downloader.vala b/src/downloader.vala
index ac90260..f69f8c2 100644
--- a/src/downloader.vala
+++ b/src/downloader.vala
@@ -1,19 +1,5 @@
 // This file is part of GNOME Boxes. License: LGPLv2+
 
-private class Boxes.Download {
-    public string uri;
-    public File remote_file;
-    public File cached_file;
-    public ActivityProgress progress;
-
-    public Download (File remote_file, File cached_file, ActivityProgress progress) {
-        this.remote_file = remote_file;
-        this.uri = remote_file.get_uri ();
-        this.cached_file = cached_file;
-        this.progress = progress;
-    }
-}
-
 private class Boxes.Downloader : GLib.Object {
     private static Downloader downloader;
     private Soup.Session session;


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