|
1 // Copyright (c) 2005-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 // |
|
15 |
|
16 #ifndef __A2DPBTHEADSETAUDIOIFCLIENT_H__ |
|
17 #define __A2DPBTHEADSETAUDIOIFCLIENT_H__ |
|
18 |
|
19 #include <e32base.h> |
|
20 #include <e32std.h> |
|
21 #include <mmf/server/sounddevice.h> |
|
22 #include <bttypes.h> |
|
23 |
|
24 // Forward declarations. |
|
25 class TFourCC; |
|
26 class TRange; |
|
27 |
|
28 /** |
|
29 *@internalTechnology |
|
30 */ |
|
31 class RA2dpBTHeadsetAudioInterface : public RMmfSessionBase |
|
32 { |
|
33 public: |
|
34 IMPORT_C RA2dpBTHeadsetAudioInterface(); |
|
35 IMPORT_C TInt Connect(); // Connect to the server |
|
36 IMPORT_C void Close(); |
|
37 |
|
38 IMPORT_C void Initialize(const TBTDevAddr& aRemoteAddress, TRequestStatus& aStatus); |
|
39 IMPORT_C void CancelInitialize(); |
|
40 IMPORT_C void GetSupportedDataTypesL(RArray<TFourCC>& aSupportedDataTypes) const; |
|
41 IMPORT_C void GetSupportedSampleRatesL(RArray<TUint>& aSupportedDiscreteRates, RArray<TRange>& aSupportedRateRanges) const; |
|
42 IMPORT_C void GetSupportedChannelsL(RArray<TUint>& aSupportedChannels, TMMFStereoSupport& aStereoSupport) const; |
|
43 IMPORT_C TInt SetDataType(const TFourCC& aDataType); |
|
44 IMPORT_C TInt SetSampleRate(TUint aSampleRate); |
|
45 IMPORT_C TInt SetChannels(TUint aChannels, TMMFStereoSupport aStereoSupport); |
|
46 IMPORT_C void OpenDevice(TRequestStatus& aStatus); |
|
47 IMPORT_C void CancelOpenDevice(); |
|
48 IMPORT_C void CloseDevice(TRequestStatus& aStatus); |
|
49 IMPORT_C TUint Volume() const; |
|
50 IMPORT_C TInt SetVolume(TUint aVolume); |
|
51 IMPORT_C void PlayData(const TDesC8& aData, TRequestStatus& aStatus); |
|
52 IMPORT_C void CancelPlayData(); |
|
53 IMPORT_C void FlushBuffer(); |
|
54 IMPORT_C TUint BytesPlayed() const; |
|
55 IMPORT_C void ResetBytesPlayed(); |
|
56 IMPORT_C void PauseBuffer(); |
|
57 IMPORT_C void ResumePlaying(); |
|
58 IMPORT_C void NotifyError(TRequestStatus& aStatus); |
|
59 IMPORT_C void CancelNotifyError(); |
|
60 private: |
|
61 HBufC* iBufAddr; |
|
62 TPckgBuf<TBTDevAddr>* iPckgBuf; |
|
63 }; |
|
64 |
|
65 |
|
66 #endif |