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


C++ CError::isNoError方法代码示例

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


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

示例1: write

 CError write(std::pair<K, V> const& val)
 {
    CError err = write(val.first);
    if (!err.isNoError())
       return err;
    err = write(val.second);
    if (!err.isNoError())
       return err;
    return CError::NoError(moduleName);
 }
开发者ID:babenkoav78,项目名称:iviLink,代码行数:10,代码来源:buffer_helpers.hpp

示例2: read

 CError read(std::pair<K, V> & val)
 {
    CError err = read(val.first);
    if (!err.isNoError())
       return err;
    err = read(val.second);
    if (!err.isNoError())
       return err;
    return CError::NoError(moduleName);
 }
开发者ID:babenkoav78,项目名称:iviLink,代码行数:10,代码来源:buffer_helpers.hpp

示例3: connect

      void CPmpProtocol::connect()
      {
         LOG4CPLUS_TRACE_METHOD(msLogger, __PRETTY_FUNCTION__ );
         while (mBe)
         {
            LOG4CPLUS_INFO(msLogger, "connect attempt");
            UInt32 chid = 0;
            CError err = iviLink::ChannelSupervisor::allocateChannel(this,mTag.c_str(), chid);
            if (err.isNoError())
            {
               mChannelIdCond.lock();
               LOG4CPLUS_INFO(msLogger, "ok chid = " +
                     convertIntegerToString(static_cast<int>(chid)));
               mChannelId = chid;
               mChannelIdCond.broadcast();
               mChannelIdCond.unlock();

               mConnectionLostSem.wait();
            }
            else
            {
               LOG4CPLUS_INFO(msLogger, static_cast<std::string>(err));
               sleep(1);
            }
         }
      }
开发者ID:Vanuan,项目名称:iviLink,代码行数:26,代码来源:CPmpProtocol.cpp

示例4: loop

 int CProfileRepoServerClb::loop()
 {
    CError err = CError::NoError("ProfileRepository","loop");
    for (int i = 1; ; ++i)
    {
       LOG4CPLUS_INFO(msLogger, "CProfileRepoServerClb::loop() : connection try number: "+
             convertIntegerToString(i));
       err = mpIpc->waitForConnection();
       LOG4CPLUS_INFO(msLogger, "CProfileRepoServerClb::loop() : waitForConnectionEnded()");
       if (err.isNoError())
       {
          LOG4CPLUS_INFO(msLogger,"CProfileRepoServerClb::loop() :: *** client connected to server ***");
          mConLostSem.wait();
          LOG4CPLUS_INFO(msLogger,"CProfileRepoServerClb::loop() :: *** connection lost, exiting ***");
          return 0;
       }
       else
       {
          LOG4CPLUS_INFO(msLogger, static_cast<std::string>(err));
       }
       LOG4CPLUS_INFO(msLogger, "failed connection");
       usleep (250000);
    }
    return 0;
 }
开发者ID:babenkoav78,项目名称:iviLink,代码行数:25,代码来源:CProfileRepoServerClb.cpp

示例5: CThread

CConnectivityAgentProxy::CConnectivityAgentProxy()
		: CThread("CallbackTread"), mpIpc(NULL)
{
	LOG4CPLUS_TRACE_METHOD(logger, __PRETTY_FUNCTION__);
	static char const* const arr[] =
	{ gpCA_UNIX_SOCK_PATH, first_lsn_path, second_lsn_path };

	for (size_t i = 0; i < sizeof(arr) / sizeof(arr[0]); ++i)
	{
		if (arr[i])
		{
			LOG4CPLUS_INFO(logger,
					"Trying to connect to connectivity agent using address " + std::string(arr[i]));
			CIpc* pipc = new CIpc(arr[i], *this);
			CError err = pipc->connect();
			if (err.isNoError())
			{
				mpIpc = pipc;
				break;
			} else
			{
				LOG4CPLUS_WARN(logger, static_cast<std::string>(err));
				delete pipc;
			}
		}
	}

	if (!mpIpc)
	{
		LOG4CPLUS_ERROR(logger, "Unable to connect to connectivity agent");
	}

	start();
}
开发者ID:babenkoav78,项目名称:iviLink,代码行数:34,代码来源:CConnectivityAgentProxy.cpp

示例6: loop

 void CAppManPmpIpcClient::loop()
 {
    LOG4CPLUS_TRACE_METHOD(msLogger, __PRETTY_FUNCTION__);
    mBe = true;
    CError err = CError::NoError("","");
    for (int i = 1;mBe ; ++i)
    {
       LOG4CPLUS_INFO(msLogger, "loop() : connect trying number : " + convertIntegerToString(i));
       err = mpIpc->connect();
       LOG4CPLUS_INFO(msLogger, "loop() : connect ended");
       if (mBe && err.isNoError())
       {
          mNoConnection = false;
          mConLostSem.wait();
          mNoConnection = true;
       }
       if (!mBe)
       {
          LOG4CPLUS_INFO(msLogger, "loop() :: mBe == false");
          break;
       }
       LOG4CPLUS_WARN(msLogger, "loop() :: connection failed");
       usleep(250000);
    }
 }
开发者ID:babenkoav78,项目名称:iviLink,代码行数:25,代码来源:CAppManPmpIpcClient.cpp

示例7: generatePIUID

CPMALError CPIM::generatePIUID(iviLink::CUid const& profileUid,
      iviLink::Service::Uid const& serviceUID,
      iviLink::Profile::IUid & piuid)
{
   bool remote = false;

   mIncomingPrfMapMutex.lock();
   {
      if (!mIncomingPrfMap.empty())
      {
         tIncomingPrfMap::iterator it = mIncomingPrfMap.find(std::make_pair(serviceUID, profileUid));
         if (it != mIncomingPrfMap.end())
         {
            piuid = it->second;
            mIncomingPrfMap.erase(it);
            remote = true;
         }
      }
   }
   mIncomingPrfMapMutex.unlock();

   if (remote)
      return CPMALError::NoPMALError(gModuleName);

   CError err = PIM::getPIUID(piuid);
   if (!err.isNoError())
   {
      LOG4CPLUS_ERROR(logger, static_cast<std::string>(err));
      return CPMALError(CPMALError::ERROR_PIM_INTERNAL, gModuleName, "no piuid");
   }

   return CPMALError::NoPMALError(gModuleName);
}
开发者ID:Vanuan,项目名称:iviLink,代码行数:33,代码来源:CPIM.cpp

示例8: connect

    bool connect()
    {
        CError err = CError::NoError();
        if (mpIpc == NULL)
        {
            char const * addr;
            if (gpNEGOTIATOR_IPC_ADDR != NULL)
            {
                addr = gpNEGOTIATOR_IPC_ADDR;
            } else
            {
                addr = ipcNegotiatorId;
            }
            mpIpc = new CIpc(addr, *this);
        }
        for (int tryNum = 1; tryNum <= MAX_TRY_COUNT; ++tryNum)
        {
            err = mpIpc->connect();
            if (err.isNoError())
            {
                return true;
            }

            sleep(2);
        }
        return false;
    }
开发者ID:babenkoav78,项目名称:iviLink,代码行数:27,代码来源:NegotiatorClient.cpp

示例9: unloadAll

void CPIM::unloadAll()
{
   LOG4CPLUS_TRACE_METHOD(logger, __PRETTY_FUNCTION__);
   typedef PIM::CProfileInstanceMap::tProfilesList PL;
   PL profiles;
   CError err = mInstanceMap.getAllRegisterd(profiles);
   if (!err.isNoError())
   {
      LOG4CPLUS_ERROR(logger, static_cast<std::string>(err));
      return;
   }

   IProfileManagerCallbacks* clbs = NULL;
   CPMALComponentMgr* mgr = CPMALComponentMgr::getInstance();
   if (mgr)
   {
      clbs = mgr->getProfileManagerCallbacks();
   }

   for (PL::iterator it = profiles.begin(); it != profiles.end(); ++it)
   {
      Profile::IUid const& piuid = it->first;
      Profile::CProfile* pp = static_cast<Profile::CProfile*>(it->second);

      unloadProfileThroughClient(clbs, pp, piuid);
   }
}
开发者ID:Vanuan,项目名称:iviLink,代码行数:27,代码来源:CPIM.cpp

示例10: onDisable

void CMediaControlServerProfile::onDisable() {
    LOG4CPLUS_TRACE_METHOD(msLogger, __PRETTY_FUNCTION__);
    CError err = iviLink::Channel::deallocateChannel(mChannelID);
    if (!err.isNoError()) {
        LOG4CPLUS_WARN(msLogger, "Unable to deallocate channel: " + static_cast<std::string> (err));
    }
}
开发者ID:babenkoav78,项目名称:iviLink,代码行数:7,代码来源:CMediaControlServerProfile.cpp

示例11: onDisable

void CClimateClientProfile::onDisable()
{
   CError err = iviLink::Channel::deallocateChannel(mChannelID);
   if (!err.isNoError())
   {
      LOG4CPLUS_WARN(msLogger, "Unable to deallocate channel: " + static_cast<std::string>(err));
   }
}
开发者ID:Vanuan,项目名称:iviLink,代码行数:8,代码来源:CClimateClientProfile.cpp

示例12: readContainer

   CError readContainer(InsertIter result)
   {
      typedef typename InsertIter::container_type::value_type tVal;
      UInt32 size = 0;

      CError err = read(size);
      if (!err.isNoError())
         return err;

      for (UInt32 i = 0; i < size; ++i)
      {
         tVal val;
         err = read(val);
         if (!err.isNoError())
            return err;
         *result++ = val;
      }
      return CError::NoError(moduleName);
   }
开发者ID:babenkoav78,项目名称:iviLink,代码行数:19,代码来源:buffer_helpers.hpp

示例13:

void ReceiverProfile<T,I>::onDisable()
{
    LOG4CPLUS_TRACE_METHOD( (logger<T,I>()), __PRETTY_FUNCTION__ );
    CError err = iviLink::Channel::deallocateChannel(mChannelID);
    if (!err.isNoError())
    {
        LOG4CPLUS_ERROR((logger<T,I>()), "Unable to deallocate channel: " + static_cast<std::string>(err));
    }
    else
        mChannelID = 0;
}
开发者ID:babenkoav78,项目名称:iviLink,代码行数:11,代码来源:ReceiverProfile.hpp

示例14: onChannelDeleted

void CMediaControlServerProfile::onChannelDeleted(const UInt32 channel_id) {
    LOG4CPLUS_TRACE_METHOD(msLogger, __PRETTY_FUNCTION__);

    if (mChannelID == channel_id)
        mChannelID = 0;

    CError err = iviLink::Channel::deallocateChannel(channel_id);
    if (!err.isNoError()) {
        LOG4CPLUS_WARN(msLogger, "Unable to deallocate channel: " + static_cast<std::string> (err));
    }
}
开发者ID:babenkoav78,项目名称:iviLink,代码行数:11,代码来源:CMediaControlServerProfile.cpp

示例15: unloadProfile

void CPIM::unloadProfile(Profile::IUid const& piuid, Profile::CProfile *& profile)
{
   LOG4CPLUS_TRACE_METHOD(logger, __PRETTY_FUNCTION__ + (" piuid " + piuid.value() + " profile " + convertIntegerToString((intptr_t)profile)));

   CError err = mInstanceMap.unregisterProfile(profile);
   if (!err.isNoError())
   {
      // Someone was faster and already removed this profile
      LOG4CPLUS_DEBUG(logger, "unloadProfile: profile already unloaded, err = " + static_cast<std::string>(err));
      return;
   }

   PIM::CProfileEnabler::disable(profile);
   
   if (mRemoteDiedProfiles.erase(piuid) == 0)
   {
      CPMALComponentMgr *pMgr = CPMALComponentMgr::getInstance();
      if (pMgr)
      {
         IPMALIpcToPIM* ipc = pMgr->getIpcToPIM();
         if (ipc)
         {
            err = ipc->profileDied(piuid);
            if (!err.isNoError())
            {
               /// @todo what error handling can be here?
               LOG4CPLUS_INFO(logger, "todo what error handling can be here?");
               LOG4CPLUS_ERROR(logger, static_cast<std::string>(err));
            }
         }
      }
   }

   PIM::releasePIUID(piuid);
   PIM::CProfileDestroyer::destroy(profile);
   
   profile = NULL;
   PIM::unloadProfileLib(piuid);
}
开发者ID:Vanuan,项目名称:iviLink,代码行数:39,代码来源:CPIM.cpp


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