]> git.tdb.fi Git - builder.git/blob - source/lib/binarypackage.h
Add visibility decorations to the library and plugins
[builder.git] / source / lib / binarypackage.h
1 #ifndef BINARYPACKAGE_H_
2 #define BINARYPACKAGE_H_
3
4 #include "libbuilder_api.h"
5 #include "package.h"
6
7 /**
8 Represents a package that is installed on the system, but can't be built by
9 Builder.
10 */
11 class LIBBUILDER_API BinaryPackage: public Package
12 {
13 public:
14         class Loader: public Msp::DataFile::DerivedObjectLoader<BinaryPackage, Package::Loader>
15         {
16         public:
17                 Loader(BinaryPackage &);
18         private:
19                 void build_info();
20                 void header(const std::string &);
21         };
22
23         using Flags = std::vector<std::string>;
24
25 private:
26         Msp::FS::Path base_path;
27         std::vector<std::string> headers;
28         BuildInfo static_binfo;
29
30 public:
31         BinaryPackage(Builder &, const std::string &);
32
33         const BuildInfo &get_static_build_info() const { return static_binfo; }
34
35         static BinaryPackage *from_flags(Builder &, const std::string &, const Flags &, const Flags & = Flags());
36 private:
37         static void process_flags(const Flags &, BuildInfo &);
38         void do_prepare() override;
39 };
40
41 #endif