X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fcopy.h;h=6353ab166b27412192c42ec0898b32cc1a3cfdc3;hb=bde362811368647047f3ca13bdec596f092ecffe;hp=bc4c173b140be542a47f35ff91282c7a91e3e9cd;hpb=f56fa0c68e0eddf1f01c9584b8761431d29e8fa1;p=builder.git diff --git a/source/copy.h b/source/copy.h index bc4c173..6353ab1 100644 --- a/source/copy.h +++ b/source/copy.h @@ -3,35 +3,36 @@ #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; - Msp::FS::Path link; - public: - Copy(Builder &, const Package &, const Msp::FS::Path &, const Msp::FS::Path &, const Msp::FS::Path & =Msp::FS::Path()); + Copy(Builder &); + + Target *create_target(const std::list &, const std::string &) override; + Task *run(const Target &) const override; }; #endif