]> git.tdb.fi Git - builder.git/blob - source/tar.h
Add tarball building
[builder.git] / source / tar.h
1 /* $Id$
2
3 This file is part of builder
4 Copyright © 2007 Mikko Rasa, Mikkosoft Productions
5 Distributed under the LGPL
6 */
7
8 #ifndef TAR_H_
9 #define TAR_H_
10
11 #include <msp/core/thread.h>
12 #include "action.h"
13 #include "misc.h"
14
15 class TarBall;
16
17 class Tar: public Action
18 {
19 public:
20         Tar(Builder &, const TarBall &);
21         ~Tar();
22
23         virtual int check();
24 private:
25         class Worker: public Msp::Thread
26         {
27         public:
28                 Worker(Tar &);
29                 bool get_done() const { return done; }
30                 bool get_error() const { return error; }
31         private:
32                 Tar &tar;
33                 bool done;
34                 bool error;
35
36                 void main();
37                 void store_number(char *, unsigned, unsigned);
38         };
39
40         const TarBall &tarball;
41         StringList files;
42         Worker *worker;
43 };
44
45 #endif