Ring Daemon 16.0.0
Loading...
Searching...
No Matches
jami::SwarmChannelHandler Class Reference

Manages Conversation's channels. More...

#include <swarm_channel_handler.h>

Inheritance diagram for jami::SwarmChannelHandler:
Inheritance graph
Collaboration diagram for jami::SwarmChannelHandler:
Collaboration graph

Public Member Functions

void connect (const NodeId &nodeId, const std::string &name, ConnectCb &&cb, const std::string &connectionType="", bool forceNewConnection=false) override
 Ask for a new git channel.
 
void onReady (const std::shared_ptr< dht::crypto::Certificate > &peer, const std::string &name, std::shared_ptr< dhtnet::ChannelSocket > channel) override
 TODO, this needs to extract gitservers from JamiAccount.
 
bool onRequest (const std::shared_ptr< dht::crypto::Certificate > &peer, const std::string &name) override
 Determine if we accept or not the git request.
 
 SwarmChannelHandler (const std::shared_ptr< JamiAccount > &acc, dhtnet::ConnectionManager &cm)
 
 ~SwarmChannelHandler ()
 
- Public Member Functions inherited from jami::ChannelHandlerInterface
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 ~ChannelHandlerInterface ()
 

Detailed Description

Manages Conversation's channels.

Definition at line 34 of file swarm_channel_handler.h.

Constructor & Destructor Documentation

◆ SwarmChannelHandler()

jami::SwarmChannelHandler::SwarmChannelHandler ( const std::shared_ptr< JamiAccount > &  acc,
dhtnet::ConnectionManager &  cm 
)

Definition at line 22 of file swarm_channel_handler.cpp.

◆ ~SwarmChannelHandler()

jami::SwarmChannelHandler::~SwarmChannelHandler ( )

Definition at line 29 of file swarm_channel_handler.cpp.

Member Function Documentation

◆ connect()

void jami::SwarmChannelHandler::connect ( const NodeId nodeId,
const std::string &  name,
ConnectCb &&  cb,
const std::string &  connectionType = "",
bool  forceNewConnection = false 
)
override

Ask for a new git channel.

Parameters
nodeIdThe node to connect
nameThe name of the channel
cbThe callback to call when connected (can be immediate if already connected)
connectionTypeThe connection type used by iOS notifications (not used)
forceNewConnectionIf we want a new SIP connection (not used)

Definition at line 32 of file swarm_channel_handler.cpp.

References jami::emitSignal().

Here is the call graph for this function:

◆ onReady()

void jami::SwarmChannelHandler::onReady ( const std::shared_ptr< dht::crypto::Certificate > &  peer,
const std::string &  name,
std::shared_ptr< dhtnet::ChannelSocket >  channel 
)
overridevirtual

TODO, this needs to extract gitservers from JamiAccount.

Implements jami::ChannelHandlerInterface.

Definition at line 69 of file swarm_channel_handler.cpp.

References jami::emitSignal().

Here is the call graph for this function:

◆ onRequest()

bool jami::SwarmChannelHandler::onRequest ( const std::shared_ptr< dht::crypto::Certificate > &  peer,
const std::string &  name 
)
overridevirtual

Determine if we accept or not the git request.

Parameters
nodeIdnode who asked
namename asked
Returns
if the channel is for a valid conversation and node not banned

Implements jami::ChannelHandlerInterface.

Definition at line 46 of file swarm_channel_handler.cpp.

References jami::emitSignal().

Here is the call graph for this function:

The documentation for this class was generated from the following files: