phoneapp/phoneuivoipextension/inc/cphonetransferdialercontroller.h
changeset 37 ba76fc04e6c2
parent 0 5f000ab63145
child 9 8871b09be73b
equal deleted inserted replaced
36:2eacb6118286 37:ba76fc04e6c2
       
     1 /*
       
     2 * Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). 
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description: 
       
    15 *     Unattended transfer dialer customization
       
    16 *     controller
       
    17 *
       
    18 */
       
    19 
       
    20 
       
    21 #ifndef CPHONETRANSFERDIALERCONTROLLER_H_
       
    22 #define CPHONETRANSFERDIALERCONTROLLER_H_
       
    23 
       
    24 // INCLUDES
       
    25 #include <aknbutton.h>
       
    26 #include "mphonedialercontroller.h"
       
    27 
       
    28 // FORWARD DECLARATIONS
       
    29 class CAknToolbar; 
       
    30 
       
    31 /**
       
    32 *  VoIP unattended transfer dialer customization
       
    33 */
       
    34 NONSHARABLE_CLASS( CPhoneTransferDialerController ): public CBase,
       
    35                                        public MPhoneDialerController
       
    36     {
       
    37     public:      
       
    38 
       
    39         static CPhoneTransferDialerController* NewL();
       
    40         
       
    41         /**
       
    42         * Destructor.
       
    43         */
       
    44         virtual ~CPhoneTransferDialerController();
       
    45 
       
    46     public: // From MDialerController
       
    47     
       
    48         
       
    49         /**
       
    50         * Initializes the controller. 
       
    51         * @param    aToolbar    CAknToolbar instance.
       
    52         * @since    S60 v5.1
       
    53         */ 
       
    54         void InitializeL( CAknToolbar& aToolbar );
       
    55         
       
    56         /**
       
    57         * Returns Cba resource id
       
    58         * @return Resource Id of the softkeys
       
    59         * @since S60 v5.1
       
    60         */
       
    61         TInt CbaResourceId() const;
       
    62         
       
    63         /**
       
    64         * Returns Menu resource id
       
    65         * @return Id of the menu resource
       
    66         * @since S60 v5.1
       
    67         */
       
    68         TInt MenuResourceId() const;
       
    69         
       
    70         /**
       
    71         * Returns number entry prompt text
       
    72         * @return Reference to text to be shown on number entry
       
    73         * @since S60 v5.1
       
    74         */
       
    75         const TDesC& NumberEntryPromptTextL();
       
    76         
       
    77         /**
       
    78         * Handles the number entry empty event
       
    79         * @param aEmpty ETrue if numberentry is empty
       
    80         * @since S60 v5.1
       
    81         */
       
    82         void HandleNumberEntryIsEmpty( TBool aEmpty );
       
    83         
       
    84         /**
       
    85         * Sets visibility of buttons created by the implementation
       
    86         * @param aShow ETrue if numberentry is empty
       
    87         * @since S60 v5.1
       
    88         */
       
    89         void ShowButtons( TBool aShow );
       
    90         
       
    91     private:
       
    92     
       
    93         /**
       
    94          * Creates instance of CAKnButton
       
    95          * @param aNormalIconId Button normal icon id
       
    96          * @param aNormalMaskId Mask id
       
    97          * @param aTooltipText Reference to tooltip text
       
    98          * @param aSkinIconId Skin icon id
       
    99          * @return Pointer to created button instance
       
   100          */
       
   101         CAknButton* CreateButtonLC( TInt aNormalIconId,
       
   102                                     TInt aNormalMaskId,
       
   103                                     const TDesC& aTooltipText, 
       
   104                                     const TAknsItemID& aSkinIconId ) const; 
       
   105         
       
   106         /**
       
   107          * Returns tool tip for specific command
       
   108          * @param aCommandId Command id which the tooltip text 
       
   109          * is needed
       
   110          * @return Pointer to descriptor containing tooltip text
       
   111          */
       
   112         HBufC* GetTooltipTextL( TInt aCommandId ) const; 
       
   113         
       
   114         TAknsItemID SkinId( TInt aIconIndex ) const;
       
   115 
       
   116     protected:
       
   117 
       
   118         /**
       
   119         * By default EPOC constructor is private.
       
   120         */
       
   121         CPhoneTransferDialerController();
       
   122             
       
   123     private: // Data
       
   124     
       
   125         // Pointer to CAknToolbar, Not own
       
   126         CAknToolbar* iToolbar;
       
   127         
       
   128         // ETrue if number entry input field is empty
       
   129         TBool iNumberEntryIsEmpty;
       
   130         
       
   131         // Number entry prompt text ("Address:")
       
   132         HBufC* iNumberEntryPromptText;
       
   133         
       
   134         // ETrue if initialized 
       
   135         TBool iIsInitialized;
       
   136       
       
   137     };
       
   138 
       
   139 #endif /*CPHONETRANSFERDIALERCONTROLLER_H_*/