]> git.tdb.fi Git - builder.git/blob - source/copy.h
Add command line options (not all of them work yet)
[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 Package;
9
10 class Copy: public Action
11 {
12 public:
13         Copy(Builder &, const Package &, const Msp::Path::Path &, const Msp::Path::Path &);
14         int check();
15 private:
16         class Worker: public Msp::Thread
17         {
18         public:
19                 Worker(Copy &i): copy(i), done(false) { launch(); }
20                 bool get_done() const { return done; }
21         private:
22                 Copy &copy;
23                 bool done;
24
25                 void main();
26         };
27
28         Msp::Path::Path src;
29         Msp::Path::Path dest;
30         Worker worker;
31 };
32
33 #endif