X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fcopy.h;h=6353ab166b27412192c42ec0898b32cc1a3cfdc3;hb=bde362811368647047f3ca13bdec596f092ecffe;hp=deb60209b7cbc4b3ab4aa551fe60c2d2318355ce;hpb=4d0d003b022943d8a0e39ba19078bab8d32d8857;p=builder.git diff --git a/source/copy.h b/source/copy.h index deb6020..6353ab1 100644 --- a/source/copy.h +++ b/source/copy.h @@ -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 -#include -#include "internalaction.h" +#include +#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 © + const InstalledFile ⌖ - void main(); + public: + Worker(const InstalledFile &); + private: + void main() override; }; - Msp::Path src; - Msp::Path dest; +public: + Copy(Builder &); + + Target *create_target(const std::list &, const std::string &) override; + Task *run(const Target &) const override; }; #endif