merged in publish handlers.
This commit is contained in:
commit
d8eb3d7bb2
160 files changed
+1141
-11240
No files matched your search
+15
-9
@@ -13,7 +13,7 @@ namespace core
|
||||
: id(id), mode(mode), owner(&session), handler(NULL) {}
|
||||
|
||||
Subscription::Subscription(std::string id, TCPSession &session, std::string mode, SubscriptionHandler *handler)
|
||||
: id(id), mode(mode), owner(&session), handler(handler) {}
|
||||
: id(id), mode(mode), owner(&session), handler(handler) {}
|
||||
|
||||
Subscription::~Subscription()
|
||||
{
|
||||
@@ -27,10 +27,10 @@ namespace core
|
||||
|
||||
int Subscription::subscribe(TCPSession &session)
|
||||
{
|
||||
if(handler)
|
||||
handler->onSubscribe(session);
|
||||
if (handler)
|
||||
handler->onSubscribe(session);
|
||||
else
|
||||
onSubscribe(session);
|
||||
onSubscribe(session);
|
||||
|
||||
subscribers.push_back(&session);
|
||||
return 1;
|
||||
@@ -76,10 +76,16 @@ namespace core
|
||||
return 0;
|
||||
}
|
||||
|
||||
// void Subscription::setHandler(SubscriptionHandler *handlers)
|
||||
// {
|
||||
// handler = handlers;
|
||||
bool Subscription::subInvite(TCPSession &session)
|
||||
{
|
||||
|
||||
// coreutils::Log(coreutils::LOG_DEBUG_1) << "Test Test";
|
||||
// }
|
||||
return 0;
|
||||
}
|
||||
|
||||
// void Subscription::setHandler(SubscriptionHandler *handlers)
|
||||
// {
|
||||
// handler = handlers;
|
||||
|
||||
// coreutils::Log(coreutils::LOG_DEBUG_1) << "Test Test";
|
||||
// }
|
||||
}
|
||||
Reference in new issue
Block a user