📄 ua_service.cpp
字号:
#include <iostream>
#include <UA_Session.hpp>
#include <UA_Service.hpp>
extern int G_trace;
UA_Service::UA_Service (const char* P_name,const char* P_filterFormater)
: SIP_Service(P_name,P_filterFormater)
{
if (G_trace == 1)
std::cerr << "== UA_Service::UA_Service name :"<< getName() << std::endl;
}
UA_Service::~UA_Service()
{
if (G_trace == 1)
std::cerr << "== UA_Service::~UA_Service name :"<<getName()<<std::endl;
}
int UA_Service::reportStateChanged (SIP_ServiceState P_newState,
SIP_Cause P_cause)
{
if (G_trace == 1)
std::cerr << "== UA_Service::reportStateChanged new state is ["
<< P_newState <<"], cause ["<<P_cause<<"]"<<std::endl;
return 0;
}
SIP_Session* UA_Service::createSession (SIP_SessionRequestor P_sessionRequestor)
{
if (G_trace == 1)
std::cerr << "create a Session in UA_Service::createSession"
<<std::endl; //add by zy for test
return new(std::nothrow) UA_Session();
}
void UA_Service::destroySession (SIP_Session& P_session,
SIP_SessionRequestor P_sessionRequestor,
SIP_Cause P_cause)
{
if (G_trace == 1)
std::cerr << "destroy a Session in UA_Service::destroySessionn"
<<std::endl; //add by zy for test
delete &P_session;
return;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -