]> git.tdb.fi Git - builder.git/blobdiff - source/lib/component.h
Add visibility decorations to the library and plugins
[builder.git] / source / lib / component.h
index 7ddd97297f267b96e865b82c5ef3f24b1390aa18..7d9aa1af704e195efed112cbfbd08e3163f9e285 100644 (file)
@@ -7,6 +7,7 @@
 #include "buildinfo.h"
 #include "conditionalloader.h"
 #include "installmap.h"
+#include "libbuilder_api.h"
 #include "package.h"
 
 class SourcePackage;
@@ -17,10 +18,10 @@ may also build none), as well as install a bunch of headers.  Components inherit
 dependencies and build info from the package they belong to, and may also add
 their own.
 */
-class Component
+class LIBBUILDER_API Component
 {
 public:
-       class Loader: public Msp::DataFile::ObjectLoader<Component>, public ConditionalLoader
+       class LIBBUILDER_API Loader: public Msp::DataFile::ObjectLoader<Component>, public ConditionalLoader
        {
        public:
                Loader(Component &);
@@ -42,6 +43,7 @@ protected:
        Package::Requirements requires;
        bool deflt = true;
        InstallMap install_map;
+       bool broken = false;
        std::vector<std::string> problems;
 
        Component(SourcePackage &p, const std::string &n): package(p), name(n) { }
@@ -66,6 +68,7 @@ public:
        const InstallMap &get_install_map() const { return install_map; }
        const Package::Requirements &get_required_packages() const { return requires; }
        bool is_default() const { return deflt; }
+       bool is_broken() const { return broken; }
        const std::vector<std::string> &get_problems() const { return problems; }
 
        /** Prepares any required packages. */