X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fcopy.h;h=c0a433996a9c0a14625ebf918c9c6092eac6d9e0;hb=d1eb133ab529cdae131be7b150209f03189248f3;hp=445de7bb9841433d573f60ca5c02794667de75de;hpb=a2adbd9c0a8d7a7567848c4c6bdbf0de6ba32bb1;p=builder.git diff --git a/source/copy.h b/source/copy.h index 445de7b..c0a4339 100644 --- a/source/copy.h +++ b/source/copy.h @@ -1,42 +1,23 @@ -/* $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 "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 - { - public: - Worker(Copy &); - private: - Copy © + Copy(Builder &b): Tool(b, "CP") { } - void main(); - }; + Target *create_target(const std::vector &, const std::string &) override; + Task *run(const Target &) const override; - Msp::FS::Path src; - Msp::FS::Path dest; +private: + static bool _run(const InstalledFile &); }; #endif