|
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: Folder UI extension plugin |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 #ifndef MMFOLDERUIEXTPLUGIN_H |
|
21 #define MMFOLDERUIEXTPLUGIN_H |
|
22 |
|
23 #include <e32base.h> |
|
24 #include <liwcommon.h> |
|
25 #include "mmextensionplugin.h" |
|
26 |
|
27 class CMmPluginSharedResources; |
|
28 class CMmFolderCommand; |
|
29 class MMmActionRequest; |
|
30 |
|
31 /** |
|
32 * CMmFolderUiExtPlugin is an Ecom plugin implementation responsible for |
|
33 * executing operations on folders from MCS. Plugin receives command from UI, |
|
34 * creates appropriate handler and starts command handling. |
|
35 * |
|
36 * CMmFolderUiExtPlugin implements CMMExtensionPlugin interface. The most |
|
37 * important function is ExecuteActionL which receives parameters from |
|
38 * extension manager. One of those parameters is command name. Plugin is |
|
39 * supporting following commands: |
|
40 * - MMCreateNewFolderCommand, |
|
41 * - MMRenameFolderCommand, |
|
42 * - MMDeleteFolderCommand, |
|
43 * - MMDeleteAppCommand, |
|
44 * - MMDeleteSuiteCommand. |
|
45 * If function received other command it would return KErrNotSupported error |
|
46 * code. |
|
47 * |
|
48 * UI extension plugin need to be declared and configured in xml file as part |
|
49 * of mmenu:action tag, which is inside mmenu:event tag. Any data that should |
|
50 * be passed to plugin have to be defined inside mmenu:data tag as mmenu:key |
|
51 * tags. |
|
52 * |
|
53 * @lib mmfolderuiextensionplugin.lib |
|
54 * @since S60 5.0 |
|
55 * @ingroup group_mmfolderuiextensionplugin |
|
56 */ |
|
57 NONSHARABLE_CLASS( CMmFolderUiExtPlugin ) : public CMMExtensionPlugin |
|
58 { |
|
59 public: |
|
60 |
|
61 /** |
|
62 * Instantiates an object of this type. |
|
63 * @return Instance of the CMmFolderUiExtPlugin class. |
|
64 * @param aActionRequest Interface enabling to issues request to App UI. |
|
65 */ |
|
66 static CMmFolderUiExtPlugin* NewL( MMmActionRequest& aActionRequest ); |
|
67 |
|
68 /** |
|
69 * Virtual C++ Destructor. |
|
70 */ |
|
71 ~CMmFolderUiExtPlugin(); |
|
72 |
|
73 /** |
|
74 * Executes provided action. |
|
75 * Has to be implemented by each UI extension plugin. |
|
76 * @param aEventParamList Event parameters. |
|
77 * @param aCommand Command to be executed. |
|
78 * @return Error code. |
|
79 */ |
|
80 TInt ExecuteActionL( const TDesC& aCommand, |
|
81 CLiwGenericParamList* aEventParamList ); |
|
82 |
|
83 protected: |
|
84 /** |
|
85 * Default C++ constructor. |
|
86 * @param aActionRequest Interface enabling to issues request to App UI. |
|
87 */ |
|
88 CMmFolderUiExtPlugin( MMmActionRequest& aActionRequest ); |
|
89 |
|
90 /** |
|
91 * Second phase Symbian constructor. |
|
92 */ |
|
93 void ConstructL(); |
|
94 |
|
95 private: |
|
96 /** |
|
97 * Check wheather Menu is in foreground. |
|
98 * @return ETrue if Menu is in foreground, otherwise EFalse; |
|
99 */ |
|
100 TBool IsMatrixInForegroundL(); |
|
101 |
|
102 private: |
|
103 |
|
104 /** |
|
105 * Own. |
|
106 * Pointer to the folder command. |
|
107 */ |
|
108 CMmFolderCommand* iCommand; |
|
109 |
|
110 /** |
|
111 * Not Own. |
|
112 * Reference to the App UI. |
|
113 */ |
|
114 MMmActionRequest& iActionRequest; |
|
115 |
|
116 /** |
|
117 * Own. |
|
118 * Shared resources used in plugins. |
|
119 * Created during first command execution. |
|
120 */ |
|
121 CMmPluginSharedResources* iSharedResources; |
|
122 |
|
123 }; |
|
124 |
|
125 #endif /*MMFOLDERUIEXTPLUGIN_H*/ |
|
126 |
|
127 // End of file |