2020-07-06 15:02:01 +00:00
|
|
|
// Copyright 2018 Dolphin Emulator Project
|
|
|
|
// Licensed under GPLv2+
|
|
|
|
// Refer to the license.txt file included.
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <string>
|
|
|
|
|
|
|
|
#include <jni.h>
|
|
|
|
|
|
|
|
std::string GetJString(JNIEnv* env, jstring jstr);
|
|
|
|
jstring ToJString(JNIEnv* env, const std::string& str);
|
|
|
|
std::vector<std::string> JStringArrayToVector(JNIEnv* env, jobjectArray array);
|
2020-06-26 15:52:31 +00:00
|
|
|
|
2020-11-04 19:59:39 +00:00
|
|
|
// 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.
|
2020-06-26 15:52:31 +00:00
|
|
|
int OpenAndroidContent(const std::string& uri, const std::string& mode);
|
2020-11-04 19:59:39 +00:00
|
|
|
|
|
|
|
// Deletes a given file.
|
2020-06-27 09:04:48 +00:00
|
|
|
bool DeleteAndroidContent(const std::string& uri);
|
2020-10-01 08:10:34 +00:00
|
|
|
int GetNetworkIpAddress();
|
|
|
|
int GetNetworkPrefixLength();
|
|
|
|
int GetNetworkGateway();
|