void CMTPPbParamBase::ConstructL(const CMTPPbParamBase& aParam) { OstTraceFunctionEntry0( DUP3_CMTPPBPARAMBASE_CONSTRUCTL_ENTRY ); TMTPPbDataType type(aParam.Type()); __ASSERT_DEBUG((type > EMTPPbTypeNone && type < EMTPPbTypeEnd), Panic(EMTPPBArgumentErr)); __ASSERT_ALWAYS_OST((type > EMTPPbTypeNone && type < EMTPPbTypeEnd), OstTrace0( TRACE_ERROR, CMTPPBPARAMBASE_CONSTRUCTL, "Error argument" ), User::Leave(KErrArgument)); switch(type) { case EMTPPbSuidSet: { ConstructL(aParam.SuidSetL().Category(), aParam.SuidSetL().Suid()); } break; case EMTPPbInt32: { ConstructL(aParam.Int32L()); } break; case EMTPPbUint32: { ConstructL(aParam.Uint32L()); } break; default: LEAVEIFERROR(KErrArgument, OstTrace0( TRACE_ERROR, DUP1_CMTPPBPARAMBASE_CONSTRUCTL, "Error argument" )); break; } iParamType = type; OstTraceFunctionExit0( DUP3_CMTPPBPARAMBASE_CONSTRUCTL_EXIT ); }
bool RE_Class::ConstructL (const uni_char *source, unsigned &index, unsigned length, bool full, bool extended) { if (!full) { ConstructL (source[index + 1]); index += 2; return true; } else return ConstructL (0, source, index, length, extended); }
void CCFContextSubscriptionImpl::ConstructL( RReadStream& aStream ) { FUNC_LOG; ConstructL(); InternalizeL( aStream ); }
CClockTimerEvent::CClockTimerEvent(TInt aSecondsUntilCheckEvent) : CEvent(EEventIdentifierClockTimerEvent) { iFramesLeftUntilNextSecond = GFRAMES_PER_SECOND_BACKEND; iSecondsUntilChecking = aSecondsUntilCheckEvent; ConstructL(); }
void TEnvVar::ConstructL(const TText16*& aPtr) { TPtrC16 name(aPtr); aPtr+=name.Length()+1; ConstructL(name,(const wchar_t*)aPtr); aPtr+=iValue->Length()+1; }
// --------------------------------------------------------------------------- // ?description_if_needed // --------------------------------------------------------------------------- // void CXIMPTestFileTool::ConstructL( TInt aInstanceIdAsNum ) { TInt instanceLength = NumLenInChars( aInstanceIdAsNum ); HBufC* instance = HBufC::NewLC( instanceLength ); instance->Des().AppendFormat( KInstanceAsNumber, aInstanceIdAsNum ); ConstructL( *instance ); CleanupStack::PopAndDestroy( instance ); }
/** Executes a new search with the already created CTulAddressStringTokenizer instance. The position in the found items array is reset to the beginning of the array. @param aText will be parsed. @param aSearchCases identifies what items are we looking for: EFindItemSearchPhoneNumberBin EFindItemSearchMailAddressBin EFindItemSearchURLBin EFindItemSearchScheme Any combination of these flags can be given as a bit mask. @param aMinNumbers defines a minimum count of numbers in a phone number string, during a phone number search. @return number of found items. @panic ETulPanicInvalidTokenizerSearchCase in debug build if there is no valid search case. @panic ETulPanicDescriptorLength in debug build if item's position and/or length is out of the document's range. @leave KErrNone, if successful; otherwise one of the other system-wide error codes. */ EXPORT_C TInt CTulAddressStringTokenizer::DoNewSearchL(const TDesC& aText, TInt aSearchCases, TInt aMinNumbers) { delete iFoundItems; iFoundItems = NULL; iPosition = 0; ConstructL(aText, aSearchCases, aMinNumbers); return ItemCount(); }
myTimer::myTimer(TInt aPriority) : CTimer(aPriority) // // Constructor - Creates AND ADDS TO MYSCHEDULER // { ConstructL(); myScheduler::Add(this); }
/** * * Create a server session. * * @param "aServer" * The server to add this session to * * @xxxx * */ void CTestFrameworkServerSession::CreateL(const CMmfIpcServer& aServer) { CMmfIpcSession::CreateL(aServer); // does not leave //Add session to server first. If anything leaves, it will be removed by the destructor iServer = STATIC_CAST(CTestFrameworkServer*, (CONST_CAST(CMmfIpcServer*, &aServer))); iServer->AddSession(); ConstructL(); }
/** Perform source construction dependant on the source construction initialisation data aInitData. @param aInitData The TPckg<TMMFFileParams> descriptor package containing the file name and full path. */ void CFileMultimediaSource::ConstructL() { CFileSource* fileSource = static_cast<CFileSource*>(iParentDataSource); iInitData = (fileSource->GetInitData()).AllocL(); fileSource->SetMultimediaSource(*this); ConstructL(*iInitData, ESourceMode); iSinkQueue = new(ELeave) TSglQue<CSinkQueueItem>(_FOFF(CSinkQueueItem, iLink)); }
PhoneUiHouseHoldPrivate::PhoneUiHouseHoldPrivate(HbMainWindow &window) : iAppsReady (0), iStartupSignalRecoveryId (0), iLightIdleReached (EFalse), iPhoneUIController (0), m_window (window) { PHONE_DEBUG("phoneui - Start phoneapp"); TRAPD( error, ConstructL() ); qt_symbian_throwIfError(error); }
EXPORT_C void CTPointerCursor::ConstructL(TInt aCount, TSpriteCreateParams *aParams, TInt aFlags) { CFbsBitmap *bitmap=NULL; CFbsBitmap *mask=NULL; TRAPD(err,ConstructL(aCount, aParams, aFlags, bitmap, mask)); delete bitmap; delete mask; User::LeaveIfError(err); }
void CPeninputServerObserver::ReConstructL(TThreadId aId) { iSrvThreadId = aId; if(IsActive()) { Cancel(); } ConstructL(); }
/** This function opens a RMobileSmartCardEap sub-session from RMobilePhone that will refer to the application referenced by aAID. It will be assumed that the application exists and contains a DF_EAP for the aEapType specified. The client must call RMobileSmartCardEap::InitialiseEapMethod() to ensure correct functionality of this sub-session. @param aPhone The RMobilePhone sub-session relative to which this sub-session will open. @param aAId The UICC Application ID, which should be of one that has EAP support. @param aEapType The EAP method type that this sub-session will use under the aAID application. @return KErrNone if successful, otherwise a system-wide error code. @see RMobileSmartCardEap::InitialiseEapMethod() @capability None @publishedPartner @released */ EXPORT_C TInt RMobileSmartCardEap::Open(RMobilePhone& aPhone, const RMobilePhone::TAID& aAID, const TEapType& aEapType) { RSessionBase* session = &aPhone.SessionHandle(); __ASSERT_ALWAYS(session != NULL, PanicClient(EEtelPanicNullHandle)); TInt subSessionHandle = aPhone.SubSessionHandle(); __ASSERT_ALWAYS(subSessionHandle != NULL, PanicClient(EEtelPanicNullHandle)); TRAPD(ret, ConstructL()); if (ret != KErrNone) { Destruct(); return ret; } // Appending the application ID and Eap Type to the name of the // subsession; plus two one-byte delimeters indicating lengths. // See var appIdbuf for why KAIDSize is multiplied by 2. TBufC<SCEAP_SSN_LENGTH + RMobilePhone::KAIDSize*2 + KEapTypeSize + 2> nameBuf(KETelSmartCardEapSession); // 2 for delimeters TPtr name(nameBuf.Des()); // the length of the AID as a Sept ASCII character TChar lengthAIDChar = SeptChar(aAID.Length()); // the value of the AID // converted to a 16-bit string representation. Multiply by 2, // since each AID byte is represented as two sem-octects. TBufC<2*RMobilePhone::KAIDSize> appIdbuf; TPtr appIdPtr(appIdbuf.Des()); ConvertBinToText(aAID, appIdPtr); // the length of the EapType TInt lengthEapType = aEapType.Length(); TChar charEapType = SeptChar(lengthEapType); // the value of the EapType (converted to 16-bit) TBufC<KEapTypeSize> eapTypeBuf; TPtr eapTypePtr(eapTypeBuf.Des()); eapTypePtr.Copy(aEapType); // appending... name.Append(lengthAIDChar); name.Append(appIdPtr); name.Append(charEapType); name.Append(eapTypePtr); TIpcArgs args(&name, TIpcArgs::ENothing, subSessionHandle); SetSessionHandle(*session); ret = CreateSubSession(*session, EEtelOpenFromSubSession, args); if (ret != KErrNone) { Destruct(); } return ret; }
void CSigComp::ConstructL(TMemorySize aDecompressionMemSize, TCyclesPerBit aCyclesPerBit, TMemorySize aStateMemorySize, const TDesC8& aAlgorithm, const TSigCompStateItem& aStateItem, TBool aUploadState) { ConstructL(aDecompressionMemSize, aCyclesPerBit, aStateMemorySize, aUploadState); RFs rfs; User::LeaveIfError(rfs.Connect()); CleanupClosePushL(rfs); #if !defined(__WINS__) && !defined(__WINSCW__) TParsePtrC parser(RProcess().FileName()); User::LeaveIfError(rfs.SetSessionPath(parser.Drive())); #endif TInt stateLen = 0; RFile file; User::LeaveIfError(file.Open(rfs, aStateItem.iStateValue, EFileRead)); CleanupClosePushL(file); file.Size(stateLen); HBufC8* valueBuf = HBufC8::NewL(stateLen); TPtr8 valueBufDes = valueBuf->Des(); file.Read(valueBufDes, stateLen); CleanupStack::PopAndDestroy(2); // file, rfs CleanupStack::PushL(valueBuf); TStateItem* stateItem = iStateMgr->CreateStateL(NULL, (TInt16)stateLen, aStateItem.iStateAddress, aStateItem.iStateInstruction, aStateItem.iMinimumAccessLength, valueBuf->Ptr(), 0xffff); if (aStateItem.iStateIdentifier.Size() > 0) { if (aStateItem.iStateIdentifier.Compare(TPtrC8( stateItem->iStateIdentifier, 20))) { User::Leave(KErrNotFound); } } iCompressor = CSigCompCompressor::NewL(aAlgorithm, iStateMgr, stateItem, aStateItem.iStateLength, aUploadState); CleanupStack::PopAndDestroy(valueBuf); }
void CMTPTypeServiceEventElement::ConstructL(const TUint16 aEventCode,const TMTPTypeGuid& aEventGUID,const TDesC& aEventName) { ConstructL(); // Set mandatory construction values. SetUint16L(EEventCode, aEventCode); SetL(EEventGUID, aEventGUID); SetStringL(EEventName,aEventName); }
// ----------------------------------------------------------------------------- // CMceOutRefer::ConstructL // ----------------------------------------------------------------------------- // void CMceOutRefer::ConstructL( const TDesC8& aRecipient, const TDesC8& aReferTo, TType aType, const TDesC8& aOriginator ) { HBufC8* originator = aOriginator.AllocLC(); ConstructL( aRecipient, aReferTo, aType, originator ); CleanupStack::Pop( originator ); }
void CTestView::InitializeAsDefaultL() { AppUi().SetDefaultViewL(*this); if (!iControl) ConstructL(); iControl->ActivateL(); iControl->DrawNow(); }
void CMyTimer::Start() // // The timer has completed. // { TRAPD(r, ConstructL()); test(r==KErrNone); CActiveScheduler::Add(this); After(ETimeReq); }
void CTestView::DoActivateL(const TVwsViewId& /*aPrevViewUid*/,TUid aCustomMessageId,const TDesC16& /*aCustomMessage*/) { CleanupStack::PushL(TCleanupItem(CleanupDoActivate,this)); if (!iControl) ConstructL(); if(aCustomMessageId==KUidStartScheduler) { STATIC_CAST(CTestAppUi&,AppUi()).DisplayRichTextDialogL(); }
/** * doTestStep is called by the framework to execute a test step * It performs some initialisation steps common to all CSD.Agt tests * before calling the doCsdAgtTestStep() function overridden in * the derived class. * */ enum TVerdict CTestStepCsdAgt::doTestStepL( void ) { TInt processHandleCountBefore; TInt threadHandleCountBefore; TInt reqsBefore; TInt processHandleCountAfter; TInt threadHandleCountAfter; TInt reqsAfter; TBool bResult; reqsBefore= RThread().RequestCount(); RThread().HandleCount(processHandleCountBefore, threadHandleCountBefore); // Create an active scheduler on the heap before the test CActiveScheduler *activeScheduler = new(ELeave) CActiveScheduler; CleanupStack::PushL(activeScheduler); CActiveScheduler::Install(activeScheduler); if(!iDlgSvr) ConstructL(); __UHEAP_MARK; bResult = iDlgSvr->Open(); if (bResult == EFalse) { Log(_L("Cannot connect to Dialog Server")); return EFail; } iDlgSvr->RequestDialogAppearanceNotification(this); // Do the test iResult = doCsdAgtTestStepL(); iDlgSvr->Close(); DelayL(2000000); __UHEAP_MARKEND; // delete the active scheduler CleanupStack::PopAndDestroy(activeScheduler); reqsAfter= RThread().RequestCount(); RThread().HandleCount(processHandleCountAfter, threadHandleCountAfter); TESTL(reqsAfter == reqsBefore); TESTL(threadHandleCountAfter == threadHandleCountBefore); //TESTL(processHandleCountAfter == processHandleCountBefore); return iResult; }
EXPORT_C void CEikFloatingPointEditor::ConstructFromResourceL(TResourceReader& aReader) { TInt textLimit=aReader.ReadUint16(); TReal min=aReader.ReadReal64(); TReal max=aReader.ReadReal64(); TReal defaultValue=aReader.ReadReal64(); // does not work with queries !!! ConstructL(min,max,textLimit); // added to give a default value, to work with forms. Unsure if this is desirable. if ((min>defaultValue)||(defaultValue>max)) defaultValue=min; SetValueL(&defaultValue); }
void CActiveBackupClient::ConstructL(MActiveBackupDataClient* aClient) /** Construct this instance of CActiveBackupClient @param aClient Pointer to a concrete instance of MActiveBackupDataClient */ { ConstructL(); iABCallbackHandler = CActiveBackupCallbackHandler::NewL(aClient, *iClientSession); iABCallbackHandler->StartListeningForServerMessagesL(); }
// ----------------------------------------------------------------------------- // RMmCustomApiExt::Open // This method opens a RMmCustomApiExt subsession from RMobilePhone. // ----------------------------------------------------------------------------- // EXPORT_C TInt RMmCustomApiExt::Open( RMobilePhone& aPhone ) { TInt ret = RMmCustomAPI::Open( aPhone ); if ( KErrNone == ret ) { TRAP(ret, ConstructL()); } return ret; }
void CSigComp::ConstructL(TMemorySize aDecompressionMemSize, TCyclesPerBit aCyclesPerBit, TMemorySize aStateMemorySize, const TDesC8& aAlgorithm) { ConstructL(aDecompressionMemSize, aCyclesPerBit, aStateMemorySize, EFalse); iCompressor = CSigCompCompressor::NewL(aAlgorithm, iStateMgr); }
/** * @internalTechnology * Constructs bit string from ASN.1 encoding object. * @param aEncObj ASN.1 encoding object to wrap in bit string. * @note First produces raw DER encoding from the object, then creates * a bit string using other construct function. */ void CASN1EncBitString::ConstructL(const CASN1EncBase& aEncObj) { // produce raw DER encoding from the created ASN.1 encoding TUint len = aEncObj.LengthDER(); HBufC8* intDer = HBufC8::NewMaxLC(len); TPtr8 ptrDer = intDer->Des(); TUint pos = 0; aEncObj.WriteDERL(ptrDer, pos); // wrap the produced DER encoding into a bit string ConstructL(*intDer); // cleanup CleanupStack::PopAndDestroy(intDer); }
TInt CAudioDecoderThread::Construct() { // create cleanup stack iCleanupStack = CTrapCleanup::New(); if( iCleanupStack == NULL ) { return KErrNoMemory; } TInt err = KErrNone; TRAP( err, ConstructL() ); return err; }
void RE_Class::ConstructL (int predefined) { uni_char source[4]; source[0] = '\\'; source[1] = predefined; source[2] = ']'; unsigned index = 0; ConstructL (0, source, index, 3, false); }
// --------------------------------------------------------- // RLbtServer::Connect // // (other items were commented in a header). // --------------------------------------------------------- // EXPORT_C TInt RLbtServer::Connect() { __ASSERT_ALWAYS(Handle() == 0, User::Panic(KLbtClientPanicCategory, ELbtServerHandleNotClosed)); TRAPD(ret, ConstructL()); if (ret == KErrNone) { ret = CreateSession(KLbtServerCoreName, Version(), KDefaultMessageSlots); if( ret == KErrNotFound ) { RProcess lbtServer; ret = lbtServer.Create(KServerCoreProcessName, KNullDesC); if( ret != KErrNone ) { lbtServer.Close(); return ret; } TRequestStatus status; lbtServer.Rendezvous(status); if( status != KRequestPending ) { User::WaitForRequest(status); lbtServer.Kill(KErrNone); lbtServer.Close(); return KErrNotFound; } else { lbtServer.Resume(); } User::WaitForRequest(status); lbtServer.Close(); ret = status.Int(); if( !( ret == KErrNone || ret == KErrAlreadyExists ) ) { return ret; } ret = CreateSession(KLbtServerCoreName, Version(), KDefaultMessageSlots); } } return ret; }
/* * Starts the timer countdown */ bool SymbianTileMapTimer::startTimer(uint32 aPeriod) { TRAPD(errCode, ConstructL()); if(errCode != KErrNone) { return(false); } else { /* add the timer to the active scheduler for processing */ CActiveScheduler::Add(this); /* multiply by 1000 to get microsecond count */ After(aPeriod * 1000); } return(true); }