]> git.tdb.fi Git - builder.git/blob - source/copy.h
e39be16baedeb4793634533030f441761df8019a
[builder.git] / source / copy.h
1 #ifndef COPY_H_
2 #define COPY_H_
3
4 #include <msp/core/thread.h>
5 #include <msp/path/path.h>
6 #include "action.h"
7
8 class Copy: public Action
9 {
10 public:
11         Copy(Builder &, const Msp::Path::Path &, const Msp::Path::Path &);
12         int check();
13 private:
14         class Worker: public Msp::Thread
15         {
16         public:
17                 Worker(Copy &i): copy(i), done(false) { launch(); }
18                 bool get_done() const { return done; }
19         private:
20                 Copy &copy;
21                 bool done;
22
23                 void main();
24         };
25
26         Msp::Path::Path src;
27         Msp::Path::Path dest;
28         Worker worker;
29 };
30
31 #endif