]> git.tdb.fi Git - builder.git/blobdiff - source/copy.h
Convert all list containers to vectors
[builder.git] / source / copy.h
index 445de7bb9841433d573f60ca5c02794667de75de..5f20c161126752d0cf34194c857baa8306b53bab 100644 (file)
@@ -1,42 +1,38 @@
-/* $Id$
-
-This file is part of builder
-Copyright © 2006-2007 Mikko Rasa, Mikkosoft Productions
-Distributed under the LGPL
-*/
-
 #ifndef COPY_H_
 #define COPY_H_
 
 #include <msp/core/thread.h>
 #include <msp/fs/path.h>
-#include "internalaction.h"
+#include "internaltask.h"
+#include "tool.h"
 
-class Package;
+class InstalledFile;
 
 /**
-Copies a file to another place.  Used by the Install target.
+Copies a file to another place.  Used by the InstalledFile target.
 */
-class Copy: public InternalAction
+class Copy: public Tool
 {
-public:
-       Copy(Builder &, const Package &, const Msp::FS::Path &, const Msp::FS::Path &);
 private:
        /**
        A worker thread that actually does the data transfer.
        */
-       class Worker: public InternalAction::Worker
+       class Worker: public InternalTask::Worker
        {
-       public:
-               Worker(Copy &);
        private:
-               Copy &copy;
+               const InstalledFile &target;
 
-               void main();
+       public:
+               Worker(const InstalledFile &);
+       private:
+               void main() override;
        };
 
-       Msp::FS::Path src;
-       Msp::FS::Path dest;
+public:
+       Copy(Builder &);
+
+       Target *create_target(const std::vector<Target *> &, const std::string &) override;
+       Task *run(const Target &) const override;
 };
 
 #endif