Merge pull request #26287 from CrystalP/ref-savefilestatejob
[xbmc.git] / xbmc / platform / android / activity / JNIXBMCFile.h
blob3e8d031c89dcd0777d4d363254e2880a22fd8773
1 /*
2 * Copyright (C) 2018 Christian Browet
3 * This file is part of Kodi - https://kodi.tv
5 * SPDX-License-Identifier: GPL-2.0-or-later
6 * See LICENSES/README.md for more information.
7 */
9 #pragma once
11 #include "filesystem/File.h"
13 #include <memory>
15 #include <androidjni/JNIBase.h>
17 namespace jni
20 class CJNIXBMCFile : public CJNIBase, public CJNIInterfaceImplem<CJNIXBMCFile>
22 public:
23 CJNIXBMCFile();
24 CJNIXBMCFile(const jni::jhobject &object) : CJNIBase(object) {}
25 ~CJNIXBMCFile() override = default;
27 static void RegisterNatives(JNIEnv* env);
29 protected:
30 bool m_eof = true;
31 std::unique_ptr<XFILE::CFile> m_file;
33 static jboolean _open(JNIEnv* env, jobject thiz, jstring path);
34 static void _close(JNIEnv* env, jobject thiz);
35 static jbyteArray _read(JNIEnv* env, jobject thiz);
36 static jboolean _eof(JNIEnv* env, jobject thiz);