本文整理汇总了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__));
}
}
示例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;
}
示例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
}
示例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;
}
示例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();
}
示例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;
}
示例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;
}
示例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();
}
}
示例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();
}
}
示例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;
}
示例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;
}
}
示例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;
}
示例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);
}
示例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);
}
}
示例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);
}