void CMFPreviewHandlerBase::ReadActiveProfileL() { iActiveProfileRead = EFalse; MProfileEngine* profileEngine = CreateProfileEngineL(); CleanupReleasePushL( *profileEngine ); MProfile* activeProfile = profileEngine->ActiveProfileL(); CleanupReleasePushL( *activeProfile ); const MProfileTones& profileTones = activeProfile->ProfileTones(); const TProfileToneSettings& toneSettings = profileTones.ToneSettings(); iActiveProfileVibra = toneSettings.iVibratingAlert; iActiveProfileRingingVolume = toneSettings.iRingingVolume; iActiveProfileRingingType = toneSettings.iRingingType; const MProfileExtraSettings& extra = activeProfile->ProfileExtraSettings(); const MProfile3DToneSettings& threeD = extra.Profile3DToneSettings(); iActiveProfile3DEffect = threeD.Effect(); iActiveProfile3DEcho = threeD.Echo(); CleanupStack::PopAndDestroy( activeProfile ); CleanupStack::PopAndDestroy( profileEngine ); iActiveProfileRead = ETrue; }
void T_MProfilesNamesArray::SetupL() { iFs.Connect(); iProfileEngine = CreateProfileEngineL(); iProfilesNames = iProfileEngine->ProfilesNamesArrayLC(); CleanupStack::Pop(); }
void T_MProfile::SetupL() { iActiveId = 0; iProfileEngine = CreateProfileEngineL(); iProfileEngine->SetActiveProfileL( iActiveId ); iProfile = iProfileEngine->ActiveProfileL(); }
void CSensor_profile::ConstructL() { // xxx use the RFs* variant instead, as soon as other sensors need a handle iProfileEngine = CreateProfileEngineL(); }
void T_MProfileExtraSettings::SetupL() { iProfileEngine = CreateProfileEngineL(); iProfile = iProfileEngine->ActiveProfileL(); }
void CMyServer::ConstructL() { #ifdef __DEBUG __LOGSTR("Construct"); #endif CActiveScheduler::Add(this); iWs = RWsSession(); iFs.Connect(); ReadConf(); #ifdef __DEBUG __LOGSTR("ReadConfComplete"); #endif iWs.Connect(iFs); iTaskList = new(ELeave) TApaTaskList(iWs); iScreen = new(ELeave) CWsScreenDevice(iWs); CleanupStack::PushL(iScreen); iScreen->Construct(); CleanupStack::Pop(iScreen); iEngine = CreateProfileEngineL(); iOldName = iEngine->ActiveProfileL()->ProfileName().Name(); //__LOGSTR1("name:%S",&iEngine->ActiveProfileL()->ProfileName().Name()); // get font name TTypefaceSupport iTypefaceSupport; TBuf<KMaxTypefaceNameLength> fontName; fontName.FillZ(KMaxTypefaceNameLength); iScreen->TypefaceSupport(iTypefaceSupport, 0); fontName = iTypefaceSupport.iTypeface.iName; // get font TFontSpec FontSpec(fontName, 10*iConfig.iHeight); FontSpec.iTypeface.SetIsProportional(ETrue); iScreen->GetNearestFontInTwips(iFont,FontSpec); iIsVisible=EFalse; //calculate size // TBuf<150> temp; //temp.Fill('P',150); iSize=TSize(iFont->TextWidthInPixels(iOldName),iFont->HeightInPixels()*2+3); //__LOGSTR2("iFont->TextWidthInPixels(temp):%d,iFont->HeightInPixels()*2+3:%d",iFont->TextWidthInPixels(temp),iFont->HeightInPixels()*2+3); iPos=TPoint(iConfig.iX,iConfig.iY); // create image and it's mask iBitmap=new(ELeave) CFbsBitmap(); iMask=new (ELeave) CFbsBitmap(); iBitmap->Create(iSize,EColor16M); iMask->Create(iSize,EColor16M); CFbsBitmapDevice* BitDevice=CFbsBitmapDevice::NewL(iBitmap); CFbsBitmapDevice* MaskDevice=CFbsBitmapDevice::NewL(iMask); BitDevice->CreateContext(iBitGc); MaskDevice->CreateContext(iMaskGc); iBitGc->UseFont(iFont); iMaskGc->UseFont(iFont); //create window group with high priority (always at front) iWg=new (ELeave) RWindowGroup(iWs); iWg->Construct(reinterpret_cast<TUint32>(&iWg)); iWg->EnableReceiptOfFocus(EFalse); iWg->SetOrdinalPosition(0, ECoeWinPriorityAlwaysAtFront); //create sprite iSprite= new (ELeave) RWsSprite(iWs); iSprite->Construct(*iWg,iPos,0); iMember.iBitmap=NULL; // no image iMember.iMaskBitmap=NULL; iMember.iOffset=TPoint(0,0); iMember.iInterval=TTimeIntervalMicroSeconds32(0); iMember.iInvertMask=ETrue; // black - not transparadent, white - transparadent iSprite->AppendMember(iMember); iSprite->SetPosition(iPos); iSprite->Activate(); iWs.Flush(); Draw(iOldName); Hide(); }