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


C++ Complete函数代码示例

本文整理汇总了C++中Complete函数的典型用法代码示例。如果您正苦于以下问题:C++ Complete函数的具体用法?C++ Complete怎么用?C++ Complete使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


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

示例1: AsJsonString

void DownloadPartCommand::RunImpl()
{
	try {
		if (!m_client.GetAccount().get()) {
			MojString err;
			err.format("Account is not loaded for '%s'", AsJsonString(m_client.GetAccountId()).c_str());
			throw MailException(err.data(), __FILE__, __LINE__);
		}

		m_client.GetSession()->FetchEmail(m_emailId, m_partId, m_listener);
		Complete();
	} catch (const std::exception& ex) {
		Failure(ex);
	} catch (...) {
		Failure(MailException("Unknown exception in downloading email", __FILE__, __LINE__));
	}
}
开发者ID:Garfonso,项目名称:app-services,代码行数:17,代码来源:DownloadPartCommand.cpp

示例2: MojLogInfo

MojErr AuthPlainCommand::HandleResponse(const std::string& line)
{
	MojLogInfo(m_log, "AUTH PLAIN command response");

	if (m_status == Status_Ok) {
		MojLogInfo(m_log, "AUTH PLAIN OK");

		m_session.AuthPlainSuccess();
	} else {
		SmtpSession::SmtpError error = GetStandardError();
		error.internalError = "AUTH PLAIN failed";
		m_session.AuthPlainFailure(error);
	}

	Complete();
	return MojErrNone;
}
开发者ID:hatsada1,项目名称:app-services,代码行数:17,代码来源:AuthPlainCommand.cpp

示例3: Trace

void CCBSettingHandler::SetCBForServiceGroup()
    {
    TRACE_FUNC_ENTRY
    
    Trace(KDebugPrintD, "iClassArray.Count(): ", iClassArray.Count());
    if (iClassArray.Count() != 0)
        {
        iCBInfo->iServiceGroup = iClassArray[0];
        iPhone.SetCallBarringStatus(iStatus, iCondition, *iCBInfo);
        iClassArray.Remove(0);
        SetActive();
        }
    else
        {
        Complete(KErrNone);
        }
    TRACE_FUNC_EXIT
    }
开发者ID:cdaffara,项目名称:symbiandump-mw1,代码行数:18,代码来源:cbsettinghandler.cpp

示例4: CActionPacket

bool CMobSkillState::Update(time_point tick)
{
    if (tick > GetEntryTime() + m_castTime && !IsCompleted())
    {
        action_t action;
        m_PEntity->OnMobSkillFinished(*this, action);
        m_PEntity->loc.zone->PushPacket(m_PEntity, CHAR_INRANGE_SELF, new CActionPacket(action));
        auto delay = std::chrono::milliseconds(m_PSkill->getAnimationTime());
        m_finishTime = tick + delay;
        Complete();
    }
    if (IsCompleted() && tick > m_finishTime)
    {
        m_PEntity->PAI->EventHandler.triggerListener("WEAPONSKILL_STATE_EXIT", m_PEntity, m_PSkill->getID());
        return true;
    }
    return false;
}
开发者ID:DarkstarProject,项目名称:darkstar,代码行数:18,代码来源:mobskill_state.cpp

示例5: Complete

// -----------------------------------------------------------------------------
// CSTSCredentialManager::CreateCSRL
// Creates a CSR
// -----------------------------------------------------------------------------
void CSTSCredentialManager::CreateCSRL()
{

    if ((!iKeyInfo) || (!iDistinguishedName))
    {
        Complete(KErrGeneral);
        return;
    }

    iRequest = CPKCS10Request::NewL(*iDistinguishedName, *iKeyInfo);

    delete iRequestEncoded;
    iRequestEncoded = NULL;

    iState = ECreatingCSR;
    iRequest->CreateEncoding(iRequestEncoded, iStatus);
    SetActive();
}
开发者ID:cdaffara,项目名称:symbiandump-ossapps,代码行数:22,代码来源:cstscredentialmanager.cpp

示例6: if

bool CMagicState::Update(time_point tick)
{
    if (tick > GetEntryTime() + m_castTime && !IsCompleted())
    {
        m_interrupted = false;
        auto PTarget = m_PEntity->IsValidTarget(m_targid, m_PSpell->getValidTarget(), m_errorMsg);
        MSGBASIC_ID msg = MSGBASIC_IS_INTERRUPTED;

        action_t action;

        if (HasMoved() || !CanCastSpell(PTarget))
        {
            m_interrupted = true;
        }
        else if (battleutils::IsParalyzed(m_PEntity))
        {
            msg = MSGBASIC_IS_PARALYZED;
            m_interrupted = true;
        }
        else if (battleutils::IsIntimidated(m_PEntity, static_cast<CBattleEntity*>(PTarget)))
        {
            msg = MSGBASIC_IS_INTIMIDATED;
            m_interrupted = true;
        }

        if (m_interrupted)
        {
            m_PEntity->OnCastInterrupted(*this, action, msg);
        }
        else
        {
            m_PEntity->OnCastFinished(*this,action);
        }
        m_PEntity->PAI->EventHandler.triggerListener("MAGIC_USE", m_PEntity, PTarget, m_PSpell.get(), &action);
        m_PEntity->loc.zone->PushPacket(m_PEntity, CHAR_INRANGE_SELF, new CActionPacket(action));
        Complete();
    }
    else if (IsCompleted() && tick > GetEntryTime() + m_castTime + std::chrono::milliseconds(m_PSpell->getAnimationTime()))
    {
        m_PEntity->PAI->EventHandler.triggerListener("MAGIC_STATE_EXIT", m_PEntity, m_PSpell.get());
        return true;
    }
    return false;
}
开发者ID:Gravenet,项目名称:darkstar,代码行数:44,代码来源:magic_state.cpp

示例7: SpendCost

bool CWeaponSkillState::Update(time_point tick)
{
    if (!IsCompleted())
    {
        SpendCost();
        action_t action;
        m_PEntity->OnWeaponSkillFinished(*this, action);
        m_PEntity->loc.zone->PushPacket(m_PEntity, CHAR_INRANGE_SELF, new CActionPacket(action));
        auto delay = m_PSkill->getAnimationTime();
        m_finishTime = tick + delay;
        Complete();
    }
    else if (tick > m_finishTime)
    {
        m_PEntity->PAI->EventHandler.triggerListener("WEAPONSKILL_STATE_EXIT", m_PEntity, m_PSkill->getID());
        return true;
    }
    return false;
}
开发者ID:kyusa,项目名称:darkstar,代码行数:19,代码来源:weaponskill_state.cpp

示例8: iRequestParams

// ---------------------------------------------------------------------------
// CThumbnailMDSQueryTask::ReturnPath()
// ---------------------------------------------------------------------------
//
void CThumbnailMDSQueryTask::ReturnPath(const TDesC& aUri)
    {
    if ( ClientThreadAlive() )
        {
        // add path to message
        TInt ret = iMessage.Read( 0, iRequestParams );      
        if(ret == KErrNone)
            {
            TThumbnailRequestParams& params = iRequestParams();
            params.iFileName = aUri;
            ret = iMessage.Write( 0, iRequestParams );
            }
            
        // complete the message with a code from which client side
        // knows to make a new request using the path
        Complete( KThumbnailErrThumbnailNotFound );
        ResetMessageData();
        }
    }
开发者ID:kuailexs,项目名称:symbiandump-mw1,代码行数:23,代码来源:thumbnailmdsquerytask.cpp

示例9: TN_DEBUG2

// ---------------------------------------------------------------------------
// CThumbnailMDSQueryTask::StartL()
// ---------------------------------------------------------------------------
//
void CThumbnailMDSQueryTask::StartL()
    {
    TN_DEBUG2( "CThumbnailMDSQueryTask(0x%08x)::StartL()", this );
    OstTrace1( TRACE_NORMAL, CTHUMBNAILMDSQUERYTASK_STARTL, "CThumbnailMDSQueryTask::StartL;this=%o", this );

    CThumbnailTask::StartL();
    
    if (iMessage.Handle())
        {
        // start query
        iQuery->FindL();
        }
    else
        {
        // no point to continue
        Complete( KErrCancel );
        ResetMessageData();
        }
    }
开发者ID:kuailexs,项目名称:symbiandump-mw1,代码行数:23,代码来源:thumbnailmdsquerytask.cpp

示例10: switch

/**
Handles leaves during RunL

@param aError Error code
*/
TInt CMsgImOutboxSend::RunError(TInt aError)
	{
	switch (iState)
		{
		case EStateConnectingSession:
			{
			if (iMobilityOperation != EMobilityOperationMigrating)
				{
				iProgress.iSendFileProgress.iSessionState = EConnectingToSmtp;
				iProgress.iSendFileProgress.iBytesSent = 0;
				iProgress.iSendFileProgress.iBytesToSend = 0;
				iProgress.SetMsgNo(KErrNotFound);
				iProgress.SetConnectionIAP(KErrNotFound);
				}
			break;
			}

		case EStateSendingFiles:
			{
			if (iSession)
				{
				iProgress.iSendFileProgress = iSession->FileProgress();
				}
			iProgress.iSendFileProgress.iSessionState = ESendingImail;
			break;
			}

		case EStateUserPrompting:
		case EStateClosingSession:
		case EStateWaitingNewCarrier:
		case EStateMobilityError:
		default:
			{
			__ASSERT_DEBUG(EFalse, gPanic(EImsmUnexpectedState6));
			break;
			}
		}

	Complete(aError);

	return KErrNone;
	}
开发者ID:cdaffara,项目名称:symbiandump-ossapps,代码行数:47,代码来源:IMSM.CPP

示例11: switch

// ----------------------------------------------------------------------------
// ----------------------------------------------------------------------------
void CIpsPlgImap4PopulateOp::DoRunL()
    {
    FUNC_LOG;
    TInt err = iStatus.Int();
    delete iSubOperation;
    iSubOperation = NULL;
    
    switch( iState )
        {
        case EStateConnecting:
            {
            TMsvEntry tentry;
            TMsvId service;
            iMsvSession.GetEntry(iService, service, tentry );
            if( !tentry.Connected() )
                {
                CompleteObserver( KErrCouldNotConnect );
                return;
                }
            DoPopulateL();
            break;
            }
        case EStateFetching:         
            {
            if( err != KErrNone && iSubOperation )
                {
                iFetchErrorProgress = iSubOperation->ProgressL().AllocL();
                iState = EStateIdle;
                Complete();
                }
            break;
            }
        case EStateInfoEntryChange:
            {
            DoPopulateL();
            break;
            }
        case EStateIdle:
        default:
            break;
        }
    }
开发者ID:cdaffara,项目名称:symbiandump-ossapps,代码行数:44,代码来源:ipsplgimap4populateop.cpp

示例12: ErrorToException

MojErr PopAccountDeleteCommand::SmtpAccountDeletedResponse(MojObject& response, MojErr err)
{
	try {
		ErrorToException(err);

		MojLogInfo(m_log, "PopAccountDeleteCommand::SmtpAccountDeletedResponse");

		m_client.AccountDeleted();
		m_msg->replySuccess();
		Complete();
	} catch (const std::exception& e) {
		m_msg->replyError(err);
		Failure(e);
	} catch (...) {
		m_msg->replyError(MojErrInternal);
		Failure(MailException("unknown exception", __FILE__, __LINE__));
	}

	return MojErrNone;
}
开发者ID:Garfonso,项目名称:app-services,代码行数:20,代码来源:PopAccountDeleteCommand.cpp

示例13: Complete

void DMediaDriverTest::DoRead(TInt64 &aPos,TInt aLength,TMediaDrvDescData &aTrg)
//
// Read from specified area of media.
//
	{

	TInt ret=KErrNone;
	if (!aTrg.IsCurrentThread())
		ret=KErrGeneral;
	else
		{
		if ((ret=aTrg.CurrentThreadDescCheck(aLength))==KErrNone)
            {
			TDes8 &t=*((TDes8*)aTrg.iPtr);
			Mem::Copy((TAny*)(t.Ptr()+aTrg.iOffset),&iBuf[aPos.Low()],aLength);
			t.SetLength(aLength+aTrg.iOffset);
			}
		}
    Complete(KMediaDrvReadReq,ret);
	}
开发者ID:kuailexs,项目名称:symbiandump-os1,代码行数:20,代码来源:d_medt1.cpp

示例14: Complete

void DChannelComm::InitiateRead(TAny *aRxDes, TInt aLength)
	{

	// Complete zero-length read immediately.  maybe not

//	if (aLength == 0)
//		{
//		Complete(ERx, KErrNone);
//		return;
//		}
	TInt max=Kern::ThreadGetDesMaxLength(iClient,aRxDes);

	if (max < Abs(aLength) || max < 0)
		Complete(ERx, KErrGeneral);
		// do not start the Turnaround timer (invalid Descriptor this read never starts)
	else
		{
		iClientDestPtr = aRxDes;
		Read(iClient, aRxDes, aLength);
		}
	}
开发者ID:cdaffara,项目名称:symbiandump-os1,代码行数:21,代码来源:serialldd.cpp

示例15: LOGTEXT3

// ---------------------------------------------------------------------------
// CAtSmsNack::EventSignal
// other items were commented in a header
// ---------------------------------------------------------------------------
void CAtSmsNack::EventSignal(TAtEventSource aEventSource, TInt aStatus)
/**
 * Handle the events from the comm port
 *ValidateExpectString
 * @param aSource denotes if event is due to read, write or timeout
 */
	{
	LOGTEXT3(_L8("CAtSmsNack::EventSignal iStatus=%D iSource=%D"),aStatus,aEventSource);
	if(aStatus == KErrNone)
		{
		if((aEventSource == EWriteCompletion))
			{
			LOGTEXT(_L8("CAtSmsNack::EventSignal,EWriteCompletion!"));
			return;
			}
		aStatus = iError;
		}
	Complete();
	iPhoneGlobals.iEventSignalActive = EFalse;
	iCtsyDispatcherCallback.CallbackSmsAckSmsStoredComp(aStatus);
	}
开发者ID:cdaffara,项目名称:symbiandump-os1,代码行数:25,代码来源:atsmsack.cpp


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