os/mm/devsound/sounddevbt/src/A2dpBlueTooth/client/A2dpBTHeadsetAudioIfClient.h
author sl
Tue, 10 Jun 2014 14:32:02 +0200 (2014-06-10)
changeset 1 260cb5ec6c19
permissions -rw-r--r--
Update contrib.
sl@0
     1
// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
sl@0
     2
// All rights reserved.
sl@0
     3
// This component and the accompanying materials are made available
sl@0
     4
// under the terms of "Eclipse Public License v1.0"
sl@0
     5
// which accompanies this distribution, and is available
sl@0
     6
// at the URL "http://www.eclipse.org/legal/epl-v10.html".
sl@0
     7
//
sl@0
     8
// Initial Contributors:
sl@0
     9
// Nokia Corporation - initial contribution.
sl@0
    10
//
sl@0
    11
// Contributors:
sl@0
    12
//
sl@0
    13
// Description:
sl@0
    14
//
sl@0
    15
sl@0
    16
#ifndef __A2DPBTHEADSETAUDIOIFCLIENT_H__
sl@0
    17
#define __A2DPBTHEADSETAUDIOIFCLIENT_H__
sl@0
    18
sl@0
    19
#include <e32base.h>
sl@0
    20
#include <e32std.h>
sl@0
    21
#include <mmf/server/sounddevice.h>
sl@0
    22
#include <bttypes.h>
sl@0
    23
sl@0
    24
// Forward declarations.
sl@0
    25
class TFourCC;
sl@0
    26
class TRange;
sl@0
    27
sl@0
    28
/**
sl@0
    29
*@internalTechnology
sl@0
    30
*/
sl@0
    31
class RA2dpBTHeadsetAudioInterface : public RMmfSessionBase
sl@0
    32
	{
sl@0
    33
public:
sl@0
    34
	IMPORT_C RA2dpBTHeadsetAudioInterface();
sl@0
    35
	IMPORT_C TInt Connect();	// Connect to the server
sl@0
    36
	IMPORT_C void Close();
sl@0
    37
sl@0
    38
	IMPORT_C void Initialize(const TBTDevAddr& aRemoteAddress, TRequestStatus& aStatus);
sl@0
    39
	IMPORT_C void CancelInitialize();
sl@0
    40
	IMPORT_C void GetSupportedDataTypesL(RArray<TFourCC>& aSupportedDataTypes) const;
sl@0
    41
	IMPORT_C void GetSupportedSampleRatesL(RArray<TUint>& aSupportedDiscreteRates, RArray<TRange>& aSupportedRateRanges) const;
sl@0
    42
	IMPORT_C void GetSupportedChannelsL(RArray<TUint>& aSupportedChannels, TMMFStereoSupport& aStereoSupport) const;
sl@0
    43
	IMPORT_C TInt SetDataType(const TFourCC& aDataType);
sl@0
    44
	IMPORT_C TInt SetSampleRate(TUint aSampleRate);
sl@0
    45
	IMPORT_C TInt SetChannels(TUint aChannels, TMMFStereoSupport aStereoSupport);
sl@0
    46
	IMPORT_C void OpenDevice(TRequestStatus& aStatus);
sl@0
    47
	IMPORT_C void CancelOpenDevice();
sl@0
    48
	IMPORT_C void CloseDevice(TRequestStatus& aStatus);
sl@0
    49
	IMPORT_C TUint Volume() const;
sl@0
    50
	IMPORT_C TInt SetVolume(TUint aVolume);
sl@0
    51
	IMPORT_C void PlayData(const TDesC8& aData, TRequestStatus& aStatus);
sl@0
    52
	IMPORT_C void CancelPlayData();
sl@0
    53
	IMPORT_C void FlushBuffer();
sl@0
    54
	IMPORT_C TUint BytesPlayed() const;
sl@0
    55
	IMPORT_C void ResetBytesPlayed();
sl@0
    56
	IMPORT_C void PauseBuffer();
sl@0
    57
	IMPORT_C void ResumePlaying();
sl@0
    58
	IMPORT_C void NotifyError(TRequestStatus& aStatus);
sl@0
    59
	IMPORT_C void CancelNotifyError();
sl@0
    60
private:
sl@0
    61
	HBufC*	iBufAddr;
sl@0
    62
	TPckgBuf<TBTDevAddr>* iPckgBuf;
sl@0
    63
	};
sl@0
    64
sl@0
    65
sl@0
    66
#endif