os/mm/devsound/sounddevbt/src/A2dpBlueTooth/headsetaudioif/GavdpStates.h
changeset 0 bde4ae8d615e
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/os/mm/devsound/sounddevbt/src/A2dpBlueTooth/headsetaudioif/GavdpStates.h	Fri Jun 15 03:10:57 2012 +0200
     1.3 @@ -0,0 +1,92 @@
     1.4 +// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
     1.5 +// All rights reserved.
     1.6 +// This component and the accompanying materials are made available
     1.7 +// under the terms of "Eclipse Public License v1.0"
     1.8 +// which accompanies this distribution, and is available
     1.9 +// at the URL "http://www.eclipse.org/legal/epl-v10.html".
    1.10 +//
    1.11 +// Initial Contributors:
    1.12 +// Nokia Corporation - initial contribution.
    1.13 +//
    1.14 +// Contributors:
    1.15 +//
    1.16 +// Description:
    1.17 +//
    1.18 +
    1.19 +#ifndef __GAVDPSTATES_H__
    1.20 +#define __GAVDPSTATES_H__
    1.21 +
    1.22 +
    1.23 +/**
    1.24 +Class to represent the state of the CGAVDPStateMachine
    1.25 +
    1.26 +@internalComponent
    1.27 +*/
    1.28 +class TGAVDPState
    1.29 +	{
    1.30 +public:
    1.31 +enum TGAVDPStateValue
    1.32 +		{
    1.33 +		EGAVDPIdle,
    1.34 +		EConnectedToGavdp,
    1.35 +		ESEPsDiscovered,
    1.36 +		ESEPSelected,
    1.37 +		EConfigured,
    1.38 +		EGAVDPOpen,
    1.39 +		EGAVDPStreaming,
    1.40 +		EGAVDPSuspended,
    1.41 +		EAborting
    1.42 +		};
    1.43 +public:	
    1.44 +inline TGAVDPState();	
    1.45 +inline TGAVDPState(TGAVDPStateValue aGAVDPStateValue);
    1.46 +inline TGAVDPState operator=(const TGAVDPState& aGAVDPState);	
    1.47 +inline TBool operator==(const TGAVDPState& aGAVDPState) const;
    1.48 +inline TBool operator!=(const TGAVDPState& aGAVDPState) const;
    1.49 +inline void operator++();
    1.50 +inline TGAVDPStateValue State() const;
    1.51 +private:
    1.52 +	TGAVDPStateValue iState;
    1.53 +	};
    1.54 +
    1.55 +
    1.56 +/**
    1.57 +Class used by the CGAVDPStateMachine to track the state of 
    1.58 +a configuration by the headset.
    1.59 +
    1.60 +@internalComponent
    1.61 +*/
    1.62 +class TConfigurationByRemoteHeadsetState
    1.63 +	{
    1.64 +public:
    1.65 +enum TConfigurationByRemoteHeadsetStateValue
    1.66 +		{
    1.67 +		ENotBeingConfiguredByRemoteHeadset,
    1.68 +		ERemoteHeadsetConfigurationStart,
    1.69 +		ERemoteHeadsetConfigurationFailed,
    1.70 +		ERemoteHeadsetConfigurationEnd
    1.71 +		};
    1.72 +public:	
    1.73 +	inline TConfigurationByRemoteHeadsetState();
    1.74 +	inline void Reset();
    1.75 +	inline TConfigurationByRemoteHeadsetState operator=(const TConfigurationByRemoteHeadsetStateValue& aConfigByRemoteHeadsetStateValue);	
    1.76 +	inline TBool operator==(const TConfigurationByRemoteHeadsetStateValue aConfigByRemoteHeadsetStateValue) const;
    1.77 +	inline TBool operator!=(const TConfigurationByRemoteHeadsetStateValue aConfigByRemoteHeadsetStateValue) const;
    1.78 +	inline TConfigurationByRemoteHeadsetState::TConfigurationByRemoteHeadsetStateValue State() const;
    1.79 +	inline TSEID SEPRequestedByRemoteHeadset() const;
    1.80 +	inline void SetSEPRequestedByRemoteHeadset(const TSEID& aSEID);
    1.81 +	inline TAvdtpMediaTransportCapabilities* TransportCapsRequestedByRemoteHeadset() const;
    1.82 +	inline void SetTransportCapsRequestedByRemoteHeadset(TAvdtpMediaTransportCapabilities* aTransportCapsRequestedByRemoteHeadset);
    1.83 +	inline TAvdtpMediaCodecCapabilities* CodecConfigRequestedByRemoteHeadset() const;
    1.84 +	inline void SetCodecConfigRequestedByRemoteHeadset(TAvdtpMediaCodecCapabilities* aCodecConfigRequestedByRemoteHeadset);	
    1.85 +private:
    1.86 +	TConfigurationByRemoteHeadsetStateValue iState;
    1.87 +	TSEID iSEPRequestedByRemoteHeadset;
    1.88 +	TAvdtpMediaTransportCapabilities* iTransportCapsRequestedByRemoteHeadset;
    1.89 +	TAvdtpMediaCodecCapabilities* iCodecConfigRequestedByRemoteHeadset;
    1.90 +	};
    1.91 +	
    1.92 +#include "GavdpStates.inl"
    1.93 +
    1.94 +#endif
    1.95 +