|
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: Add folder command |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 #ifndef MMFOLDERCOMMANDADD_H |
|
21 #define MMFOLDERCOMMANDADD_H |
|
22 |
|
23 #include <e32base.h> |
|
24 #include "mmfoldercommand.h" |
|
25 |
|
26 |
|
27 /** |
|
28 * Class representing add folder operations |
|
29 * @since S60 v5.0 |
|
30 */ |
|
31 |
|
32 /** |
|
33 * CMmFolderCommandAdd is a class inherits from CMmFolderCommand. |
|
34 * It's responsible for handling command adding folder to MCS. Plugin supports |
|
35 * MMCreateNewFolderCommand command. It displays query, get name and executes |
|
36 * MCS query creating new folder. After successfully folder creation it send |
|
37 * request to HN engine to set focus on added folder. |
|
38 * |
|
39 * @lib mmfolderuiextensionplugin.lib |
|
40 * @since S60 5.0 |
|
41 * @ingroup group_mmfolderuiextensionplugin |
|
42 */ |
|
43 NONSHARABLE_CLASS( CMmFolderCommandAdd ) : public CMmFolderCommand |
|
44 { |
|
45 public: |
|
46 /** |
|
47 * Instantiates an object of this type. |
|
48 * @return Instance of the CMmFolderCommandAdd class. |
|
49 */ |
|
50 static CMmFolderCommandAdd* NewL(); |
|
51 |
|
52 /** |
|
53 * Virtual C++ Destructor. |
|
54 */ |
|
55 ~CMmFolderCommandAdd(); |
|
56 |
|
57 private: |
|
58 |
|
59 /** |
|
60 * Performs add folder operation. |
|
61 * @param aEventParamList List of the event parameters. |
|
62 */ |
|
63 void ExecuteActionL( CLiwGenericParamList* aEventParamList ); |
|
64 |
|
65 /** |
|
66 * Handles notifications caused by an asynchronous Execute*CmdL call |
|
67 * or an event. |
|
68 * @param aCmdId The service command associated to the event. |
|
69 * @param aEventId Occured event, see LiwCommon.hrh. |
|
70 * @param aEventParamList Event parameters, if any, as defined per |
|
71 * each event. |
|
72 * @param aInParamList Input parameters, if any, given in the |
|
73 * related HandleCommmandL. |
|
74 * @return Error code for the callback. |
|
75 */ |
|
76 TInt HandleNotifyL( TInt aCmdId, TInt aEventId, |
|
77 CLiwGenericParamList& aEventParamList, |
|
78 const CLiwGenericParamList& aInParamList ); |
|
79 |
|
80 /** |
|
81 * Handle adding folder, caalled just after the GetList |
|
82 */ |
|
83 void ExecuteAddFolderL(); |
|
84 |
|
85 /** |
|
86 * Creates folder in MCS. |
|
87 * @param aFolder Folder name. |
|
88 */ |
|
89 void CreateFolderL( const TDesC& aFolder ); |
|
90 |
|
91 /** |
|
92 * Default C++ constructor. |
|
93 */ |
|
94 CMmFolderCommandAdd(); |
|
95 |
|
96 /** |
|
97 * Second phase Symbian constructor. |
|
98 */ |
|
99 void ConstructL(); |
|
100 |
|
101 |
|
102 private: |
|
103 |
|
104 /** |
|
105 * Id of the parent folder. |
|
106 */ |
|
107 TInt32 iParent; |
|
108 |
|
109 }; |
|
110 |
|
111 #endif /*MMFOLDERCOMMANDADD_H*/ |
|
112 |
|
113 // End of file |