diff options
| author | JMC47 <JMC4789@gmail.com> | 2020-12-10 16:32:43 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-12-10 16:32:43 -0500 |
| commit | 75899b0e1121f01afdd606e1dd3a5822fa408530 (patch) | |
| tree | 53f8c2ef2a5b61248f588aae625181233e487e1a /Source/Android/jni/AndroidCommon/AndroidCommon.h | |
| parent | cca04d36e21377f3292dbceb05f4768523f17df4 (diff) | |
| parent | 161f8c3fad9df97ae4f97b7f45125e5e4c9608a7 (diff) | |
Merge pull request #9221 from JosJuice/android-saf-sd-card
Android: Use storage access framework for custom SD card paths
Diffstat (limited to 'Source/Android/jni/AndroidCommon/AndroidCommon.h')
| -rw-r--r-- | Source/Android/jni/AndroidCommon/AndroidCommon.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/Source/Android/jni/AndroidCommon/AndroidCommon.h b/Source/Android/jni/AndroidCommon/AndroidCommon.h index 2ab220eac7..7ff745f047 100644 --- a/Source/Android/jni/AndroidCommon/AndroidCommon.h +++ b/Source/Android/jni/AndroidCommon/AndroidCommon.h @@ -12,7 +12,16 @@ 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); int GetNetworkIpAddress(); int GetNetworkPrefixLength(); |
