phonebookui/Phonebook/App/inc/CPbkCallCmd.h
author Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
Thu, 19 Aug 2010 09:41:07 +0300
branchRCL_3
changeset 18 d4f567ce2e7c
parent 0 e686773b3f54
permissions -rw-r--r--
Revision: 201031 Kit: 201033

/*
* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
* All rights reserved.
* This component and the accompanying materials are made available
* under the terms of "Eclipse Public License v1.0"
* which accompanies this distribution, and is available
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
*
* Initial Contributors:
* Nokia Corporation - initial contribution.
*
* Contributors:
*
* Description: 
*      Call command object.
*
*/


#ifndef __CPbkCallCmd_H__
#define __CPbkCallCmd_H__

// INCLUDES
#include <e32base.h>
#include <cntdef.h>
#include <MPbkCommand.h>
#include <MPbkBackgroundProcess.h>
#include <CPbkAddressSelect.h>
#include <AiwDialDataTypes.h>


// FORWARD DECLARATIONS
class CPbkContactItem;
class TPbkContactItemField;
class CAiwServiceHandler;
class CPbkCallTypeSelector;


// CLASS DECLARATION

/**
 * Call command object.
 */
class CPbkCallCmd :
        public CBase,
        public MPbkCommand,
        private MPbkProcessObserver
    {
    public: // Interface
		/**
         * Static constructor.
         * @param aContactItem reference to contact item
         * @param aSelectField select contact field, can be NULL
         * @param aFocusedField focused contact field, can be NULL
         * @param aCommandId command id
         * @param aServiceHandler service handler
         * @param aSelector call type selector
         * @return a new call command object.
         */
		static CPbkCallCmd* NewL (
		    const CPbkContactItem& aContactItem,
    		const TPbkContactItemField* aSelectedField,
    		const TPbkContactItemField* aFocusedField,
            const TInt aCommandId,
            CAiwServiceHandler& aServiceHandler,
            const CPbkCallTypeSelector& aSelector);

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

    public:  // from MPbkCommand
        void ExecuteLD();
        
    public:  // from MPbkProcessObserver
        void ProcessFinished(MPbkBackgroundProcess& aProcess);

    private:  // Implementation
        CPbkCallCmd (
		    const CPbkContactItem& aContactItem,
    		const TPbkContactItemField* aSelectedField,
    		const TPbkContactItemField* aFocusedField,
            const TInt aCommandId,
            CAiwServiceHandler& aServiceHandler,
            const CPbkCallTypeSelector& aSelector);
        void SetupDialDataL();

    private:  // Data
		/// Ref: the contact to call
		const CPbkContactItem& iContact;
		/// Ref: the phonenumber field to call
		const TPbkContactItemField* iSelectedField;
		/// Ref: the focused field of the contact
		const TPbkContactItemField* iFocusedField;
        /// Own: command id
        const TInt iCommandId;
        /// Ref: AIW service handler
        CAiwServiceHandler& iServiceHandler;
        /// Ref: Call type selector
        const CPbkCallTypeSelector& iSelector;
        /// Own: dial data
        TAiwDialDataV1 iDialData;
    };

#endif // __CPbkCallCmd_H__

// End of File