]> git.tdb.fi Git - builder.git/blobdiff - source/copy.h
Don't treat using deprecated declarations as errors
[builder.git] / source / copy.h
index deb60209b7cbc4b3ab4aa551fe60c2d2318355ce..dedd0f57a0e3aa41607d67b0f6d16c10c6fa799a 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/path/path.h>
-#include "internalaction.h"
+#include <msp/fs/path.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::Path &, const Msp::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:
+               virtual void main();
        };
 
-       Msp::Path src;
-       Msp::Path dest;
+public:
+       Copy(Builder &);
+
+       virtual Target *create_target(const std::list<Target *> &, const std::string &);
+       virtual Task *run(const Target &) const;
 };
 
 #endif