]> git.tdb.fi Git - builder.git/blobdiff - source/binarypackage.h
Split class Package into SourcePackage and BinaryPackage
[builder.git] / source / binarypackage.h
diff --git a/source/binarypackage.h b/source/binarypackage.h
new file mode 100644 (file)
index 0000000..b10331b
--- /dev/null
@@ -0,0 +1,41 @@
+/* $Id$
+
+This file is part of builder
+Copyright © 2007  Mikko Rasa, Mikkosoft Productions
+Distributed under the LGPL
+*/
+
+#ifndef BINARYPACKAGE_H_
+#define BINARYPACKAGE_H_
+
+#include "package.h"
+
+/**
+Represents a package that is installed on the system, but can't be built by
+Builder.
+*/
+class BinaryPackage: public Package
+{
+public:
+       class Loader: public Package::Loader
+       {
+       public:
+               Loader(BinaryPackage &);
+               BinaryPackage &get_object() { return static_cast<BinaryPackage &>(pkg); }
+       private:
+               void build_info();
+       };
+
+       BinaryPackage(Builder &, const std::string &);
+       void set_path(const Msp::Path::Path &);
+       bool get_need_path() const { return need_path; }
+
+       static BinaryPackage *from_pkgconfig(Builder &, const std::string &);
+private:
+       bool need_path;
+       Msp::Path::Path path;
+
+       virtual void create_build_info();
+};
+
+#endif