ua_service.cpp
来自「改进后的SIP SERVICE API」· C++ 代码 · 共 47 行
CPP
47 行
#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 + =
减小字号Ctrl + -
显示快捷键?