]> git.tdb.fi Git - builder.git/blob - source/copy.h
Move class PackageRef to its own files
[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         ~Copy();
16 private:
17         class Worker: public Msp::Thread
18         {
19         public:
20                 Worker(Copy &i): copy(i), done(false), error(false) { launch(); }
21                 bool get_done() const { return done; }
22                 bool get_error() const { return error; }
23         private:
24                 Copy &copy;
25                 bool done;
26                 bool error;
27
28                 void main();
29         };
30
31         Msp::Path::Path src;
32         Msp::Path::Path dest;
33         Worker *worker;
34 };
35
36 #endif