ledger-core
ThreadDispatcher.hpp
1 // AUTOGENERATED FILE - DO NOT MODIFY!
2 // This file generated by Djinni from thread_dispatcher.djinni
3 
4 #ifndef DJINNI_GENERATED_THREADDISPATCHER_HPP_JNI_
5 #define DJINNI_GENERATED_THREADDISPATCHER_HPP_JNI_
6 
7 #include "../../api/ThreadDispatcher.hpp"
8 #include "djinni_support.hpp"
9 
10 namespace djinni_generated {
11 
12 class ThreadDispatcher final : ::djinni::JniInterface<::ledger::core::api::ThreadDispatcher, ThreadDispatcher> {
13 public:
14  using CppType = std::shared_ptr<::ledger::core::api::ThreadDispatcher>;
15  using CppOptType = std::shared_ptr<::ledger::core::api::ThreadDispatcher>;
16  using JniType = jobject;
17 
18  using Boxed = ThreadDispatcher;
19 
21 
22  static CppType toCpp(JNIEnv* jniEnv, JniType j) { return ::djinni::JniClass<ThreadDispatcher>::get()._fromJava(jniEnv, j); }
23  static ::djinni::LocalRef<JniType> fromCppOpt(JNIEnv* jniEnv, const CppOptType& c) { return {jniEnv, ::djinni::JniClass<ThreadDispatcher>::get()._toJava(jniEnv, c)}; }
24  static ::djinni::LocalRef<JniType> fromCpp(JNIEnv* jniEnv, const CppType& c) { return fromCppOpt(jniEnv, c); }
25 
26 private:
28  friend ::djinni::JniClass<ThreadDispatcher>;
29  friend ::djinni::JniInterface<::ledger::core::api::ThreadDispatcher, ThreadDispatcher>;
30 
31  class JavaProxy final : ::djinni::JavaProxyHandle<JavaProxy>, public ::ledger::core::api::ThreadDispatcher
32  {
33  public:
34  JavaProxy(JniType j);
35  ~JavaProxy();
36 
37  std::shared_ptr<::ledger::core::api::ExecutionContext> getSerialExecutionContext(const std::string & name) override;
38  std::shared_ptr<::ledger::core::api::ExecutionContext> getThreadPoolExecutionContext(const std::string & name) override;
39  std::shared_ptr<::ledger::core::api::ExecutionContext> getMainExecutionContext() override;
40  std::shared_ptr<::ledger::core::api::Lock> newLock() override;
41 
42  private:
43  friend ::djinni::JniInterface<::ledger::core::api::ThreadDispatcher, ::djinni_generated::ThreadDispatcher>;
44  };
45 
46  const ::djinni::GlobalRef<jclass> clazz { ::djinni::jniFindClass("co/ledger/core/ThreadDispatcher") };
47  const jmethodID method_getSerialExecutionContext { ::djinni::jniGetMethodID(clazz.get(), "getSerialExecutionContext", "(Ljava/lang/String;)Lco/ledger/core/ExecutionContext;") };
48  const jmethodID method_getThreadPoolExecutionContext { ::djinni::jniGetMethodID(clazz.get(), "getThreadPoolExecutionContext", "(Ljava/lang/String;)Lco/ledger/core/ExecutionContext;") };
49  const jmethodID method_getMainExecutionContext { ::djinni::jniGetMethodID(clazz.get(), "getMainExecutionContext", "()Lco/ledger/core/ExecutionContext;") };
50  const jmethodID method_newLock { ::djinni::jniGetMethodID(clazz.get(), "newLock", "()Lco/ledger/core/Lock;") };
51 };
52 
53 } // namespace djinni_generated
54 #endif //DJINNI_GENERATED_THREADDISPATCHER_HPP_JNI_
Definition: ThreadDispatcher.hpp:23
Definition: ThreadDispatcher.hpp:12
Definition: Account.cpp:22
Definition: proxy_cache_interface.hpp:131
Definition: djinni_support.hpp:223
Definition: djinni_support.hpp:379