void CEmailNotificationParser::RunL() { iCompleted = iStatus.Int(); if (iCompleted != KErrNone) { User::RequestComplete(iReport,iCompleted); return; } switch (iState) { case EUnfoldMessage: // UnfoldSmsL completed TRAPD(err, ChangeStateL(EParseMessage)); if (err != KErrNone) User::RequestComplete(iReport, err); break; case EParseMessage: TRAP(err, ChangeStateL(ECompleteMessage)); if(err != KErrNone) { User::RequestComplete(iReport, err); } break; case ECompleteMessage: // CompleteMessage completed User::RequestComplete(iReport, KErrNone); break; default: break; } }
EXPORT_C TKeyResponse AknListBoxShortCuts::OfferKeyEventL(const TKeyEvent& aKeyEvent, TEventCode /*aType*/) { TShortcutEvent event=ENone; switch (aKeyEvent.iCode) { case EKeyDownArrow: case EKeyUpArrow: event = ENavi; break; case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': case '*': case '#': event = ENumber; break; }; if (event == ENone) return EKeyWasNotConsumed; ChangeStateL(event); DoProcedureL(); return EKeyWasConsumed; }
void CEmailNotificationParser::ParseL(TRequestStatus& aStatus, const TDesC& aSms) { TMsvEntry entry = iEntry.Entry(); // Get the generic stuff iEntryId = entry.Id(); // store the TMsvId __ASSERT_DEBUG((entry.MtmData3() == 0 || entry.MtmData3() == 1), User::Panic(_L("ENP-DLL"),KErrCorrupt)); // Already parsed.... if(entry.MtmData3() == 1) { iReport = &aStatus; User::RequestComplete(iReport, KErrNone); } // not parsed else if(entry.MtmData3() == 0) { if (iSmsBuf != NULL) { delete iSmsBuf; iSmsBuf = NULL; } iSmsBuf = aSms.AllocL(); // Allocate new HBufC object ChangeStateL(EUnfoldMessage); //Set to initial request aStatus = KRequestPending; iReport = &aStatus; } else { User::Leave(KErrNotSupported); } }
EXPORT_C void AknListBoxShortCuts::RunL() { TShortcutEvent event = EIdle; EndTimer(); ChangeStateL(event); DoProcedureL(); }
void CApConnectEngine::RunL() { TInt statusCode = iStatus.Int(); if (statusCode != KErrNone) { ChangeStateL(EApConnectStateNotConnected); } }
/* valid values for aValue are 0 and '0' <= aValue <= '9'. Application does not need to know this - they just pass the interger from one list to another. */ EXPORT_C void AknListBoxShortCutsImplementation::SetShortcutValueFromPrevList(TInt /*aValue*/) { #if 0 if (aValue == 0) return; __ASSERT_DEBUG(aValue>=int('0') && aValue<=int('9'), Panic(EAknPanicListboxShortcutInvalidValue)); iEvent.iCode = aValue; TRAP_IGNORE( ChangeStateL(ENumber) ); // THIS MAY LEAVE TRAP_IGNORE( DoProcedureL() ); // THIS MAY LEAVE #endif }
// // Create service or database entries // void CIacSettingsParser::ProcessL(TRequestStatus& aStatus) { iState = EProcessSms; iEntryId= iEntry.Entry().Id(); //store id of Bio Msg entry __ASSERT_DEBUG(iEntry.Entry().iMtm==KUidSmartMessageMtm, User::Panic(KIACP,EIacpInvalidEntry)); __ASSERT_DEBUG(iEntry.Entry().iBioType==KUidMsvBIOInternetAccessPointMessageType, User::Panic(KIACP,EIacpInvalidEntry)); __ASSERT_DEBUG(iEntry.Entry().Failed()== 0 , User::Panic(KIACP,EIacpInvalidEntry)); ChangeStateL(ESetParsersData); //Set to initial state aStatus = KRequestPending; iReport = &aStatus; }
void CIacSettingsParser::ParseL(TRequestStatus& aStatus,const TDesC& aSms) { __ASSERT_DEBUG (aSms.Length() > 0 ,User::Panic(KIACP, EIacpEmptyBuffer)); //make a local copy of sms if(iSmsBuf) { delete iSmsBuf; iSmsBuf=NULL; } iSmsBuf = aSms.AllocL(); iSms = iSmsBuf->Des(); //initialise Tlex ChangeStateL(EParseSms); //Set to initial request aStatus = KRequestPending; iReport = &aStatus; }
void CIacSettingsParser::RunL() { TInt eCode = iStatus.Int(); if(eCode==KErrNone) { switch(iState) { case EParseSms: ChangeStateL(ECheckData); return; case ECheckData: if(++iCurrentSettingsCtr < iParsedFieldCollections->Count()) { CheckMandatoryDataL(); SetActive(); RequestComplete(iStatus, KErrNone); return; } else { // Storing parsed data array as a new stream within the CMsvStore // associated with the Msg Entry StoreParsedDataL(); iSmsParsed=ETrue; } break; case ESetParsersData: ChangeStateL(EProcessSms); return; case EProcessSms: if(eCode == KErrNone) { if(++iCurrentSettingsCtr < iParsedFieldCollections->Count()) { // set connections preferences flag TSmsType currentType = (*iParsedFieldCollections)[iCurrentSettingsCtr-1]->MessageType(); if(currentType==EBasicIAP || currentType== EExtGprsSettings || currentType== EExtendedIAP) { if(iConnectionPreference==EIacpAttempCreateAsFirstRank) iConnectionPreference = EIacpAttempCreateAsSecondRank; else iConnectionPreference = EIacpDoNotCreatePreference; } // If IAP settings are found, store a ref to them if(currentType== EBasicIAP || currentType== EExtendedIAP) { iDefaultIAP = iIspParser->IapEntryId(); // If Mail settings have been found previously, associate mail with IAP if(iDefaultMail) { iMailParser->AssociateIAPWithMailL(iEntry,iDefaultIAP); } } // If Mail settings are found, set a flag if(currentType== EBasicMail || currentType== EExtendedMail) { iDefaultMail = 1; // If IAP settings have ben found previously, associate mail with IAP if(iDefaultIAP) { iMailParser->AssociateIAPWithMailL(iEntry,iDefaultIAP); } } SetParsersDataL(); iState = ESetParsersData; SetActive(); RequestComplete(iStatus,KErrNone); return; } else eCode = CompleteMessage(); } TSmsType currentType = (*iParsedFieldCollections)[iCurrentSettingsCtr-1]->MessageType(); // If IAP settings are found, store a ref to them if(currentType== EBasicIAP || currentType== EExtendedIAP) { iDefaultIAP = iIspParser->IapEntryId(); // If Mail settings have been found previously, associate mail with IAP if(iDefaultMail) { iMailParser->AssociateIAPWithMailL(iEntry,iDefaultIAP); } } // If Mail settings are found, set a flag if(currentType== EBasicMail || currentType== EExtendedMail) { iDefaultMail = 1; // If IAP settings have ben found previously, associate mail with IAP if(iDefaultIAP) { iMailParser->AssociateIAPWithMailL(iEntry,iDefaultIAP); } } break; } } User::RequestComplete(iReport,eCode); }
EXPORT_C void AknListBoxShortCuts::DoProcedureL() { switch (iState) { case EState1: DoActionL(EBeginning); StartTimerL(ENoUserActionTimeout); iIdleNextState = EState2; iNaviKeyNextState = EState3; iNumKeyNextState = EState4; break; case EState2: // No action during ENoUserActionTimeout DoActionL(EAssertNotFetched); DoActionL(EShowShortcutNumber); StartTimerL(EIndexDisplayTimeout); iIdleNextState = EState2HideOnly; iNaviKeyNextState = EState2HideAndGoState3; iNumKeyNextState = EState2HideAndGoState4; break; case EState2HideOnly: DoActionL(EAssertNotFetched); DoActionL(EHideShortcutNumber); break; case EState2HideAndGoState3: DoActionL(EHideShortcutNumber); // FALL THROUGH case EState3: // Navigation keys DoActionL(EAssertNotFetched); DoActionL(EStoreFocusedItemPos); DoActionL(EForwardKeyEventToListBox); if (DoTest(ENewItemFocused)) { // We're at state 1 again. StartTimerL(ENoUserActionTimeout); iIdleNextState = EState2; iNaviKeyNextState = EState3; iNumKeyNextState = EState4; } break; case EState2HideAndGoState4: DoActionL(EHideShortcutNumber); // FALL THROUGH case EState4: // Numeric keys DoActionL(EAssertNotFetched); DoActionL(EAddKeyAsShortcutDigitAndMoveFocus); if (DoTest(ECheckForValidIndexNumber)) { StartTimerL(EShortcutActiveTimeout); iIdleNextState = EState5; iNumKeyNextState = EState6; iNaviKeyNextState = EState3; } break; case EState5: // After EshortcutActiveTimeout, user did nothing DoActionL(ESelectListBoxItem); ChangeStateL(EStateToOne); break; case EState6: // pressed 0-9 during shortcutactivetimeout DoActionL(EAddKeyAsShortcutDigitAndMoveFocus); if (DoTest(ECheckForValidIndexNumber)) { StartTimerL(EShortcutActiveTimeout); iIdleNextState = EState5; iNumKeyNextState = EState6; iNaviKeyNextState = EState3; } else { DoActionL(ERemoveKeyDigitFromIndexNumber); DoActionL(EPassDigitToNextList); DoActionL(ESelectListBoxItem); ChangeStateL(EStateToOne); } break; default: break; }; }
void CPolicyImporter::RunL() { ChangeStateL(); }