X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fcopy.h;h=5f20c161126752d0cf34194c857baa8306b53bab;hb=aa053d637e8259755af7d2e4b510a242f4d29c7b;hp=0f30ecfee28fa270c5920e5c34866e5009ba6a2c;hpb=242c55b17e6608b29a77ca17a5b677e202a3ca90;p=builder.git diff --git a/source/copy.h b/source/copy.h index 0f30ecf..5f20c16 100644 --- a/source/copy.h +++ b/source/copy.h @@ -1,43 +1,38 @@ -/* $Id$ - -This file is part of builder -Copyright © 2006-2009 Mikko Rasa, Mikkosoft Productions -Distributed under the LGPL -*/ - #ifndef COPY_H_ #define COPY_H_ #include #include -#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 { 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 © + const InstalledFile ⌖ - void main(); + public: + Worker(const InstalledFile &); + private: + void main() override; }; - Msp::FS::Path src; - Msp::FS::Path dest; - public: - Copy(Builder &, const Package &, const Msp::FS::Path &, const Msp::FS::Path &); + Copy(Builder &); + + Target *create_target(const std::vector &, const std::string &) override; + Task *run(const Target &) const override; }; #endif