本文整理汇总了C++中ContactList::entries方法的典型用法代码示例。如果您正苦于以下问题:C++ ContactList::entries方法的具体用法?C++ ContactList::entries怎么用?C++ ContactList::entries使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ContactList
的用法示例。
在下文中一共展示了ContactList::entries方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: removeNonVoicemailContacts
void SipRedirectorPresenceRouting::removeNonVoicemailContacts( ContactList& contactList )
{
// walk the list to find the contact entry for voicemail
size_t index;
Url contactUrl;
bool bVoicemailContactFound = false;
for( index = 0; index < contactList.entries(); index++ )
{
if( contactList.get( index, contactUrl ) )
{
UtlString userPart;
contactUrl.getUserId( userPart );
if( userPart.index( VOICEMAIL_CONTACT_PREFIX ) == 0 )
{
bVoicemailContactFound = true;
break;
}
}
}
// if vm contact found, remove all and put vm contact back in.
if( bVoicemailContactFound )
{
contactList.removeAll( *this );
contactList.add( contactUrl, *this );
}
}
示例2: if
virtual RedirectPlugin::LookUpStatus lookUp(
const SipMessage& message,
const UtlString& requestString,
const Url& requestUri,
const UtlString& method,
ContactList& contactList,
RequestSeqNo requestSeqNo,
int redirectorNo,
SipRedirectorPrivateStorage*& privateStorage,
ErrorDescriptor& errorDescriptor)
{
char diagMessage[100];
sprintf( diagMessage, "%s::lookUp: contactList Size=%d", mLogName.data(), contactList.entries() );
globalList.push_back( diagMessage );
if( mBehavior.compareTo("ADD_SELF_AS_CONTACT") == 0 )
{
contactList.add( mLogName, *this );
return RedirectPlugin::SUCCESS;
}
else if( mBehavior.compareTo("DONT_ADD_CONTACT") == 0 )
{
return RedirectPlugin::SUCCESS;
}
else if( mBehavior.compareTo("RETURN_ERROR") == 0 )
{
return RedirectPlugin::ERROR;
}
return RedirectPlugin::SUCCESS;
}
示例3: observe
virtual void observe(
const SipMessage& message, ///< the incoming SIP message
const UtlString& requestString, /**< the request URI from the SIP message as a UtlString
* ONLY for use in debugging messages; all comparisons
* should be with requestUri */
const Url& requestUri, ///< the request URI from the SIP message as a Uri,
const UtlString& method, ///< Method of the request to observe
const ContactList& contactList, ///< Read-only list of contacts to use for redirection
RequestSeqNo requestSeqNo, ///< the request sequence number
int redirectorNo ///< the identifier for this redirector
)
{
char diagMessage[100];
sprintf( diagMessage, "%s::observe: contactList Size=%d", mLogName.data(), contactList.entries() );
globalList.push_back( diagMessage );
}