[core] Consolidate file source keys in the generic FileSource header
Thus we do not need to include specific headers to use `{set|get}Property`
API with key constants.
This commit is contained in:
@@ -7,12 +7,6 @@
|
||||
|
||||
namespace mbgl {
|
||||
|
||||
// Properties that may be supported by database file sources.
|
||||
|
||||
// Property to set database mode. When set, database opens in read-only mode; database opens in read-write-create mode
|
||||
// otherwise. type: bool
|
||||
constexpr const char* READ_ONLY_MODE_KEY = "read-only-mode";
|
||||
|
||||
class ResourceOptions;
|
||||
|
||||
// TODO: Split DatabaseFileSource into Ambient cache and Database interfaces.
|
||||
|
||||
@@ -84,4 +84,24 @@ protected:
|
||||
FileSource() = default;
|
||||
};
|
||||
|
||||
// Properties that may be supported by online file sources:
|
||||
|
||||
// Property name to set / get an access token.
|
||||
// type: std::string
|
||||
constexpr const char* ACCESS_TOKEN_KEY = "access-token";
|
||||
|
||||
// Property name to set / get base url.
|
||||
// type: std::string
|
||||
constexpr const char* API_BASE_URL_KEY = "api-base-url";
|
||||
|
||||
// Property name to set / get maximum number of concurrent requests.
|
||||
// type: unsigned
|
||||
constexpr const char* MAX_CONCURRENT_REQUESTS_KEY = "max-concurrent-requests";
|
||||
|
||||
// Properties that may be supported by database file sources:
|
||||
|
||||
// Property to set database mode. When set, database opens in read-only mode; database opens in read-write-create mode
|
||||
// otherwise. type: bool
|
||||
constexpr const char* READ_ONLY_MODE_KEY = "read-only-mode";
|
||||
|
||||
} // namespace mbgl
|
||||
|
||||
@@ -7,20 +7,6 @@ namespace mbgl {
|
||||
|
||||
class ResourceTransform;
|
||||
|
||||
// Properties that may be supported by online file sources.
|
||||
|
||||
// Property name to set / get an access token.
|
||||
// type: std::string
|
||||
constexpr const char* ACCESS_TOKEN_KEY = "access-token";
|
||||
|
||||
// Property name to set / get base url.
|
||||
// type: std::string
|
||||
constexpr const char* API_BASE_URL_KEY = "api-base-url";
|
||||
|
||||
// Property name to set / get maximum number of concurrent requests.
|
||||
// type: unsigned
|
||||
constexpr const char* MAX_CONCURRENT_REQUESTS_KEY = "max-concurrent-requests";
|
||||
|
||||
class OnlineFileSource : public FileSource {
|
||||
public:
|
||||
OnlineFileSource();
|
||||
|
||||
Reference in New Issue
Block a user