diff -r 02103bf20ee5 -r 90dbfc0435e3 bluetoothengine/headsetsimulator/profiles/hfpprofile/inc/features/hfpphonestatusinformation.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/bluetoothengine/headsetsimulator/profiles/hfpprofile/inc/features/hfpphonestatusinformation.h Wed Sep 15 15:59:44 2010 +0200 @@ -0,0 +1,160 @@ +/* + * + * Copyright (c) <2010> Comarch S.A. and/or its subsidiary(-ies). + * All rights reserved. + * This component and the accompanying materials are made available + * under the terms of the License "Eclipse Public License v1.0" + * which accompanies this distribution, and is available + * at the URL "http://www.eclipse.org/legal/epl-v10.html". + * + * Original Contributors: + * Comarch S.A. - original contribution. + * + * Contributors: + * + * Description: + * + */ + +#ifndef HSHFPPHONESTATUSINFORMATION_H +#define HSHFPPHONESTATUSINFORMATION_H + +#include + +#include "hfpfeaturecommons.h" + +class CHsHFPCommand; +class CHsHFPSettings; + +/** + * @brief Represents "Phone status information" feature + */ +class CHsHFPPhoneStatusInformation : public CBase, + public MHsHFPProcedureCommons + { +public: + + /** + * Two-phased constructor. + * + * @param aObserver feature observer + * + * @return instance of class + */ + static CHsHFPPhoneStatusInformation* NewL( + MHsHFPFeatureProviderObserver* aObserver); + + /** + * Two-phased constructor. + * + * @param aObserver feature observer + * + * @return instance of class + */ + static CHsHFPPhoneStatusInformation* NewLC( + MHsHFPFeatureProviderObserver* aObserver); + + /** + * Destructor. + */ + ~CHsHFPPhoneStatusInformation(); + +public: + //Method inherited from MHsHFPProcedureCommons + TInt ProcessCommand(const CHsHFPCommand &aInputCmd, + CHsHFPCommand &aOutputCmd); + + /** + * Informs about call status + * + * @return ETrue if call is ongoing, EFalse otherwise + */ + TBool IsCallOngoing(); + +private: + + /** + * Constructor for performing 1st stage construction + * + * @param aObserver feature observer + */ + CHsHFPPhoneStatusInformation(MHsHFPFeatureProviderObserver* aObserver); + + /** + * Constructor for performing 2nd stage construction + */ + void ConstructL(); + +private: + + /** + * Checks indicator and decides which particular handler should be invoked + * + * @param aCommand CIEV command + */ + void HandleIndicatorL(const CHsHFPCommand* aCommand); + + /** + * Handles call indicator + * + * @param aCommand CIEV command + */ + void HandleCallIndicatorL(const CHsHFPCommand* aCommand); + + /** + * Handles service indicator + * + * @param aCommand CIEV command + */ + void HandleServiceIndicatorL(const CHsHFPCommand* aCommand); + + /** + * Handles callsetup indicator + * + * @param aCommand CIEV command + */ + void HandleCallsetupIndicatorL(const CHsHFPCommand* aCommand); + + /** + * Handles callheld indicator + * + * @param aCommand CIEV command + */ + void HandleCallheldIndicatorL(const CHsHFPCommand* aCommand); + + /** + * Handles signal indicator + * + * @param aCommand CIEV command + */ + void HandleSignalIndicatorL(const CHsHFPCommand* aCommand); + + /** + * Handles roam indicator + * + * @param aCommand CIEV command + */ + void HandleRoamingIndicatorL(const CHsHFPCommand* aCommand); + + /** + * Handles battery charge indicator + * + * @param aCommand CIEV command + */ + void HandleBatteryIndicatorL(const CHsHFPCommand* aCommand); + +private: + /** Pointer to observer */ + MHsHFPFeatureProviderObserver* iObserver; + + /** Denotes if OK command is expected */ + TBool iWaitingForOK; + + /** Denotes if COPS command is expected */ + TBool iWaitingForCOPSFromAG; + + /** Profile setting */ + CHsHFPSettings* iSettings; + }; + +#endif // HSHFPPHONESTATUSINFORMATION_H