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 __GAVDPSTATES_H__ sl@0: #define __GAVDPSTATES_H__ sl@0: sl@0: sl@0: /** sl@0: Class to represent the state of the CGAVDPStateMachine sl@0: sl@0: @internalComponent sl@0: */ sl@0: class TGAVDPState sl@0: { sl@0: public: sl@0: enum TGAVDPStateValue sl@0: { sl@0: EGAVDPIdle, sl@0: EConnectedToGavdp, sl@0: ESEPsDiscovered, sl@0: ESEPSelected, sl@0: EConfigured, sl@0: EGAVDPOpen, sl@0: EGAVDPStreaming, sl@0: EGAVDPSuspended, sl@0: EAborting sl@0: }; sl@0: public: sl@0: inline TGAVDPState(); sl@0: inline TGAVDPState(TGAVDPStateValue aGAVDPStateValue); sl@0: inline TGAVDPState operator=(const TGAVDPState& aGAVDPState); sl@0: inline TBool operator==(const TGAVDPState& aGAVDPState) const; sl@0: inline TBool operator!=(const TGAVDPState& aGAVDPState) const; sl@0: inline void operator++(); sl@0: inline TGAVDPStateValue State() const; sl@0: private: sl@0: TGAVDPStateValue iState; sl@0: }; sl@0: sl@0: sl@0: /** sl@0: Class used by the CGAVDPStateMachine to track the state of sl@0: a configuration by the headset. sl@0: sl@0: @internalComponent sl@0: */ sl@0: class TConfigurationByRemoteHeadsetState sl@0: { sl@0: public: sl@0: enum TConfigurationByRemoteHeadsetStateValue sl@0: { sl@0: ENotBeingConfiguredByRemoteHeadset, sl@0: ERemoteHeadsetConfigurationStart, sl@0: ERemoteHeadsetConfigurationFailed, sl@0: ERemoteHeadsetConfigurationEnd sl@0: }; sl@0: public: sl@0: inline TConfigurationByRemoteHeadsetState(); sl@0: inline void Reset(); sl@0: inline TConfigurationByRemoteHeadsetState operator=(const TConfigurationByRemoteHeadsetStateValue& aConfigByRemoteHeadsetStateValue); sl@0: inline TBool operator==(const TConfigurationByRemoteHeadsetStateValue aConfigByRemoteHeadsetStateValue) const; sl@0: inline TBool operator!=(const TConfigurationByRemoteHeadsetStateValue aConfigByRemoteHeadsetStateValue) const; sl@0: inline TConfigurationByRemoteHeadsetState::TConfigurationByRemoteHeadsetStateValue State() const; sl@0: inline TSEID SEPRequestedByRemoteHeadset() const; sl@0: inline void SetSEPRequestedByRemoteHeadset(const TSEID& aSEID); sl@0: inline TAvdtpMediaTransportCapabilities* TransportCapsRequestedByRemoteHeadset() const; sl@0: inline void SetTransportCapsRequestedByRemoteHeadset(TAvdtpMediaTransportCapabilities* aTransportCapsRequestedByRemoteHeadset); sl@0: inline TAvdtpMediaCodecCapabilities* CodecConfigRequestedByRemoteHeadset() const; sl@0: inline void SetCodecConfigRequestedByRemoteHeadset(TAvdtpMediaCodecCapabilities* aCodecConfigRequestedByRemoteHeadset); sl@0: private: sl@0: TConfigurationByRemoteHeadsetStateValue iState; sl@0: TSEID iSEPRequestedByRemoteHeadset; sl@0: TAvdtpMediaTransportCapabilities* iTransportCapsRequestedByRemoteHeadset; sl@0: TAvdtpMediaCodecCapabilities* iCodecConfigRequestedByRemoteHeadset; sl@0: }; sl@0: sl@0: #include "GavdpStates.inl" sl@0: sl@0: #endif sl@0: