os/mm/devsound/a3fdevsound/inc/a3ffourcclookup.h
changeset 0 bde4ae8d615e
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/os/mm/devsound/a3fdevsound/inc/a3ffourcclookup.h	Fri Jun 15 03:10:57 2012 +0200
     1.3 @@ -0,0 +1,98 @@
     1.4 +//a3ffourcclookup.h
     1.5 +
     1.6 +// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
     1.7 +// All rights reserved.
     1.8 +// This component and the accompanying materials are made available
     1.9 +// under the terms of "Eclipse Public License v1.0"
    1.10 +// which accompanies this distribution, and is available
    1.11 +// at the URL "http://www.eclipse.org/legal/epl-v10.html".
    1.12 +//
    1.13 +// Initial Contributors:
    1.14 +// Nokia Corporation - initial contribution.
    1.15 +//
    1.16 +// Contributors:
    1.17 +//
    1.18 +// Description:
    1.19 +//
    1.20 +
    1.21 +/**
    1.22 + @file
    1.23 + @internalTechnology 
    1.24 +*/
    1.25 +
    1.26 + 
    1.27 +#ifndef A3FFOURCCLOOKUP_H
    1.28 +#define A3FFOURCCLOOKUP_H
    1.29 +
    1.30 +//INCLUDES
    1.31 +#include <ecom/ecom.h>
    1.32 +#include <mmf/common/mmfutilities.h>
    1.33 +#include <e32hashtab.h> 
    1.34 +#include <a3f/a3fbase.h>
    1.35 +
    1.36 +//CLASS DECLARATION
    1.37 +/*
    1.38 +CFourCCConvertor class
    1.39 +This is a class used to load the format Uids and fourCC codes in to Cache Table.
    1.40 +This class is used for resolution of the fourCC code corresponding to format UID and vice-versa.
    1.41 +*/ 
    1.42 +class CFourCCConvertor : public CBase
    1.43 +	{
    1.44 +public: 
    1.45 +	/*
    1.46 +	Create a Single instance of a class.If the instance is already created, It
    1.47 +	returns that instance.
    1.48 +	*/
    1.49 +	IMPORT_C static CFourCCConvertor* NewL();
    1.50 +	
    1.51 +	/*
    1.52 +	This method is used to find fourCC code corresponding to format Uid from cache table.
    1.53 +	@param TUid aFormat a unique format Uid.
    1.54 +	@param TFourCC &aFourCC The unique FourCC code.
    1.55 +	@return an error code. KErrNone if successful, otherwise one of the system wide error codes.
    1.56 +	*/
    1.57 +	IMPORT_C TInt FormatToFourCC(TUid aFormat,TFourCC &aFourCC);
    1.58 +
    1.59 +	/*
    1.60 +	This method is used to find format Uid corresponding to fourCC Code from cache table.
    1.61 +	@param TFourCC &aFourCC The unique FourCC code.
    1.62 +	@param TUid aFormat a unique format Uid.
    1.63 +	@return an error code. KErrNone if successful, otherwise one of the system wide error codes.
    1.64 +	*/
    1.65 +	IMPORT_C TInt FourCCToFormat(TFourCC aFourCC, TUid &aFormat) const;
    1.66 +
    1.67 +	/*
    1.68 + 	Destructor    
    1.69 +	*/
    1.70 +	virtual ~CFourCCConvertor();
    1.71 +
    1.72 +private:
    1.73 +	/*
    1.74 +	Constructor
    1.75 +	*/
    1.76 +	CFourCCConvertor();
    1.77 +
    1.78 +	/*
    1.79 +	Second Phase Constructor
    1.80 +	*/
    1.81 +	void ConstructL();
    1.82 +
    1.83 +	/*
    1.84 +	This method is used to initialize the cache tables. This method uses two cache
    1.85 +	tables. It Stores Format Uids corresponding to fourCC Codes in one cache table
    1.86 +	and fourCC codes corresponding to Format Uids in another cache table. In the First 
    1.87 +	cache table,it uses format Uid as key and in the second cache table, it uses fourCC code as key. 
    1.88 +	*/
    1.89 +	void LoadL();
    1.90 +
    1.91 +    // DATA DECLARATION
    1.92 +
    1.93 +	/* Cache Table that stores FourCC codes corresponding to Format Uids */
    1.94 +	RHashMap<TUint32,TUint32> *iHashFourCCToFormat;
    1.95 +	
    1.96 +	/* Cache Table that stores format Uids corresponding to FourCC codes */
    1.97 +	RHashMap<TUint32,TUint32> *iHashFormatToFourCC;
    1.98 +
    1.99 +	};
   1.100 +
   1.101 +#endif // A3FFOURCCLOOKUP_H