sl@0: // Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies). sl@0: // All rights reserved. sl@0: // This component and the accompanying materials are made available sl@0: // under the terms of "Eclipse Public License v1.0" sl@0: // which accompanies this distribution, and is available sl@0: // at the URL "http://www.eclipse.org/legal/epl-v10.html". sl@0: // sl@0: // Initial Contributors: sl@0: // Nokia Corporation - initial contribution. sl@0: // sl@0: // Contributors: sl@0: // sl@0: // Description: sl@0: // sl@0: sl@0: #ifndef REGISTEREDSURFACEMAP_H sl@0: #define REGISTEREDSURFACEMAP_H sl@0: sl@0: #include <e32base.h> sl@0: #include <graphics/surface.h> sl@0: sl@0: class CWindowElementSet; sl@0: class CWsClient; sl@0: class TSessionSurfaces; sl@0: class MWsScene; sl@0: sl@0: class CRegisteredSurfaceMap : public CBase sl@0: { sl@0: public: sl@0: ~CRegisteredSurfaceMap(); sl@0: CRegisteredSurfaceMap(MWsScene& aScene); sl@0: TInt Add(const CWsClient& aClient, const TSurfaceId& aSurfaceId); sl@0: TInt Remove(CWsClient& aClient, const TSurfaceId& aSurfaceId); sl@0: TInt RemoveAll(CWsClient& aClient); sl@0: private: sl@0: static TInt CompareDeviceSurfaces (const TSessionSurfaces& aLeft, const TSessionSurfaces& aRight); sl@0: private: sl@0: RArray<TSessionSurfaces> iSessionSurfaces; sl@0: MWsScene& iScene; sl@0: }; sl@0: sl@0: class TSessionSurfaces sl@0: { sl@0: private: sl@0: static TInt CompareIds (const TSurfaceId& aLeft, const TSurfaceId& aRight); sl@0: public: sl@0: TSessionSurfaces(const CWsClient& aSession); sl@0: inline const CWsClient& Session() const {return iSession;} sl@0: TInt AddSurfaceId(const TSurfaceId& aSurfaceId, MWsScene& aScene); sl@0: TInt RemoveSurfaceId(const TSurfaceId& aSurfaceId, MWsScene& aScene); sl@0: TInt RemoveAll(MWsScene& aScene); sl@0: private: sl@0: const CWsClient& iSession; sl@0: public: sl@0: RArray<TSurfaceId> iSurfaces; sl@0: }; sl@0: sl@0: #endif // REGISTEREDSURFACEMAP_H