diff -r b99b84bcd2d1 -r 9b022b1f357c tstaskmonitor/server/inc/tsdatalist.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tstaskmonitor/server/inc/tsdatalist.h Tue Jul 06 14:37:10 2010 +0300 @@ -0,0 +1,115 @@ +/* +* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: Non-closeable app list class + * +*/ + + +#ifndef TSDATALIST_H +#define TSDATALIST_H + +#include +#include +#include "tsentry.h" +#include "tsdatastorage.h" +#include "tsdataobserver.h" + +class CApaWindowGroupName; +class CFbsBitmap; + +NONSHARABLE_CLASS( CTsDataList ) : public CTsWindowGroupsObserver, + public MTsDataStorage + { +public: + static CTsDataList* NewL(MTsResourceManager& resources, + MTsWindowGroupsMonitor &monitor, + MHsDataObserver& observer); + + ~CTsDataList(); + +private: + CTsDataList(MTsResourceManager& resources, + MTsWindowGroupsMonitor &monitor, + MHsDataObserver& observer); + + void ConstructL(); + +public: + const RTsFswArray& Data() const; + + void HandleWindowGroupChanged(MTsResourceManager &, + const TArray &); + + TBool IsHiddenUid( TUid uid ); + + void UpdateL(TInt key,const CFbsBitmap& data, TInt param, TInt priority); + + void UpdateL(TInt key, const Visibility& data, TInt param); + + void RemoveL(TInt key, TInt param); + +private: + void CollectAppsL(RTsFswArray& appsList, + const TArray &wgList); + + void AddEntryL(const TTsEntryKey& key, + const TUid& appUid, + CApaWindowGroupName* wgName, + RTsFswArray& newList ); + + TBool ConsiderOldDataL( const TTsEntryKey& key ); + + HBufC* FindAppNameLC(CApaWindowGroupName* windowName, + const TUid& appUid, + TInt wgId ); + + void FitDataToList( RTsFswArray& listToFit); + + TBool CheckIfExists(const CTsEntry& entry, + const RTsFswArray& newList) const; + + void GetAppIconL(const TUid& appUid, + CFbsBitmap*& bitmapArg, + CFbsBitmap*& maskArg); + + TInt FindEntry(const RTsFswArray& list, const TTsEntryKey& key ) const; + + TBool EstablishOrder(const RArray& keyList); + + TBool VerifyApplicationL(TUid); + + TTsEntryKey GenerateKeyL(TInt); + + void CompressLookupTable(RArray &array); + + void UpdateLookupTableL(RArray &array, TInt offset); + +private: + /** + * Resource manager. Not own + */ + MTsResourceManager& mResources; + + MHsDataObserver &mObserver; + + RTsFswArray mData; // current fsw content, i.e. the task list + + // list of hidden uids + RArray mHiddenUids; + + // list of allowed uids + RArray mAllowedUids; + }; + +#endif //TSDATALIST_H