]> git.tdb.fi Git - builder.git/blobdiff - source/androidtools.h
Initialize AndroidDevKit::supported_api_levels in the declaration
[builder.git] / source / androidtools.h
index c0407946b693a67ec6c75f3c218db7f1e71be338..a88cdd36fbd2b710b3b9cf1c07abbbe49b920605 100644 (file)
@@ -1,7 +1,7 @@
 #ifndef ANDROIDTOOLS_H_
 #define ANDROIDTOOLS_H_
 
-#include <set>
+#include <cstdint>
 #include <msp/fs/path.h>
 #include "toolchain.h"
 
@@ -13,14 +13,16 @@ class AndroidDevKit
 protected:
        Builder &builder;
        Msp::FS::Path root;
-       std::set<unsigned> supported_api_levels;
+       /* Needs refactoring if API levels go over 63.  At present rate this will
+       take decades to occur. */
+       uint64_t supported_api_levels = 0;
 
-       AndroidDevKit(Builder &, const std::string &);
+       AndroidDevKit(Builder &, const std::string &, const Msp::FS::Path & = Msp::FS::Path());
        ~AndroidDevKit() { }
 
 public:
        const Msp::FS::Path &get_root_dir() const { return root; }
-       const std::set<unsigned> &get_supported_api_levels() const { return supported_api_levels; }
+       uint64_t get_supported_api_levels() const { return supported_api_levels; }
        void select_api_level(unsigned);
 protected:
        virtual void init_api_level(unsigned) = 0;
@@ -38,7 +40,7 @@ public:
 
 private:
        void find_build_tools_dir();
-       virtual void init_api_level(unsigned);
+       void init_api_level(unsigned) override;
 
 public:
        const Msp::FS::Path &get_build_tools_dir() const { return build_tools_dir; }
@@ -54,11 +56,12 @@ private:
        Msp::FS::Path platform_sysroot;
 
 public:
-       AndroidNdk(Builder &, const Architecture &);
-
+       AndroidNdk(Builder &, const Architecture &, const AndroidSdk &);
 private:
+       static Msp::FS::Path create_default_path(const AndroidSdk &);
+
        void find_toolchain_dir();
-       virtual void init_api_level(unsigned);
+       void init_api_level(unsigned) override;
 
 public:
        const Msp::FS::Path &get_bin_dir() const { return bin_dir; }
@@ -75,6 +78,8 @@ private:
 
 public:
        AndroidTools(Builder &, const Architecture &);
+
+       static int get_priority(const Architecture &);
 };
 
 #endif