]> git.tdb.fi Git - builder.git/blobdiff - source/tar.h
Add tarball building
[builder.git] / source / tar.h
diff --git a/source/tar.h b/source/tar.h
new file mode 100644 (file)
index 0000000..137a7ee
--- /dev/null
@@ -0,0 +1,45 @@
+/* $Id$
+
+This file is part of builder
+Copyright © 2007 Mikko Rasa, Mikkosoft Productions
+Distributed under the LGPL
+*/
+
+#ifndef TAR_H_
+#define TAR_H_
+
+#include <msp/core/thread.h>
+#include "action.h"
+#include "misc.h"
+
+class TarBall;
+
+class Tar: public Action
+{
+public:
+       Tar(Builder &, const TarBall &);
+       ~Tar();
+
+       virtual int check();
+private:
+       class Worker: public Msp::Thread
+       {
+       public:
+               Worker(Tar &);
+               bool get_done() const { return done; }
+               bool get_error() const { return error; }
+       private:
+               Tar &tar;
+               bool done;
+               bool error;
+
+               void main();
+               void store_number(char *, unsigned, unsigned);
+       };
+
+       const TarBall &tarball;
+       StringList files;
+       Worker *worker;
+};
+
+#endif