phoneapp/phoneuivoipextension/inc/cphoneextensionhandler.h
changeset 37 ba76fc04e6c2
child 51 f39ed5e045e0
equal deleted inserted replaced
36:2eacb6118286 37:ba76fc04e6c2
       
     1 /*
       
     2 * Copyright (c) 2007-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:  Extension handler class.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef C_CPHONEEXTENSIONHANDLER_H
       
    20 #define C_CPHONEEXTENSIONHANDLER_H
       
    21 
       
    22 // INCLUDES
       
    23 #include <telmenuextension.h>
       
    24 #include <spdefinitions.h>
       
    25  
       
    26 // FORWARD DECLARATIONS
       
    27 class CPhMenuExtensionWrapper;
       
    28 
       
    29 // CLASS DECLARATION
       
    30 /**
       
    31 *  Extension handler class
       
    32 */
       
    33 NONSHARABLE_CLASS( CPhoneExtensionHandler ): public CBase
       
    34     {
       
    35         
       
    36     public:      
       
    37 
       
    38         /**
       
    39          * Destructor.
       
    40          */
       
    41         virtual ~CPhoneExtensionHandler();
       
    42 
       
    43         /**
       
    44          * Creates the extension handler class
       
    45          */
       
    46         static CPhoneExtensionHandler* NewL();
       
    47                         
       
    48         /**
       
    49          * Modifies menu when there is active call.
       
    50          * @param aServiceId Service id of the call.
       
    51          * @param aArray Active call array
       
    52          * @param aResourceId Menu resource id.
       
    53          * @param aMenuPane Menu pane
       
    54          */
       
    55         void ModifyInCallMenuL( 
       
    56                 TUint aServiceId,
       
    57                 RArray<CTelMenuExtension::TCallInfo>& aArray, 
       
    58                 TInt aResourceId, 
       
    59                 CEikMenuPane& aMenuPane );
       
    60 
       
    61         /**
       
    62          * Handles custom menu command.
       
    63          * @param aServiceId Service id of the call.
       
    64          * @param aCommand Command id.
       
    65          * @return ETrue if command handled.
       
    66          */
       
    67         TBool HandleCommandL( 
       
    68                 TUint aServiceId,
       
    69                 TInt aCommand );
       
    70             
       
    71     protected:
       
    72 
       
    73         CPhoneExtensionHandler();
       
    74         
       
    75         void ConstructL();
       
    76         
       
    77     private:                
       
    78         
       
    79         
       
    80         /**
       
    81          * Resolves extensions implementation uid for 
       
    82          * given service id.
       
    83          * @leave KErrNotFound if extension not exists for service.
       
    84          * @param aServiceId Service id
       
    85          * @param aPropertyName Service table property name.
       
    86          * @return Implementaion uid.
       
    87          */
       
    88         TUid ResolveImplementationUidL( TUint32 aServiceId, 
       
    89                                         TServicePropertyName aPropertyName );
       
    90 
       
    91         /**
       
    92          * Adds unattended transfer menu item to menu.
       
    93          * @param aMenuPane Menu pane.
       
    94          */
       
    95         void AddUnattendedTransferMenuItemL( CEikMenuPane& aMenuPane );
       
    96 
       
    97         /**
       
    98          * Returns menu extension by service id.
       
    99          * @leave Leaves if not found.
       
   100          * @param  aServiceId Service id of call
       
   101          */
       
   102         CTelMenuExtension* MenuExtensionL( TUint aServiceId );
       
   103         
       
   104         
       
   105     private: // Data
       
   106 
       
   107         
       
   108         /**
       
   109          * Menu extension plugins.
       
   110          * Own.
       
   111          */
       
   112         RPointerArray<CPhMenuExtensionWrapper> iPlugins;
       
   113     };
       
   114 
       
   115 #endif // C_CPHONEVOIPUTILITY_H
       
   116 
       
   117 // End of File