kodi
JNIXBMCFile.h
1 /*
2  * Copyright (C) 2018 Christian Browet
3  * This file is part of Kodi - https://kodi.tv
4  *
5  * SPDX-License-Identifier: GPL-2.0-or-later
6  * See LICENSES/README.md for more information.
7  */
8 
9 #pragma once
10 
11 #include "filesystem/File.h"
12 
13 #include <memory>
14 
15 #include <androidjni/JNIBase.h>
16 
17 namespace jni
18 {
19 
20  class CJNIXBMCFile : public CJNIBase, public CJNIInterfaceImplem<CJNIXBMCFile>
21  {
22  public:
23  CJNIXBMCFile();
24  CJNIXBMCFile(const jni::jhobject &object) : CJNIBase(object) {}
25  ~CJNIXBMCFile() override = default;
26 
27  static void RegisterNatives(JNIEnv* env);
28 
29  protected:
30  bool m_eof = true;
31  std::unique_ptr<XFILE::CFile> m_file;
32 
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);
37  };
38 
39 }
Definition: JNIXBMCFile.h:20
Definition: JNIMainActivity.h:15