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: #ifndef __A2DPBTHEADSETAUDIOIFCLIENT_H__ sl@0: #define __A2DPBTHEADSETAUDIOIFCLIENT_H__ sl@0: sl@0: #include <e32base.h> sl@0: #include <e32std.h> sl@0: #include <mmf/server/sounddevice.h> sl@0: #include <bttypes.h> sl@0: sl@0: // Forward declarations. sl@0: class TFourCC; sl@0: class TRange; sl@0: sl@0: /** sl@0: *@internalTechnology sl@0: */ sl@0: class RA2dpBTHeadsetAudioInterface : public RMmfSessionBase sl@0: { sl@0: public: sl@0: IMPORT_C RA2dpBTHeadsetAudioInterface(); sl@0: IMPORT_C TInt Connect(); // Connect to the server sl@0: IMPORT_C void Close(); sl@0: sl@0: IMPORT_C void Initialize(const TBTDevAddr& aRemoteAddress, TRequestStatus& aStatus); sl@0: IMPORT_C void CancelInitialize(); sl@0: IMPORT_C void GetSupportedDataTypesL(RArray<TFourCC>& aSupportedDataTypes) const; sl@0: IMPORT_C void GetSupportedSampleRatesL(RArray<TUint>& aSupportedDiscreteRates, RArray<TRange>& aSupportedRateRanges) const; sl@0: IMPORT_C void GetSupportedChannelsL(RArray<TUint>& aSupportedChannels, TMMFStereoSupport& aStereoSupport) const; sl@0: IMPORT_C TInt SetDataType(const TFourCC& aDataType); sl@0: IMPORT_C TInt SetSampleRate(TUint aSampleRate); sl@0: IMPORT_C TInt SetChannels(TUint aChannels, TMMFStereoSupport aStereoSupport); sl@0: IMPORT_C void OpenDevice(TRequestStatus& aStatus); sl@0: IMPORT_C void CancelOpenDevice(); sl@0: IMPORT_C void CloseDevice(TRequestStatus& aStatus); sl@0: IMPORT_C TUint Volume() const; sl@0: IMPORT_C TInt SetVolume(TUint aVolume); sl@0: IMPORT_C void PlayData(const TDesC8& aData, TRequestStatus& aStatus); sl@0: IMPORT_C void CancelPlayData(); sl@0: IMPORT_C void FlushBuffer(); sl@0: IMPORT_C TUint BytesPlayed() const; sl@0: IMPORT_C void ResetBytesPlayed(); sl@0: IMPORT_C void PauseBuffer(); sl@0: IMPORT_C void ResumePlaying(); sl@0: IMPORT_C void NotifyError(TRequestStatus& aStatus); sl@0: IMPORT_C void CancelNotifyError(); sl@0: private: sl@0: HBufC* iBufAddr; sl@0: TPckgBuf<TBTDevAddr>* iPckgBuf; sl@0: }; sl@0: sl@0: sl@0: #endif