diff -r 02103bf20ee5 -r 90dbfc0435e3 bluetoothengine/headsetsimulator/profiles/hspprofile/inc/features/hspfeaturecommons.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/bluetoothengine/headsetsimulator/profiles/hspprofile/inc/features/hspfeaturecommons.h Wed Sep 15 15:59:44 2010 +0200 @@ -0,0 +1,75 @@ +/* + * + * 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 HSPFEATURECOMMONS_H_ +#define HSPFEATURECOMMONS_H_ + +#include + +class CHsHSPCommand; + +/** Profile's procedures */ +enum THSPProcedure +{ + /** Voice call termination */ + EHSPCallTerminate, + /** Voice call acceptance */ + EHSPCallAccept, + /** Remote volume control */ + EHSPVolumeControl, + /** Other state */ + EHSPIdle +}; + +/** + * @brief Observer for feature's classes + */ +class MHsHSPFeatureProviderObserver +{ +public: + /** + * Callback method indicates that procedure is finished + * + * @param aErr KErrNone if procedure finishes successfully, + * otherwise one of the system-wide error codes + * @param aProcedure type of procedure + */ + virtual void HandleProcedureCompleted( TInt aErr, + const THSPProcedure aProcedure ) = 0 +}; + +/** + * @brief Abstract class for particular features + */ +class MHsHSPProcedureCommons +{ +public: + + /** + * Processes AT command and prepares response + * + * @param aInputCmd input AT command + * @param aOutputCmd response + * @return KErrNone if successful, otherwise one of the system-wide error + * codes + */ + virtual TInt ProcessCommand( const CHsHSPCommand* aInputCmd, + CHsHSPCommand &aOutputCmd ) = 0; +}; + +#endif /* HSPFEATURECOMMONS_H_ */