bluetoothengine/headsetsimulator/profiles/hfpprofile/inc/features/hfpphonenumberdialing.h
author michal.sulewski
Wed, 15 Sep 2010 15:59:44 +0200
branchheadsetsimulator
changeset 60 90dbfc0435e3
permissions -rw-r--r--
source code commit

/* 
 *
 * 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 HSHFPPHONENUMBERDIALING_H
#define HSHFPPHONENUMBERDIALING_H

#include <e32base.h>

#include "hfpfeaturecommons.h"

class CHsHFPCommand;
class CHsHFPSettings;

/**
 * @brief Represents "Place a call with a phone number supplied by the HF" feature
 */
class CHsHFPPhoneNumberDialing : public CBase, public MHsHFPProcedureCommons
    {
public:

    /**
     * Two-phased constructor.
     * 
     * @param aObserver feature observer
     * 
     * @return instance of class
     */
    static CHsHFPPhoneNumberDialing* NewL(
            MHsHFPFeatureProviderObserver* aObserver);

    /**
     * Two-phased constructor.
     * 
     * @param aObserver feature observer
     * 
     * @return instance of class
     */
    static CHsHFPPhoneNumberDialing* NewLC(
            MHsHFPFeatureProviderObserver* aObserver);

    /**
     * Destructor.
     */
    ~CHsHFPPhoneNumberDialing();

public:
    //Method inherited from MHsHFPProcedureCommons
    TInt ProcessCommand(const CHsHFPCommand &aInputCmd,
            CHsHFPCommand &aOutputCmd);

private:

    /**
     * Constructor for performing 1st stage construction
     * 
     * @param aObserver feature observer
     */
    CHsHFPPhoneNumberDialing(MHsHFPFeatureProviderObserver* aObserver);

    /**
     * Constructor for performing 2nd stage construction
     */
    void ConstructL();

    /**
     * Checks if received CIEV is proper
     * 
     * @param aCommand AT command
     */
    TBool IsProperCIEV(const CHsHFPCommand* aCommand);

private:
    /** Pointer to observer */
    MHsHFPFeatureProviderObserver* iObserver;

    /** Denotes if OK command is expected */
    TBool iWaitingForOK;

    /** Denotes if CIEV command is expected */
    TBool iWaitingForCIEV;

    /** Profile setting */
    CHsHFPSettings* iSettings;
    };

#endif // HSHFPPHONENUMBERDIALING_H