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


C++ OsConfigDb::getSubHash方法代码示例

本文整理汇总了C++中OsConfigDb::getSubHash方法的典型用法代码示例。如果您正苦于以下问题:C++ OsConfigDb::getSubHash方法的具体用法?C++ OsConfigDb::getSubHash怎么用?C++ OsConfigDb::getSubHash使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在OsConfigDb的用法示例。


在下文中一共展示了OsConfigDb::getSubHash方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: readConfig

void SipImpliedSubscriptions::readConfig( OsConfigDb& configDb )
{
  OsConfigDb impliedSubscriptionConfig;
  OsStatus   found;
  UtlString   key;
  UtlString   name;
  UtlString   recognizer;

  configuredUserAgents.reset();

  // extract the database of implied message waiting subscriptions
  configDb.getSubHash( ConfigPrefix
                      ,impliedSubscriptionConfig
                      );
  for ( key = "", found = impliedSubscriptionConfig.getNext( key
                                                            ,name
                                                            ,recognizer
                                                            );
        found == OS_SUCCESS;
        key = name, found = impliedSubscriptionConfig.getNext( key
                                                              ,name
                                                              ,recognizer
                                                              )
       )
    {
      OsSysLog::add( FAC_SIP, PRI_INFO
                    ,"%s::readConfig name=\"%s\" recognizer=\"%s\""
                    ,mLogName.data(), name.data(), recognizer.data()
                    );
      configuredUserAgents.add( name, recognizer, mLogName );
    }
}
开发者ID:chemeris,项目名称:sipxecs,代码行数:32,代码来源:SipImpliedSubscriptions.cpp

示例2: readConfig

   /// Construct the subhash for the hook and configure it.
   void readConfig(const UtlString& prefix, OsConfigDb& configDb)
      {
         if (hook)
         {
            OsConfigDb myConfig;
            UtlString myConfigName;

            // build up "<prefix>.<instance>." key for configuration subhash
            myConfigName.append(prefix);
            myConfigName.append('.');
            myConfigName.append(*this);
            myConfigName.append('.');
            
            if (OS_SUCCESS == configDb.getSubHash(myConfigName, myConfig))
            {
               OsSysLog::add(FAC_KERNEL, PRI_DEBUG,
                             "Plugin configuring '%s' from '%s'",
                             data(), myConfigName.data()
                             );
               hook->readConfig(myConfig);
            }
            else
            {
               OsSysLog::add(FAC_KERNEL, PRI_CRIT,
                             "Plugin no configuration found for '%s'",
                             data()
                             );
            }
         }
      };
开发者ID:Jaroslav23,项目名称:sipxtapi,代码行数:31,代码来源:Plugin.cpp

示例3: iterator

UtlBoolean
SipRedirectServer::initialize(OsConfigDb& configDb
                              ///< Configuration parameters
                              )
{
   configDb.get("SIP_REGISTRAR_DOMAIN_NAME", mDefaultDomain);

   mProxyNormalPort = configDb.getPort("SIP_REGISTRAR_PROXY_PORT");
   if (mProxyNormalPort == PORT_DEFAULT)
   {
      mProxyNormalPort = SIP_PORT;
   }
   mAckRouteToProxy.insert(0, "<");
   mAckRouteToProxy.append(mDefaultDomain);
   mAckRouteToProxy.append(";lr>");

   // Load the list of redirect processors.
   mRedirectPlugins.readConfig(configDb);
   mRedirectorCount = mRedirectPlugins.entries();

   // Call their ::initialize() methods.
   mpConfiguredRedirectors = new RedirectorDescriptor[ mRedirectorCount ];
   PluginIterator iterator(mRedirectPlugins);
   RedirectPlugin* redirector;
   UtlString redirectorName;
   bool bAuthorityLevelDbAvailable;
   UtlString authorityLevelDbPrefix = RedirectPlugin::Prefix;
   authorityLevelDbPrefix.append( AuthorityLevelPrefix );
   authorityLevelDbPrefix.append( '.' );
   OsConfigDb authorityLevelDb;

   bAuthorityLevelDbAvailable = ( configDb.getSubHash( authorityLevelDbPrefix, authorityLevelDb ) == OS_SUCCESS );
   int i;       // Iterator sequence number.

   for (i = 0; (redirector = static_cast <RedirectPlugin*> (iterator.next( &redirectorName )));
        i++)
   {
      mpConfiguredRedirectors[i].name = redirectorName;
      if( ( mpConfiguredRedirectors[i].bActive =
             ( redirector->initialize(configDb, i, mDefaultDomain) == OS_SUCCESS ) ) )
      {
         redirector->setUserAgent(mpSipUserAgent);
         int authorityLevel;
         if( bAuthorityLevelDbAvailable         &&
             authorityLevelDb.get( redirectorName, authorityLevel ) == OS_SUCCESS )
         {
            mpConfiguredRedirectors[i].authorityLevel = authorityLevel;
         }
         else
         {
            mpConfiguredRedirectors[i].authorityLevel = LOWEST_AUTHORITY_LEVEL;
         }
         Os::Logger::instance().log(FAC_SIP, PRI_DEBUG,
                       "SipRedirectServer::initialize "
                       "Initialized redirector %s (authority level = %zd)", redirectorName.data(), mpConfiguredRedirectors[i].authorityLevel );
      }
      else
      {
         Os::Logger::instance().log(FAC_SIP, PRI_DEBUG,
                       "SipRedirectServer::initialize "
                       "Redirector %s is inactive ", redirectorName.data() );
      }
   }
   return true;
}
开发者ID:maberchti,项目名称:sipxecs,代码行数:65,代码来源:SipRedirectServer.cpp


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