1#ifndef TCRSDK_CUSTOM_DATA_CHANNEL_H_
2#define TCRSDK_CUSTOM_DATA_CHANNEL_H_
45 virtual void OnError(
const int32_t port,
const TcrCode& code,
const std::string& msg) = 0;
56 virtual void OnMessage(
const int32_t port,
const char* buffer) = 0;
65 virtual bool Send(
const char* data) = 0;
A class can implement the Observer interface when it wants to be informed of events in CustomDataChan...
Definition custom_data_channel.h:28
virtual void OnMessage(const int32_t port, const char *buffer)=0
This method is called whenever the listened 'CustomDataChannel' receives cloud message.
virtual void OnError(const int32_t port, const TcrCode &code, const std::string &msg)=0
This method is called whenever some error is happened in the listened 'CustomDataChannel'.
virtual void OnConnected(const int32_t port)=0
This method is called when the listened 'CustomDataChannel' is connected successfully.
This interface represents a data channel between the client and the cloud application.
Definition custom_data_channel.h:23
virtual bool Send(const char *data)=0
Send data to the cloud Application.
virtual void Close()=0
Close this data channel.
TcrCode
This interface defines common codes of TcrSdk.
Definition tcr_code.h:9