当前位置: 首页>>代码示例>>C++>>正文


C++ ContactList::entries方法代码示例

本文整理汇总了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 );
   }
}
开发者ID:astubbs,项目名称:sipxecs,代码行数:27,代码来源:SipRedirectorPresenceRouting.cpp

示例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;
 }
开发者ID:astubbs,项目名称:sipxecs,代码行数:29,代码来源:DummyRedirectPlugin.cpp

示例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 );
 }
开发者ID:astubbs,项目名称:sipxecs,代码行数:16,代码来源:DummyRedirectPlugin.cpp


注:本文中的ContactList::entries方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。