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: mcommandmapper.h |
|
15 * |
|
16 */ |
|
17 |
|
18 #ifndef __MCOMMANDMAPPER_H__ |
|
19 #define __MCOMMANDMAPPER_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 MCommandMapper |
|
40 { |
|
41 public: |
|
42 /** |
|
43 * Gets old original "Service Tab" 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 "ServiceTab" 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 ~MCommandMapper() |
|
74 {}; |
|
75 |
|
76 }; |
|
77 |
|
78 |
|
79 #endif // __MCOMMANDMAPPER_H__ |
|