"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/h460/h460_std9.cxx" between
h323plus-1_27_0.tar.gz and h323plus-1_27_1.tar.gz

About: H.323 Plus offers libraries for voice (VoIP) and videoconferencing using H.323.

h460_std9.cxx  (h323plus-1_27_0):h460_std9.cxx  (h323plus-1_27_1)
skipping to change at line 60 skipping to change at line 60
// Must Declare for Factory Loader. // Must Declare for Factory Loader.
H460_FEATURE(Std9); H460_FEATURE(Std9);
////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////
// Construction/Destruction // Construction/Destruction
////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////
H460_FeatureStd9::H460_FeatureStd9() H460_FeatureStd9::H460_FeatureStd9()
: H460_FeatureStd(9) : H460_FeatureStd(9)
{ {
PTRACE(6,"Std9\tInstance Created"); PTRACE(6, "Std9\tInstance Created");
qossupport = false; m_qossupport = false;
finalonly = false; m_finalonly = false;
EP = NULL; m_ep = NULL;
CON = NULL; m_con = NULL;
FeatureCategory = FeatureSupported; FeatureCategory = FeatureSupported;
} }
H460_FeatureStd9::~H460_FeatureStd9() H460_FeatureStd9::~H460_FeatureStd9()
{ {
} }
void H460_FeatureStd9::AttachEndPoint(H323EndPoint * _ep) void H460_FeatureStd9::AttachEndPoint(H323EndPoint * _ep)
{ {
PTRACE(6,"Std9\tEndpoint Attached"); PTRACE(6, "Std9\tEndpoint Attached");
EP = _ep; m_ep = _ep;
} }
void H460_FeatureStd9::AttachConnection(H323Connection * _con) void H460_FeatureStd9::AttachConnection(H323Connection * _con)
{ {
CON = _con; m_con = _con;
} }
PBoolean H460_FeatureStd9::FeatureAdvertised(int mtype) PBoolean H460_FeatureStd9::FeatureAdvertised(int mtype)
{ {
switch (mtype) { switch (mtype) {
case H460_MessageType::e_admissionRequest: case H460_MessageType::e_admissionRequest:
case H460_MessageType::e_admissionConfirm: case H460_MessageType::e_admissionConfirm:
case H460_MessageType::e_admissionReject: case H460_MessageType::e_admissionReject:
return true; return true;
default: default:
skipping to change at line 109 skipping to change at line 109
// Build Message // Build Message
H460_FeatureStd feat = H460_FeatureStd(9); H460_FeatureStd feat = H460_FeatureStd(9);
pdu = feat; pdu = feat;
return true; return true;
} }
void H460_FeatureStd9::OnReceiveAdmissionConfirm(const H225_FeatureDescriptor & pdu) void H460_FeatureStd9::OnReceiveAdmissionConfirm(const H225_FeatureDescriptor & pdu)
{ {
qossupport = true; m_qossupport = true;
CON->H4609EnableStats(); m_con->H4609EnableStats();
H460_FeatureStd & feat = (H460_FeatureStd &)pdu; H460_FeatureStd & feat = (H460_FeatureStd &)pdu;
if (feat.Contains(0)) if (feat.Contains(0))
finalonly = true; m_finalonly = true;
CON->H4609StatsFinal(finalonly); m_con->H4609StatsFinal(m_finalonly);
} }
PBoolean H460_FeatureStd9::GenerateReport(H4609_ArrayOf_RTCPMeasures & report) PBoolean H460_FeatureStd9::GenerateReport(H4609_ArrayOf_RTCPMeasures & report)
{ {
H323Connection::H4609Statistics * stat = CON->H4609DequeueStats(); H323Connection::H4609Statistics * stat = m_con->H4609DequeueStats();
while (stat) { while (stat) {
H4609_RTCPMeasures info; H4609_RTCPMeasures info;
// RTP Information // RTP Information
H225_TransportChannelInfo & rtp = info.m_rtpAddress; H225_TransportChannelInfo & rtp = info.m_rtpAddress;
rtp.IncludeOptionalField(H225_TransportChannelInfo::e_sendAddress); rtp.IncludeOptionalField(H225_TransportChannelInfo::e_sendAddress);
stat->sendRTPaddr.SetPDU(rtp.m_sendAddress); stat->sendRTPaddr.SetPDU(rtp.m_sendAddress);
rtp.IncludeOptionalField(H225_TransportChannelInfo::e_recvAddress); rtp.IncludeOptionalField(H225_TransportChannelInfo::e_recvAddress);
skipping to change at line 202 skipping to change at line 202
} }
} }
PINDEX size = report.GetSize(); PINDEX size = report.GetSize();
report.SetSize(size+1); report.SetSize(size+1);
report[size] = info; report[size] = info;
delete stat; delete stat;
// Get next call statistics record // Get next call statistics record
stat = CON->H4609DequeueStats(); stat = m_con->H4609DequeueStats();
} }
return (report.GetSize() > 0); return (report.GetSize() > 0);
} }
PBoolean H460_FeatureStd9::WriteStatisticsReport(H460_FeatureStd & msg, PBoolean final) PBoolean H460_FeatureStd9::WriteStatisticsReport(H460_FeatureStd & msg, PBoolean final)
{ {
// Generate the report // Generate the report
PBoolean success = FALSE; PBoolean success = FALSE;
H4609_QosMonitoringReportData qosdata; H4609_QosMonitoringReportData qosdata;
if (!final) { if (!final) {
qosdata.SetTag(H4609_QosMonitoringReportData::e_periodic); qosdata.SetTag(H4609_QosMonitoringReportData::e_periodic);
H4609_PeriodicQoSMonReport & rep = qosdata; H4609_PeriodicQoSMonReport & rep = qosdata;
H4609_ArrayOf_PerCallQoSReport & percall = rep.m_perCallInfo; H4609_ArrayOf_PerCallQoSReport & percall = rep.m_perCallInfo;
percall.SetSize(1); percall.SetSize(1);
H4609_PerCallQoSReport & period = percall[0]; H4609_PerCallQoSReport & period = percall[0];
period.m_callReferenceValue = CON->GetCallReference(); period.m_callReferenceValue = m_con->GetCallReference();
period.m_conferenceID = CON->GetConferenceIdentifier(); period.m_conferenceID = m_con->GetConferenceIdentifier();
period.m_callIdentifier.m_guid = CON->GetCallIdentifier(); period.m_callIdentifier.m_guid = m_con->GetCallIdentifier();
if (GenerateReport(period.m_mediaChannelsQoS)) { if (GenerateReport(period.m_mediaChannelsQoS)) {
period.IncludeOptionalField(H4609_PerCallQoSReport::e_mediaChannelsQoS ); period.IncludeOptionalField(H4609_PerCallQoSReport::e_mediaChannelsQoS );
success = true; success = true;
} }
} else { } else {
qosdata.SetTag(H4609_QosMonitoringReportData::e_final); qosdata.SetTag(H4609_QosMonitoringReportData::e_final);
H4609_FinalQosMonReport & rep = qosdata; H4609_FinalQosMonReport & rep = qosdata;
success = GenerateReport(rep.m_mediaInfo); success = GenerateReport(rep.m_mediaInfo);
} }
if (success) { if (success) {
PTRACE(6,"Std9\tStatistics Report\n" << qosdata); PTRACE(6, "Std9\tStatistics Report\n" << qosdata);
PASN_OctetString rawstats; PASN_OctetString rawstats;
rawstats.EncodeSubType(qosdata); rawstats.EncodeSubType(qosdata);
msg.Add(1,H460_FeatureContent(rawstats)); msg.Add(1, H460_FeatureContent(rawstats));
} }
return success; return success;
} }
PBoolean H460_FeatureStd9::OnSendInfoRequestResponseMessage(H225_FeatureDescript or & pdu) PBoolean H460_FeatureStd9::OnSendInfoRequestResponseMessage(H225_FeatureDescript or & pdu)
{ {
if (!qossupport) if (!m_qossupport)
return false; return false;
H460_FeatureStd feat = H460_FeatureStd(9); H460_FeatureStd feat = H460_FeatureStd(9);
if (WriteStatisticsReport(feat,finalonly)) { if (WriteStatisticsReport(feat, m_finalonly)) {
pdu = feat; pdu = feat;
return true; return true;
} }
return true; return true;
} }
PBoolean H460_FeatureStd9::OnSendDisengagementRequestMessage(H225_FeatureDescrip tor & pdu) PBoolean H460_FeatureStd9::OnSendDisengagementRequestMessage(H225_FeatureDescrip tor & pdu)
{ {
if (!qossupport) if (!m_qossupport)
return false; return false;
H460_FeatureStd feat = H460_FeatureStd(9); H460_FeatureStd feat = H460_FeatureStd(9);
if (WriteStatisticsReport(feat,finalonly)) { if (WriteStatisticsReport(feat, m_finalonly)) {
pdu = feat; pdu = feat;
return true; return true;
} }
return false; return false;
} }
#ifdef _MSC_VER #ifdef _MSC_VER
#pragma warning(default : 4239) #pragma warning(default : 4239)
#endif #endif
 End of changes. 17 change blocks. 
26 lines changed or deleted 26 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)