/*
* Component Name: Headset Simulator
* Author: Comarch S.A.
* Version: 1.0
* Copyright (c) 2010 Comarch S.A.
*
* This Software is submitted by Comarch S.A. to Symbian Foundation Limited on
* the basis of the Member Contribution Agreement entered between Comarch S.A.
* and Symbian Foundation Limited on 5th June 2009 (“Agreement”) and may be
* used only in accordance with the terms and conditions of the Agreement.
* Any other usage, duplication or redistribution of this Software is not
* allowed without written permission of Comarch S.A.
*
*/
#ifndef HSPROFILEBASE_H_
#define HSPROFILEBASE_H_
#include <e32cmn.h>
#include <badesca.h>
#include <ecom.h>
#include <hsecompluginbase.h>
/**
* Profile plugin's UID
*/
const TUid KHsProfileBaseInterfaceDefinitionUid =
{
0xE0009DC1
};
/**
* @brief Abstract methods for profile plugin
*/
class MHsProfileBase
{
public:
/**
* Destructor
*/
virtual ~MHsProfileBase() { };
/**
* Profile's method for handling AT Commands
*
* @param aCommandsIn AT command received by HS
* @param aCommandsOut response
* @param aFromAG denotes if AT command was sent from AG
*/
virtual void HandleCommandL( const TDesC8& aCommandsIn, TDes8& aCommandsOut,
const TBool aFromAG = ETrue ) = 0;
/**
* Profile's method for handling AG client disconnection
*
* @param aErr disconnection reason
*/
virtual void HandleClientDisconnected( TInt aErr ) = 0;
/**
* Profile's method for handling AG client connection
*
* @param aCommandOut response
*/
virtual void HandleClientConnected( TDes8& aCommandOut ) = 0;
/**
* Profile's method for accepting incoming call
*
* @param aCommandOut response
*/
virtual void HandleAcceptCallL( TDes8& aCommandOut ) = 0;
/**
* Profile's method for releasing ongoing call
*
* @param aCommandOut response
*/
virtual void HandleReleaseCallL( TDes8& aCommandOut ) = 0;
};
/**
* @brief Base class for profile plugins
*/
class CHsProfileBase : public CHsEComPluginBase, public MHsProfileBase
{
public:
/**
* Two-phase constructor
* @param aUid plugin's UID
* @return instance of class
*/
static CHsProfileBase* NewL( const TUid aUid );
/**
* Two-phase constructor
* @param aProfileName plugin's name
* @return instance of class
*/
static CHsProfileBase* NewL( const TDesC8 &aProfileName );
public:
/**
* Destructor
*/
virtual ~CHsProfileBase();
public:
//Methods inherited from MHsProfileBase
virtual void HandleCommandL( const TDesC8 &aCommandsIn, TDes8 &aCommandsOut,
const TBool aFromAG = ETrue ) = 0;
virtual void HandleClientDisconnected( TInt aErr ) = 0;
virtual void HandleClientConnected( TDes8& aCommandOut ) = 0;
virtual void HandleAcceptCallL( TDes8& aCommandOut ) = 0;
virtual void HandleReleaseCallL( TDes8& aCommandOut ) = 0;
};
#include "hsprofilepluginbase.inl"
#endif /* HSPROFILEBASE_H_ */