21#include <dhtnet/connectionmanager.h>
42 const std::string& name,
56 bool onRequest(
const std::shared_ptr<dht::crypto::Certificate>& peer,
57 const std::string& name)
override;
65 void onReady(
const std::shared_ptr<dht::crypto::Certificate>& peer,
66 const std::string& name,
67 std::shared_ptr<dhtnet::ChannelSocket> channel)
override;
70 std::weak_ptr<JamiAccount> account_;
71 dhtnet::ConnectionManager& connectionManager_;
Manages channels for syncing informations.
void connect(const DeviceId &deviceId, const std::string &name, ConnectCb &&cb, const std::string &connectionType="", bool forceNewConnection=false) override
Ask for a new sync channel.
bool onRequest(const std::shared_ptr< dht::crypto::Certificate > &peer, const std::string &name) override
Determine if we accept or not the sync request.
void onReady(const std::shared_ptr< dht::crypto::Certificate > &peer, const std::string &name, std::shared_ptr< dhtnet::ChannelSocket > channel) override
Launch sync process.
A Channel handler is used to make the link between JamiAccount and ConnectionManager Its role is to m...
std::function< void(std::shared_ptr< dhtnet::ChannelSocket >, const DeviceId &)> ConnectCb
void emitSignal(Args... args)
std::function< void(std::shared_ptr< dhtnet::ChannelSocket >, const dht::InfoHash &)> ConnectCallbackLegacy