sl@0: /*
sl@0: * Copyright (c) 2005-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: 
sl@0: 
sl@0: #if (!defined __T_MM_UTIL_H__)
sl@0: #define __T_MM_UTIL_H__
sl@0: 
sl@0: #include <mmf/common/mmfutilities.h>
sl@0: #include <mda/common/audio.h>
sl@0: #include <imageconversion.h>
sl@0: #include <datawrapper.h>
sl@0: #include <mmf/common/mmfvideo.h>
sl@0: #include <mmf/common/mmfcontrollerpluginresolver.h>
sl@0: #include <midiclientutility.h>
sl@0: 
sl@0: class CT_MMUtil
sl@0: 	{
sl@0: public:
sl@0: 	static TBool		ReadMdaPriority(CDataWrapper& aDataWrapper, const TDesC& aSection, TInt& aPriority);
sl@0: 	static TBool		ReadMdaPriorityPreference(CDataWrapper& aDataWrapper, const TDesC& aSection, TMdaPriorityPreference& aPreference);
sl@0: 	static TBool		ReadThreadPriority(CDataWrapper& aDataWrapper, const TDesC& aSection, TThreadPriority& aPriority);
sl@0: 	static TBool		ReadFourCC(CDataWrapper& aDataWrapper, const TDesC& aSection, TFourCC& aFourCC);
sl@0: 	static TBool		ReadImageType(CDataWrapper& aDataWrapper, const TDesC& aSection, CImageDecoder::TImageType& aImageType);
sl@0: 	static TBool		ReadIntent(CDataWrapper& aDataWrapper, const TDesC& aSection, ContentAccess::TIntent& aIntent);
sl@0: 	static TBool		ReadMidiState(CDataWrapper& aDataWrapper, const TDesC& aSection, const TDesC& aKeyName, TMidiState& aState);
sl@0: 	static TBool		ConvertToAudioCaps(const TDesC& aDesc, TMdaAudioDataSettings::TAudioCaps& aAudioCaps);
sl@0: 	static TBool		ConvertToAudioFlags(const TDesC& aDesc, TMdaAudioDataSettings::TAudioFlags& aAudioFlags);
sl@0: 	static TBool		ConvertToOption(const TDesC& aDesc, CImageDecoder::TOptions& aOption);
sl@0: 	static TBool		ConvertToOption(const TDesC& aDesc, CImageEncoder::TOptions& aOption);
sl@0: 	static TBool		ConvertToAgentProperty(const TDesC& aDesc, ContentAccess::TAgentProperty& aAgentProperty);
sl@0: 	static const TDesC&	GetFourCCString(TUint32 aValue);
sl@0: 	static TBool		ReadAudioDataSettings(CDataWrapper& aDataWrapper, TMdaAudioDataSettings& aSettings, const TDesC& aSection);
sl@0: 	static TBool		ConvertToDisplayMode(const TDesC& aDisplayModeStr, TDisplayMode& aDisplayMode);
sl@0: 	static TBool		ConvertToVideoRotation(const TDesC& aVideoRotationStr, TVideoRotation& aVideoRotation);
sl@0: 	static const TDesC&	GetVideoRotationString(TVideoRotation& aVideoRotation);
sl@0: 	static void			VerifyMIMETypeArrayL(CDataWrapper& aDataWrapper, const TDesC& aSection, const RFileExtensionMIMETypeArray& aFileExtensionArray);
sl@0: 	static void			GetControllerAndFormatUidL(CDataWrapper& aDataWrapper, const TDesC& aFileName, TUid aMediaId, TBool aRecord, TUid& aControllerUid, TUid& aFormatUid);
sl@0: 	static void			LogL(CDataWrapper& aDataWrapper, const CMMFControllerImplementationInformation& aControllerInfo);
sl@0: 
sl@0: private:
sl@0: 	static void			LogL(CDataWrapper& aDataWrapper, const CMMFFormatImplementationInformation& aFormatInfo);
sl@0: 	};
sl@0: 
sl@0: #endif /* __T_MM_UTIL_H__ */