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