aboutsummaryrefslogtreecommitdiff
path: root/src/fileapi.cpp
diff options
context:
space:
mode:
authorEven Rouault <even.rouault@spatialys.com>2019-12-18 23:38:16 +0100
committerEven Rouault <even.rouault@spatialys.com>2019-12-19 17:45:49 +0100
commit2dfe2cdd1f4e963e6faaccd5ca29bc6d8fe4ae30 (patch)
tree2215af16c944342f08d97f917b5b714e4bde880a /src/fileapi.cpp
parent7baf00c5bc96e1bb0ea2cb1a9495d2b5d703bdbc (diff)
downloadPROJ-2dfe2cdd1f4e963e6faaccd5ca29bc6d8fe4ae30.tar.gz
PROJ-2dfe2cdd1f4e963e6faaccd5ca29bc6d8fe4ae30.zip
Add a FileManager and File class
Diffstat (limited to 'src/fileapi.cpp')
-rw-r--r--src/fileapi.cpp26
1 files changed, 26 insertions, 0 deletions
diff --git a/src/fileapi.cpp b/src/fileapi.cpp
index f39d94bb..70be2502 100644
--- a/src/fileapi.cpp
+++ b/src/fileapi.cpp
@@ -34,6 +34,7 @@
#include "proj.h"
#include "proj_internal.h"
+#include "filemanager.hpp"
static PAFile stdio_fopen(projCtx ctx, const char *filename,
const char *access);
@@ -212,3 +213,28 @@ char *pj_ctx_fgets(projCtx ctx, char *line, int size, PAFile file)
}
return line;
}
+
+/************************************************************************/
+/* pj_ctx_set_fileapi() */
+/************************************************************************/
+
+void pj_ctx_set_fileapi( projCtx ctx, projFileAPI *fileapi )
+
+{
+ if (nullptr==ctx)
+ return;
+ ctx->fileapi_legacy = fileapi;
+}
+
+/************************************************************************/
+/* pj_ctx_get_fileapi() */
+/************************************************************************/
+
+projFileAPI *pj_ctx_get_fileapi( projCtx ctx )
+
+{
+ if (nullptr==ctx)
+ return nullptr;
+ return ctx->fileapi_legacy;
+}
+