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

Manages Conversation's channels. More...

#include <conversation_channel_handler.h>

Inheritance diagram for jami::ConversationChannelHandler:
Inheritance graph
Collaboration diagram for jami::ConversationChannelHandler:
Collaboration graph

Public Member Functions

void connect (const DeviceId &deviceId, const std::string &name, ConnectCb &&cb, const std::string &connectionType="", bool forceNewConnection=false) override
 Ask for a new git channel.
 
 ConversationChannelHandler (const std::shared_ptr< JamiAccount > &acc, dhtnet::ConnectionManager &cm)
 
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.
 
 ~ConversationChannelHandler ()
 
- Public Member Functions inherited from jami::ChannelHandlerInterface
virtual void connect (const dht::InfoHash &, const std::string &, ConnectCallbackLegacy &&)
 
virtual ~ChannelHandlerInterface ()
 

Detailed Description

Manages Conversation's channels.

Definition at line 28 of file conversation_channel_handler.h.

Constructor & Destructor Documentation

◆ ConversationChannelHandler()

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

Definition at line 21 of file conversation_channel_handler.cpp.

◆ ~ConversationChannelHandler()

jami::ConversationChannelHandler::~ConversationChannelHandler ( )

Definition at line 28 of file conversation_channel_handler.cpp.

Member Function Documentation

◆ connect()

void jami::ConversationChannelHandler::connect ( const DeviceId deviceId,
const std::string &  name,
ConnectCb &&  cb,
const std::string &  connectionType = "",
bool  forceNewConnection = false 
)
overridevirtual

Ask for a new git channel.

Parameters
deviceIdThe device 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)

Implements jami::ChannelHandlerInterface.

Definition at line 31 of file conversation_channel_handler.cpp.

References jami::emitSignal().

Here is the call graph for this function:

◆ onReady()

void jami::ConversationChannelHandler::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 75 of file conversation_channel_handler.cpp.

◆ onRequest()

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

Determine if we accept or not the git request.

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

Implements jami::ChannelHandlerInterface.

Definition at line 43 of file conversation_channel_handler.cpp.

References jami::emitSignal(), JAMI_ERROR, and JAMI_WARNING.

Here is the call graph for this function:

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