conversations_plat/im_cv_appui_api/inc/mimcvcommandmapper.h
branchRCL_3
changeset 23 9a48e301e94b
parent 0 5e5d6b214f4f
equal deleted inserted replaced
22:3104fc151679 23:9a48e301e94b
       
     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: Abstract interface for getting mapped command ids
       
    15 *
       
    16 */
       
    17 
       
    18 #ifndef __MIMCVCOMMANDMAPPER_H__
       
    19 #define __MIMCVCOMMANDMAPPER_H__
       
    20 
       
    21 
       
    22 // INCLUDES
       
    23 #include <e32base.h>
       
    24 
       
    25 // CLASS DECLARATION
       
    26 
       
    27 
       
    28 /**
       
    29  *  Abstract interface for getting mapped command IDs. Command ID mapping
       
    30  *  means that xSP's own "Names List" command IDs ( constants that are usually 
       
    31  *  defined in a *.hrh file ) are substituted with IDs provided by Extension
       
    32  *  Manager. This is needed because there may be extensions using same 
       
    33  *  "Names List" command IDs. After the substitution, the original IDs are 
       
    34  *  not valid anymore. Still, in order to allow original "Names List"
       
    35  *  command IDs usage inside the xSP's own code, MxSPCommandMapper provides the
       
    36  *  mechanism for retrieving new IDs which correspond to the old original
       
    37  *  ones and vice versa.
       
    38  */
       
    39 class MIMCVCommandMapper
       
    40     {
       
    41     public:
       
    42         /**
       
    43          *  Gets old original command ID which corresponds
       
    44          *  to the given new one
       
    45          *
       
    46          *  @param aPluginId  implementation ID for identification
       
    47          *  @param aNewCommand  New mapped command ID
       
    48          *  @param aOldCommand  On return old/original command ID
       
    49          *  @return KErrNone if mapping exist, otherwise KErrNotFound
       
    50          */
       
    51         virtual TInt GetOldCommand( TInt32 aPluginId, 
       
    52                                    TInt aNewCommand,
       
    53                                    TInt& aOldCommand ) const = 0;
       
    54                             
       
    55         /**
       
    56          *  Gets new mapped command ID which corresponds
       
    57          *  to the given old one
       
    58          *
       
    59          *  @param aPluginId  implementation ID for identification
       
    60          *  @param aOldCommand Old/original command ID
       
    61          *  @param aNewCommand On return new mapped command ID
       
    62          *  @return KErrNone if mapping exist, otherwise KErrNotFound
       
    63          */
       
    64         virtual TInt GetNewCommand( TInt32 aPluginId, 
       
    65                                     TInt aOldCommand,
       
    66                                     TInt& aNewCommand ) const = 0;
       
    67                                     
       
    68     protected: // Protected interface
       
    69 
       
    70         /**
       
    71          * Destructor.
       
    72          */
       
    73         virtual ~MIMCVCommandMapper()
       
    74                 {};
       
    75                                     
       
    76     };
       
    77 
       
    78 
       
    79 #endif // __MIMCVCOMMANDMAPPER_H__