changed RsEvents so that it takes event types when registering handlers, which limits the number of handlers called for each event

This commit is contained in:
csoler 2019-12-29 13:50:54 +01:00
parent dc2f2f5eb4
commit c544b1da7c
No known key found for this signature in database
GPG key ID: 7BCA522266C0804C
19 changed files with 186 additions and 140 deletions

View file

@ -112,6 +112,7 @@ p3discovery2::p3discovery2(
if(rsEvents)
rsEvents->registerEventsHandler(
RsEventType::GOSSIP_DISCOVERY,
[this](std::shared_ptr<const RsEvent> event)
{
rsEventsHandler(*event);
@ -1348,8 +1349,3 @@ void p3discovery2::rsEventsHandler(const RsEvent& event)
//
// /* ignore other operations */
// }
// (cyril) do we still need this??
RsGossipDiscoveryFriendInviteReceivedEvent::RsGossipDiscoveryFriendInviteReceivedEvent(const std::string& invite) :
RsEvent(RsEventType::GOSSIP_DISCOVERY_INVITE_RECEIVED),
mInvite(invite) {}