summaryrefslogtreecommitdiff
path: root/Source/Android/jni/AndroidCommon/AndroidCommon.h
diff options
context:
space:
mode:
authorJosJuice <josjuice@gmail.com>2020-11-04 20:59:39 +0100
committerJosJuice <josjuice@gmail.com>2020-11-06 17:40:03 +0100
commit70df5446d3f0bc203363ad74e737fd772e8e9c2c (patch)
treee840595646f5fd6ae8293def17ee60973cf37ea2 /Source/Android/jni/AndroidCommon/AndroidCommon.h
parent6a4ac74ec407a20b0347c4c764ca528e8d692cc1 (diff)
Android: Make the handling of SAF open modes more robust
Diffstat (limited to 'Source/Android/jni/AndroidCommon/AndroidCommon.h')
-rw-r--r--Source/Android/jni/AndroidCommon/AndroidCommon.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/Source/Android/jni/AndroidCommon/AndroidCommon.h b/Source/Android/jni/AndroidCommon/AndroidCommon.h
index ca8245182d..967933bdf8 100644
--- a/Source/Android/jni/AndroidCommon/AndroidCommon.h
+++ b/Source/Android/jni/AndroidCommon/AndroidCommon.h
@@ -12,5 +12,14 @@ std::string GetJString(JNIEnv* env, jstring jstr);
jstring ToJString(JNIEnv* env, const std::string& str);
std::vector<std::string> JStringArrayToVector(JNIEnv* env, jobjectArray array);
+// Returns true if the given path should be opened as Android content instead of a normal file.
+bool IsPathAndroidContent(const std::string& uri);
+
+// Turns a C/C++ style mode (e.g. "rb") into one which can be used with OpenAndroidContent.
+std::string OpenModeToAndroid(std::string mode);
+
+// Opens a given file and returns a file descriptor.
int OpenAndroidContent(const std::string& uri, const std::string& mode);
+
+// Deletes a given file.
bool DeleteAndroidContent(const std::string& uri);