aboutsummaryrefslogtreecommitdiff
path: root/src/proj_internal.h
diff options
context:
space:
mode:
authorEven Rouault <even.rouault@spatialys.com>2020-01-16 21:32:28 +0100
committerGitHub <noreply@github.com>2020-01-16 21:32:28 +0100
commitf1209ff020cc9f5490f8e6c7edced6877f53da49 (patch)
tree5ce7402568146013a623b8e92071c015c4d46c1c /src/proj_internal.h
parent7040857c1fed53b0b896cd8f15bc34ff3c6161d3 (diff)
parent19841f21f4319297b399bdc4f20c1c546a35e10e (diff)
downloadPROJ-f1209ff020cc9f5490f8e6c7edced6877f53da49.tar.gz
PROJ-f1209ff020cc9f5490f8e6c7edced6877f53da49.zip
Merge pull request #1817 from rouault/rfc4_network_disk_cache
[RFC4_dev] Add a SQLite3 local cache of downloaded chunks
Diffstat (limited to 'src/proj_internal.h')
-rw-r--r--src/proj_internal.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/proj_internal.h b/src/proj_internal.h
index 12ada034..63c53551 100644
--- a/src/proj_internal.h
+++ b/src/proj_internal.h
@@ -677,6 +677,14 @@ struct projNetworkCallbacksAndData
void* user_data = nullptr;
};
+struct projGridChunkCache
+{
+ bool enabled = true;
+ std::string filename{};
+ long long max_size = 100 * 1024 * 1024;
+ int ttl = 86400; // 1 day
+};
+
/* proj thread context */
struct projCtx_t {
int last_errno = 0;
@@ -701,6 +709,8 @@ struct projCtx_t {
bool iniFileLoaded = false;
std::string endpoint{};
+ projGridChunkCache gridChunkCache{};
+
int projStringParserCreateFromPROJStringRecursionCounter = 0; // to avoid potential infinite recursion in PROJStringParser::createFromPROJString()
projCtx_t() = default;
@@ -834,6 +844,9 @@ std::string pj_context_get_url_endpoint(PJ_CONTEXT* ctx);
void pj_load_ini(PJ_CONTEXT* ctx);
+// For testing purposes
+std::string PROJ_DLL pj_context_get_grid_cache_filename(PJ_CONTEXT *ctx);
+
/* classic public API */
#include "proj_api.h"