sl@0: //a3ffourcclookup.h sl@0: 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: /** sl@0: @file sl@0: @internalTechnology sl@0: */ sl@0: sl@0: sl@0: #ifndef A3FFOURCCLOOKUP_H sl@0: #define A3FFOURCCLOOKUP_H sl@0: sl@0: //INCLUDES sl@0: #include sl@0: #include sl@0: #include sl@0: #include sl@0: sl@0: //CLASS DECLARATION sl@0: /* sl@0: CFourCCConvertor class sl@0: This is a class used to load the format Uids and fourCC codes in to Cache Table. sl@0: This class is used for resolution of the fourCC code corresponding to format UID and vice-versa. sl@0: */ sl@0: class CFourCCConvertor : public CBase sl@0: { sl@0: public: sl@0: /* sl@0: Create a Single instance of a class.If the instance is already created, It sl@0: returns that instance. sl@0: */ sl@0: IMPORT_C static CFourCCConvertor* NewL(); sl@0: sl@0: /* sl@0: This method is used to find fourCC code corresponding to format Uid from cache table. sl@0: @param TUid aFormat a unique format Uid. sl@0: @param TFourCC &aFourCC The unique FourCC code. sl@0: @return an error code. KErrNone if successful, otherwise one of the system wide error codes. sl@0: */ sl@0: IMPORT_C TInt FormatToFourCC(TUid aFormat,TFourCC &aFourCC); sl@0: sl@0: /* sl@0: This method is used to find format Uid corresponding to fourCC Code from cache table. sl@0: @param TFourCC &aFourCC The unique FourCC code. sl@0: @param TUid aFormat a unique format Uid. sl@0: @return an error code. KErrNone if successful, otherwise one of the system wide error codes. sl@0: */ sl@0: IMPORT_C TInt FourCCToFormat(TFourCC aFourCC, TUid &aFormat) const; sl@0: sl@0: /* sl@0: Destructor sl@0: */ sl@0: virtual ~CFourCCConvertor(); sl@0: sl@0: private: sl@0: /* sl@0: Constructor sl@0: */ sl@0: CFourCCConvertor(); sl@0: sl@0: /* sl@0: Second Phase Constructor sl@0: */ sl@0: void ConstructL(); sl@0: sl@0: /* sl@0: This method is used to initialize the cache tables. This method uses two cache sl@0: tables. It Stores Format Uids corresponding to fourCC Codes in one cache table sl@0: and fourCC codes corresponding to Format Uids in another cache table. In the First sl@0: cache table,it uses format Uid as key and in the second cache table, it uses fourCC code as key. sl@0: */ sl@0: void LoadL(); sl@0: sl@0: // DATA DECLARATION sl@0: sl@0: /* Cache Table that stores FourCC codes corresponding to Format Uids */ sl@0: RHashMap *iHashFourCCToFormat; sl@0: sl@0: /* Cache Table that stores format Uids corresponding to FourCC codes */ sl@0: RHashMap *iHashFormatToFourCC; sl@0: sl@0: }; sl@0: sl@0: #endif // A3FFOURCCLOOKUP_H