本文整理汇总了C++中UtlHashMap::removeReference方法的典型用法代码示例。如果您正苦于以下问题:C++ UtlHashMap::removeReference方法的具体用法?C++ UtlHashMap::removeReference怎么用?C++ UtlHashMap::removeReference使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类UtlHashMap
的用法示例。
在下文中一共展示了UtlHashMap::removeReference方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: updateCallState
OsStatus ACDCallManager::updateCallState(SIPX_CALLSTATE_INFO* pCallInfo)
{
SIPX_CALL hCallHandle;
SIPX_LINE hLineHandle;
int callEvent;
int callCause;
OsStatus status = OS_FAILED ;
mLock.acquire();
// Extract the call handle and state info
hCallHandle = pCallInfo->hCall;
hLineHandle = pCallInfo->hLine;
callEvent = pCallInfo->event;
callCause = pCallInfo->cause;
OsSysLog::add(FAC_ACD, gACD_DEBUG, "ACDCallManager::updateCallState hCall=%d hLine=%d callEvent %d callCause %d associated callHandle %d remoteAddr %s",
hCallHandle, hLineHandle, callEvent, callCause, pCallInfo->hAssociatedCall, pCallInfo->remoteAddress);
// Search for the call handle in the various maps
// Inbound calls are in the mCallHandleMap
char *which = "mCallHandleMap" ;
UtlHashMap *map = &mCallHandleMap ;
UtlInt callKey(hCallHandle);
UtlContainable *pValue = NULL ;
pValue = mCallHandleMap.findValue(&callKey) ;
if (pValue == NULL) {
// Calls to agents are in the mAgentCallHandleMap
which = "mAgentCallHandleMap" ;
map = &mAgentCallHandleMap ;
pValue = mAgentCallHandleMap.findValue(&callKey) ;
}
if (pValue == NULL) {
// In transfer mode, sometimes calls end up in the mTransferCallHandleMap
which = "mTransferCallHandleMap" ;
map = &mTransferCallHandleMap ;
pValue = mTransferCallHandleMap.findValue(&callKey) ;
}
if (pValue == NULL) {
which = "mDeadCallHandleMap" ;
map = &mDeadCallHandleMap ;
pValue = mDeadCallHandleMap.findValue(&callKey) ;
}
if (pValue != NULL)
{
if (callEvent == CALLSTATE_DESTROYED) {
// If event is destroyed, then that is the last we will see of this
// handle. Remove it from whatever map we found it in.
OsSysLog::add(FAC_ACD, gACD_DEBUG, "ACDCallManager::updateCallState - "
"removing hCall=%d from %s", hCallHandle, which) ;
map->removeReference(&callKey);
}
else
{
if (map != &mDeadCallHandleMap) {
// Pass event along to the ACDCall we found
ACDCall* pCallRef = dynamic_cast<ACDCall*>(pValue);
OsSysLog::add(FAC_ACD, gACD_DEBUG,
"ACDCallManager::updateCallState - "
"Found ACDCall Call(%d) hCall=%d Object(%p) using %s",
pCallRef->mhCallHandle, hCallHandle,
pCallRef, which) ;
pCallRef->updateState(hCallHandle, callEvent, callCause);
} else {
OsSysLog::add(FAC_ACD, gACD_DEBUG,
"ACDCallManager::updateCallState - ignoring dead hCall=%d events",
hCallHandle);
// Kill the darn thing, just to make sure it goes away
sipxCallDestroy(hCallHandle) ;
}
}
status = OS_SUCCESS ;
} else {
OsSysLog::add(FAC_ACD, gACD_DEBUG,
"ACDCallManager::updateCallState - did not find hCall=%d hLine=%d",
hCallHandle, hLineHandle);
}
mLock.release();
return status;
}