void CJuikIconManagerImpl::SetIconsL(TInt aProviderId, CArrayPtr<CGulIcon>& aIcons) { CALLSTACKITEM_N(_CL("CJuikIconManagerImpl"), _CL("SetIconsL")); // FIXME: this can be optimized by inlining addiconl functionality for ( TInt i=0; i < aIcons.Count(); i++ ) { CGulIcon* icon = aIcons[i]; aIcons[i] = NULL; AddIconL( aProviderId, icon ); } }
/* ----------------------------------------------------------------------------- ----------------------------------------------------------------------------- */ CDesCArray* CMainContainer::GetProfilesArrayL(CArrayPtr<CGulIcon>* aIcon,const TSize& aIconsize) { aIcon->AppendL(GetMyOwnIconL(aIconsize)); TFindFile MyIconFile(CCoeEnv::Static()->FsSession()); if(KErrNone == MyIconFile.FindByDir(KtxIconFileName, KNullDesC)) { AddIconL(aIcon,aIconsize,MyIconFile.File(),0,1); } else { aIcon->AppendL(GetMyOwnIconL(aIconsize)); } CDesCArrayFlat* MyArray = new(ELeave)CDesCArrayFlat(1); CleanupStack::PushL(MyArray); TFileName AddBuffer; if(iEcomHandler) { RPointerArray<CHandlerItem> Handlers = iEcomHandler->HandlerArray(); for(TInt i=0; i < Handlers.Count(); i++) { if(Handlers[i]) { TInt IconNum(0); if(Handlers[i]->iIconfile) { TFindFile IconFile(CCoeEnv::Static()->FsSession()); if(KErrNone == IconFile.FindByDir(*Handlers[i]->iIconfile, KNullDesC)) { TInt Img(0),ImgMask(1); if(Handlers[i]->iServerName) { if(IsServerOn(*Handlers[i]->iServerName)) { Img = 2; ImgMask = 3; } } AddIconL(aIcon,aIconsize,IconFile.File(),Img,ImgMask); IconNum = (aIcon->Count() - 1); } } AddBuffer.Num(IconNum); AddBuffer.Append(_L("\t")); if(Handlers[i]->iName) { AddBuffer.Append(*Handlers[i]->iName); } MyArray->AppendL(AddBuffer); } } } CleanupStack::Pop(MyArray); return MyArray; }