#include <cassert>
#include "util/basic_macros.h"
-bool ModChannel::registerConsumer(u16 peer_id)
+bool ModChannel::registerConsumer(session_t peer_id)
{
// ignore if peer_id already joined
return true;
}
-bool ModChannel::removeConsumer(u16 peer_id)
+bool ModChannel::removeConsumer(session_t peer_id)
{
bool found = false;
auto peer_removal_fct = [peer_id, &found](u16 p) {
return true;
}
-bool ModChannelMgr::joinChannel(const std::string &channel, u16 peer_id)
+bool ModChannelMgr::joinChannel(const std::string &channel, session_t peer_id)
{
if (!channelRegistered(channel))
registerChannel(channel);
return m_registered_channels[channel]->registerConsumer(peer_id);
}
-bool ModChannelMgr::leaveChannel(const std::string &channel, u16 peer_id)
+bool ModChannelMgr::leaveChannel(const std::string &channel, session_t peer_id)
{
if (!channelRegistered(channel))
return false;
return consumerRemoved;
}
-void ModChannelMgr::leaveAllChannels(u16 peer_id)
+void ModChannelMgr::leaveAllChannels(session_t peer_id)
{
for (auto &channel_it : m_registered_channels)
channel_it.second->removeConsumer(peer_id);