ledger-core
WebSocketConnection.hpp
1 // AUTOGENERATED FILE - DO NOT MODIFY!
2 // This file generated by Djinni from websocket_client.djinni
3 
4 #ifndef DJINNI_GENERATED_WEBSOCKETCONNECTION_HPP
5 #define DJINNI_GENERATED_WEBSOCKETCONNECTION_HPP
6 
7 #include <cstdint>
8 #include <string>
9 #ifndef LIBCORE_EXPORT
10  #if defined(_MSC_VER)
11  #include <libcore_export.h>
12  #else
13  #define LIBCORE_EXPORT
14  #endif
15 #endif
16 
17 namespace ledger { namespace core { namespace api {
18 
19 enum class ErrorCode;
20 
22 class LIBCORE_EXPORT WebSocketConnection {
23 public:
24  virtual ~WebSocketConnection() {}
25 
30  virtual void onConnect(int32_t connectionId) = 0;
31 
33  virtual void onClose() = 0;
34 
39  virtual void onMessage(const std::string & data) = 0;
40 
46  virtual void onError(ErrorCode code, const std::string & message) = 0;
47 
48  virtual int32_t getConnectionId() = 0;
49 };
50 
51 } } } // namespace ledger::core::api
52 #endif //DJINNI_GENERATED_WEBSOCKETCONNECTION_HPP
Definition: WebSocketConnection.hpp:22
Definition: Account.cpp:8
ErrorCode
Definition: ErrorCode.hpp:20