ledger-core
BigIntCallback.hpp
1 // AUTOGENERATED FILE - DO NOT MODIFY!
2 // This file generated by Djinni from callback.djinni
3 
4 #ifndef DJINNI_GENERATED_BIGINTCALLBACK_HPP_JNI_
5 #define DJINNI_GENERATED_BIGINTCALLBACK_HPP_JNI_
6 
7 #include "../../api/BigIntCallback.hpp"
8 #include "djinni_support.hpp"
9 
10 namespace djinni_generated {
11 
12 class BigIntCallback final : ::djinni::JniInterface<::ledger::core::api::BigIntCallback, BigIntCallback> {
13 public:
14  using CppType = std::shared_ptr<::ledger::core::api::BigIntCallback>;
15  using CppOptType = std::shared_ptr<::ledger::core::api::BigIntCallback>;
16  using JniType = jobject;
17 
18  using Boxed = BigIntCallback;
19 
20  ~BigIntCallback();
21 
22  static CppType toCpp(JNIEnv* jniEnv, JniType j) { return ::djinni::JniClass<BigIntCallback>::get()._fromJava(jniEnv, j); }
23  static ::djinni::LocalRef<JniType> fromCppOpt(JNIEnv* jniEnv, const CppOptType& c) { return {jniEnv, ::djinni::JniClass<BigIntCallback>::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<BigIntCallback>;
29  friend ::djinni::JniInterface<::ledger::core::api::BigIntCallback, BigIntCallback>;
30 
31  class JavaProxy final : ::djinni::JavaProxyHandle<JavaProxy>, public ::ledger::core::api::BigIntCallback
32  {
33  public:
34  JavaProxy(JniType j);
35  ~JavaProxy();
36 
37  void onCallback(const std::shared_ptr<::ledger::core::api::BigInt> & result, const std::experimental::optional<::ledger::core::api::Error> & error) override;
38 
39  private:
40  friend ::djinni::JniInterface<::ledger::core::api::BigIntCallback, ::djinni_generated::BigIntCallback>;
41  };
42 
43  const ::djinni::GlobalRef<jclass> clazz { ::djinni::jniFindClass("co/ledger/core/BigIntCallback") };
44  const jmethodID method_onCallback { ::djinni::jniGetMethodID(clazz.get(), "onCallback", "(Lco/ledger/core/BigInt;Lco/ledger/core/Error;)V") };
45 };
46 
47 } // namespace djinni_generated
48 #endif //DJINNI_GENERATED_BIGINTCALLBACK_HPP_JNI_
Definition: Account.cpp:22
Definition: proxy_cache_interface.hpp:131
Definition: BigIntCallback.hpp:23
Definition: djinni_support.hpp:223
Definition: djinni_support.hpp:379
Definition: BigIntCallback.hpp:12
Definition: optional.hpp:177