os/mm/devsound/sounddevbt/src/A2dpBlueTooth/headsetaudioif/GavdpStates.h
author sl
Tue, 10 Jun 2014 14:32:02 +0200
changeset 1 260cb5ec6c19
permissions -rw-r--r--
Update contrib.
     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 __GAVDPSTATES_H__
    17 #define __GAVDPSTATES_H__
    18 
    19 
    20 /**
    21 Class to represent the state of the CGAVDPStateMachine
    22 
    23 @internalComponent
    24 */
    25 class TGAVDPState
    26 	{
    27 public:
    28 enum TGAVDPStateValue
    29 		{
    30 		EGAVDPIdle,
    31 		EConnectedToGavdp,
    32 		ESEPsDiscovered,
    33 		ESEPSelected,
    34 		EConfigured,
    35 		EGAVDPOpen,
    36 		EGAVDPStreaming,
    37 		EGAVDPSuspended,
    38 		EAborting
    39 		};
    40 public:	
    41 inline TGAVDPState();	
    42 inline TGAVDPState(TGAVDPStateValue aGAVDPStateValue);
    43 inline TGAVDPState operator=(const TGAVDPState& aGAVDPState);	
    44 inline TBool operator==(const TGAVDPState& aGAVDPState) const;
    45 inline TBool operator!=(const TGAVDPState& aGAVDPState) const;
    46 inline void operator++();
    47 inline TGAVDPStateValue State() const;
    48 private:
    49 	TGAVDPStateValue iState;
    50 	};
    51 
    52 
    53 /**
    54 Class used by the CGAVDPStateMachine to track the state of 
    55 a configuration by the headset.
    56 
    57 @internalComponent
    58 */
    59 class TConfigurationByRemoteHeadsetState
    60 	{
    61 public:
    62 enum TConfigurationByRemoteHeadsetStateValue
    63 		{
    64 		ENotBeingConfiguredByRemoteHeadset,
    65 		ERemoteHeadsetConfigurationStart,
    66 		ERemoteHeadsetConfigurationFailed,
    67 		ERemoteHeadsetConfigurationEnd
    68 		};
    69 public:	
    70 	inline TConfigurationByRemoteHeadsetState();
    71 	inline void Reset();
    72 	inline TConfigurationByRemoteHeadsetState operator=(const TConfigurationByRemoteHeadsetStateValue& aConfigByRemoteHeadsetStateValue);	
    73 	inline TBool operator==(const TConfigurationByRemoteHeadsetStateValue aConfigByRemoteHeadsetStateValue) const;
    74 	inline TBool operator!=(const TConfigurationByRemoteHeadsetStateValue aConfigByRemoteHeadsetStateValue) const;
    75 	inline TConfigurationByRemoteHeadsetState::TConfigurationByRemoteHeadsetStateValue State() const;
    76 	inline TSEID SEPRequestedByRemoteHeadset() const;
    77 	inline void SetSEPRequestedByRemoteHeadset(const TSEID& aSEID);
    78 	inline TAvdtpMediaTransportCapabilities* TransportCapsRequestedByRemoteHeadset() const;
    79 	inline void SetTransportCapsRequestedByRemoteHeadset(TAvdtpMediaTransportCapabilities* aTransportCapsRequestedByRemoteHeadset);
    80 	inline TAvdtpMediaCodecCapabilities* CodecConfigRequestedByRemoteHeadset() const;
    81 	inline void SetCodecConfigRequestedByRemoteHeadset(TAvdtpMediaCodecCapabilities* aCodecConfigRequestedByRemoteHeadset);	
    82 private:
    83 	TConfigurationByRemoteHeadsetStateValue iState;
    84 	TSEID iSEPRequestedByRemoteHeadset;
    85 	TAvdtpMediaTransportCapabilities* iTransportCapsRequestedByRemoteHeadset;
    86 	TAvdtpMediaCodecCapabilities* iCodecConfigRequestedByRemoteHeadset;
    87 	};
    88 	
    89 #include "GavdpStates.inl"
    90 
    91 #endif
    92