本文整理汇总了C++中Appearance::setResubscribeInterval方法的典型用法代码示例。如果您正苦于以下问题:C++ Appearance::setResubscribeInterval方法的具体用法?C++ Appearance::setResubscribeInterval怎么用?C++ Appearance::setResubscribeInterval使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Appearance
的用法示例。
在下文中一共展示了Appearance::setResubscribeInterval方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: handleNotifyRequest
//.........这里部分代码省略.........
// Ignore calls with no appearanceId - these are considered "exclusive".
// (e.g. MoH calls are private to the set involved)
// These dialogs are not forwarded on to other sets in either partial or full updates.
if ( appearanceId == "" )
{
Os::Logger::instance().log(FAC_SAA, PRI_DEBUG, "AppearanceGroup::handleNotifyRequest skipping call with no appearance info");
delete lContent->removeDialog(pDialog);
continue;
}
if ( dialogId.contains("@@") )
{
// this is one of our identifiers already
uniqueDialogId = dialogId;
}
else
{
// make a guaranteed unique dialog id, by
// prepending to each id value the call-id of the subscription
// from which the dialog event was obtained, with "@@" as a separator
msg->getCallIdField(&uniqueDialogId);
uniqueDialogId.append("@@");
uniqueDialogId.append(dialogId);
pDialog->setDialogId(uniqueDialogId);
}
Os::Logger::instance().log(FAC_SAA, PRI_INFO,
"AppearanceGroup::handleNotifyRequest: "
"%s update from %s: dialogId %s, x-line-id %s, state %s(%s)",
state.data(), contactUri.data(), uniqueDialogId.data(),
appearanceId.data(), dialogState.data(), rendering.data());
}
delete itor;
// Check to see if this appearance (of the Appearance) is available
bool okToProceed = true;
if ( state == "partial" && dialogState == "trying" )
{
UtlHashMapIterator appitor(mAppearances);
UtlString* handle;
while ( okToProceed && (handle = dynamic_cast <UtlString*> (appitor())))
{
Appearance* inst = dynamic_cast <Appearance*> (appitor.value());
okToProceed = !inst->appearanceIdIsSeized(appearanceId);
}
}
bool bSendPartialContent = false;
bool bSendFullContent = false;
// Send the response.
if (okToProceed)
{
response.setOkResponseData(msg, NULL);
}
else
{
Os::Logger::instance().log(FAC_SAA, PRI_DEBUG,
"AppearanceGroup::handleNotifyRequest '%s' appearanceId %s is busy",
entity.data(), appearanceId.data());
response.setInterfaceIpPort(msg->getInterfaceIp(), msg->getInterfacePort());
response.setResponseData(msg, 409, "Conflict");
}
getAppearanceAgent()->getServerUserAgent().send(response);
if (okToProceed)
{
if (lContent)
{
// Send the content to the proper Appearance instance, so it can
// save these dialogs, and set flag to indicate whether they should be sent in partial update
bSendPartialContent = pThisAppearance->updateState(lContent, bSendFullContent);
}
// Publish full and partial updates to the SipPublishContentMgr
publish(bSendFullContent, bSendPartialContent, lContent);
}
// Adjust the expiration of the subscription if the set has the line "seized"
// and return it to the longer default if it does not.
UtlHashMapIterator appitor(mAppearances);
UtlString* handle;
while ( (handle = dynamic_cast <UtlString*> (appitor())))
{
Appearance* inst = dynamic_cast <Appearance*> (appitor.value());
// if set has line seized, use short subscription timer
if ( inst->appearanceIsBusy() )
{
inst->setResubscribeInterval(true);
}
else
{
inst->setResubscribeInterval(false);
}
}
if (lContent)
{
delete lContent;
}
}