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

Manages Conversation's channels. More...

#include <transfer_channel_handler.h>

Inheritance diagram for jami::TransferChannelHandler:
Inheritance graph
Collaboration diagram for jami::TransferChannelHandler:
Collaboration graph

Public Member Functions

void connect (const DeviceId &deviceId, const std::string &channelName, ConnectCb &&cb, const std::string &connectionType="", bool forceNewConnection=false) override
 Ask for a new channel This replaces the connectDevice() in jamiaccount.
 
void onReady (const std::shared_ptr< dht::crypto::Certificate > &peer, const std::string &name, std::shared_ptr< dhtnet::ChannelSocket > channel) override
 Handle socket ready.
 
bool onRequest (const std::shared_ptr< dht::crypto::Certificate > &peer, const std::string &name) override
 Determine if we accept or not the request.
 
 TransferChannelHandler (const std::shared_ptr< JamiAccount > &acc, dhtnet::ConnectionManager &cm)
 
 ~TransferChannelHandler ()
 
- 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 transfer_channel_handler.h.

Constructor & Destructor Documentation

◆ TransferChannelHandler()

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

Definition at line 27 of file transfer_channel_handler.cpp.

References jami::fileutils::get_data_dir().

Here is the call graph for this function:

◆ ~TransferChannelHandler()

jami::TransferChannelHandler::~TransferChannelHandler ( )

Definition at line 37 of file transfer_channel_handler.cpp.

Member Function Documentation

◆ connect()

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

Ask for a new channel This replaces the connectDevice() in jamiaccount.

Parameters
deviceIdThe device to connect
channelNameThe 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 40 of file transfer_channel_handler.cpp.

◆ onReady()

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

Handle socket ready.

Parameters
deviceIdRelated device
nameName of the handler
channelChannel to handle

Implements jami::ChannelHandlerInterface.

Definition at line 90 of file transfer_channel_handler.cpp.

References jami::DATA_TRANSFER_SCHEME, jami::emitSignal(), JAMI_WARNING, and jami::split_string().

Here is the call graph for this function:

◆ onRequest()

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

Determine if we accept or not the request.

Parameters
deviceIddevice who asked
namename asked
Returns
if we accept or not

Implements jami::ChannelHandlerInterface.

Definition at line 48 of file transfer_channel_handler.cpp.

References jami::DATA_TRANSFER_SCHEME, and jami::emitSignal().

Here is the call graph for this function:

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