Ring Daemon 16.0.0
|
A Channel handler is used to make the link between JamiAccount and ConnectionManager Its role is to manage channels for a protocol (git/sip/etc) More...
#include <channel_handler.h>
Public Member Functions | |
virtual void | connect (const DeviceId &deviceId, const std::string &name, ConnectCb &&cb, const std::string &connectionType="", bool forceNewConnection=false)=0 |
Ask for a new channel. | |
virtual void | connect (const dht::InfoHash &, const std::string &, ConnectCallbackLegacy &&) |
virtual void | onReady (const std::shared_ptr< dht::crypto::Certificate > &peer, const std::string &name, std::shared_ptr< dhtnet::ChannelSocket > channel)=0 |
Called when ConnectionManager has a new channel ready. | |
virtual bool | onRequest (const std::shared_ptr< dht::crypto::Certificate > &peer, const std::string &name)=0 |
Determine if we accept or not the request. | |
virtual | ~ChannelHandlerInterface () |
A Channel handler is used to make the link between JamiAccount and ConnectionManager Its role is to manage channels for a protocol (git/sip/etc)
Definition at line 36 of file channel_handler.h.
|
inlinevirtual |
Definition at line 39 of file channel_handler.h.
|
pure virtual |
Ask for a new channel.
deviceId | The device to connect |
name | The name of the channel |
cb | The callback to call when connected (can be immediate if already connected) |
connectionType | The connection type used by iOS notifications (not used) |
forceNewConnection | If we want a new SIP connection (not used) |
Implemented in jami::MessageChannelHandler, jami::SyncChannelHandler, jami::TransferChannelHandler, jami::AuthChannelHandler, and jami::ConversationChannelHandler.
|
inlinevirtual |
Reimplemented in jami::AuthChannelHandler.
Definition at line 56 of file channel_handler.h.
|
pure virtual |
Called when ConnectionManager has a new channel ready.
peer | Connected peer |
name | The name of the channel |
channel | Channel to handle |
Implemented in jami::AuthChannelHandler, jami::ConversationChannelHandler, jami::MessageChannelHandler, jami::SwarmChannelHandler, jami::SyncChannelHandler, and jami::TransferChannelHandler.
|
pure virtual |
Determine if we accept or not the request.
Called when ConnectionManager receives a request
peer | Peer who asked |
name | The name of the channel |
Implemented in jami::AuthChannelHandler, jami::ConversationChannelHandler, jami::MessageChannelHandler, jami::SwarmChannelHandler, jami::SyncChannelHandler, and jami::TransferChannelHandler.