os/mm/devsound/sounddevbt/src/SoundDevice/BtDevSoundUtility.h
author sl@SLION-WIN7.fritz.box
Fri, 15 Jun 2012 03:10:57 +0200
changeset 0 bde4ae8d615e
permissions -rw-r--r--
First public contribution.
     1 // Copyright (c) 2001-2009 Nokia Corporation and/or its subsidiary(-ies).
     2 // All rights reserved.
     3 // This component and the accompanying materials are made available
     4 // under the terms of "Eclipse Public License v1.0"
     5 // which accompanies this distribution, and is available
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
     7 //
     8 // Initial Contributors:
     9 // Nokia Corporation - initial contribution.
    10 //
    11 // Contributors:
    12 //
    13 // Description:
    14 // File:		BtDevSoundUtility.h
    15 // Author:		Vasudevan Ramachandraiah
    16 // Date:		July 16, 2002
    17 // Class that provides API to list ECOM plugin implementation IDs
    18 // (c) Nokia Inc.
    19 // Revisions:
    20 // Date:			Author			Description
    21 // 
    22 //
    23 
    24 #ifndef __MMFBTDEVSOUNDUTILITY_H
    25 #define __MMFDEVSOUNDUTILITY_H
    26 
    27 #include <ecom/ecom.h>
    28 #include <badesca.h>
    29 
    30 #include <mmf/common/mmfutilities.h> // For TFourCC
    31 
    32 #define KFourCCLength 4
    33 
    34 class TMMFRawPackage
    35 /**
    36 *@internalTechnology
    37 */
    38 	{
    39 public:
    40 	inline TPtr8& Package();
    41 	inline const TPtr8& Package() const;
    42 protected:
    43 	TMMFRawPackage(TInt aDerivedSize);
    44 	inline void SetSize(TInt aDerivedSize);
    45 protected:
    46 	TPtr8 iThis;
    47 	};
    48 
    49 
    50 class TMMFToneFixedSequenceNames : public TMMFRawPackage
    51 /**
    52 *@internalTechnology
    53 */
    54 	{
    55 public:
    56 	inline TMMFToneFixedSequenceNames();
    57 public:
    58 	TInt iCount;
    59 	};
    60 
    61 
    62 class HMMFToneFixedSequenceNames : public TMMFToneFixedSequenceNames
    63 /**
    64 *@internalTechnology
    65 */
    66 	{
    67 public:
    68 	HMMFToneFixedSequenceNames();
    69 	HMMFToneFixedSequenceNames* AddNameL(const TDesC& aName);
    70 	};
    71 
    72 
    73 class CMMFDevSoundUtility : public CBase
    74 /**
    75 *internalTechnology
    76 */
    77 	{
    78 public:
    79 	// Destructor
    80 	~CMMFDevSoundUtility();
    81 	static CMMFDevSoundUtility* NewL();
    82 	static CMMFDevSoundUtility* NewLC();
    83 
    84 	void SeekUsingFourCCL(TUid aInterfaceUid, RImplInfoPtrArray& aPlugInArray, const TFourCC& aSrcDataType, const TFourCC& aDstDataType, const TDesC& aPreferredSupplier);
    85 	void SelectByPreference(RImplInfoPtrArray& aPlugInArray, const TDesC& aPreferredSupplier);
    86 	void SeekHwDevicePluginsL(RArray<TFourCC>& aSupportedDataTypes, TMMFState aState);
    87 
    88 	void InitializeFixedSequenceL(CPtrC8Array** aFixedSequences);
    89 	TBool RecognizeSequence(const TDesC8& aData);
    90 	const TDesC& FixedSequenceName(TInt aSequenceNumber);
    91 
    92 private:
    93 	CMMFDevSoundUtility();
    94 	void ConstructL();
    95 	TBool IsDataTypeMatch(CImplementationInformation* hwDeviceResourceEntry,const TDesC8& fourCCPtrPCM16, TMMFState aState);
    96 
    97 private:
    98 	HMMFToneFixedSequenceNames* iFixedSequenceNames;
    99 	HBufC8* iInfo;
   100 	} ;
   101 
   102 #endif // __MMFBTDEVSOUNDUTILITY_H