|
1 /* |
|
2 * Copyright (c) 2002-2007 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: Defines an interface for handling engine events |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 #ifndef MFILEMANAGERPROCESSOBSERVER_H |
|
21 #define MFILEMANAGERPROCESSOBSERVER_H |
|
22 |
|
23 class MAknBackgroundProcess; |
|
24 |
|
25 |
|
26 // CLASS DECLARATION |
|
27 /** |
|
28 * Defines an interface for handling engine events. |
|
29 * |
|
30 * @since 2.0 |
|
31 */ |
|
32 class MFileManagerProcessObserver |
|
33 { |
|
34 public: |
|
35 /* Process which is observed*/ |
|
36 enum TFileManagerProcess |
|
37 { |
|
38 ENoProcess = 0, |
|
39 ECopyProcess, |
|
40 EMoveProcess, |
|
41 EIRReceiveProcess, |
|
42 EDeleteProcess, |
|
43 EFormatProcess, |
|
44 EBackupProcess, |
|
45 ERestoreProcess, |
|
46 EEjectProcess, |
|
47 ESchBackupProcess, |
|
48 EFileOpenProcess |
|
49 }; |
|
50 |
|
51 /** Event which is notified */ |
|
52 enum TFileManagerNotify |
|
53 { |
|
54 ENotifyActionSelected = 0, // Action item is selected |
|
55 ENotifyDisksChanged, // Disk state changes (disk added, removed etc) |
|
56 ENotifyBackupMemoryLow, // Low memory for storing backup data |
|
57 ENotifyForcedFormat, // Forced format |
|
58 ENotifyFileOpenDenied // File open denied (DRM checks before open etc) |
|
59 }; |
|
60 |
|
61 /** |
|
62 * Start the refresh process |
|
63 * @since 2.0 |
|
64 */ |
|
65 virtual void RefreshStartedL() = 0; |
|
66 |
|
67 /** |
|
68 * Stops the refresh process |
|
69 * @since 2.0 |
|
70 */ |
|
71 virtual void RefreshStoppedL() = 0; |
|
72 |
|
73 /** |
|
74 * Process has been started |
|
75 * @since 2.0 |
|
76 * @param aProcess Started process |
|
77 * @param aFinalValue Executed progress final value |
|
78 */ |
|
79 virtual void ProcessStartedL( |
|
80 TFileManagerProcess aProcess, |
|
81 TInt aFinalValue = 0 ) = 0; |
|
82 |
|
83 /** |
|
84 * Process finished |
|
85 * @since 2.0 |
|
86 * @param aError Finish status |
|
87 * @param aName Finish status related text |
|
88 */ |
|
89 virtual void ProcessFinishedL( |
|
90 TInt aError, const TDesC& aName = KNullDesC ) = 0; |
|
91 |
|
92 /** |
|
93 * During execution of process bytes (file copy) or |
|
94 * percentage (Infrared file receiving) |
|
95 * is updated via this method |
|
96 * @since 2.0 |
|
97 * @param aValue Execution progress related value |
|
98 */ |
|
99 virtual void ProcessAdvanceL( TInt aValue ) = 0; |
|
100 |
|
101 /** |
|
102 * Query file overwrite from user |
|
103 * @since 2.0 |
|
104 * @param aOldFileName old name of the item |
|
105 * @param aNewFileName new name of the item |
|
106 * @param aProcess Move or Copy in progress |
|
107 * @return ETrue if user want's to overwrite the name, EFalse if not |
|
108 */ |
|
109 virtual TBool ProcessQueryOverWriteL( |
|
110 const TDesC& aOldFileName, |
|
111 TDes& aNewFileName, |
|
112 TFileManagerProcess aProcess ) = 0; |
|
113 |
|
114 /** |
|
115 * Query rename item from user |
|
116 * @param aOldFileName old name of the item |
|
117 * @param aNewFileName new name of the item |
|
118 * @param aProcess Move or Copy in progress |
|
119 * @since 2.0 |
|
120 * @return ETrue if user want's to change the name, EFalse if not |
|
121 */ |
|
122 virtual TBool ProcessQueryRenameL( |
|
123 const TDesC& aOldFileName, |
|
124 TDes& aNewFileName, |
|
125 TFileManagerProcess aProcess ) = 0; |
|
126 |
|
127 /** |
|
128 * Creates and displays wait note |
|
129 * @since 2.0 |
|
130 * @param aProcess reference to object which implements |
|
131 * the Wait Note Wrapper API |
|
132 */ |
|
133 virtual void ShowWaitDialogL( MAknBackgroundProcess& aProcess ) = 0; |
|
134 |
|
135 /** |
|
136 * Engine reports that there is an error |
|
137 * @param aError error code |
|
138 * @since 2.0 |
|
139 */ |
|
140 virtual void Error( TInt aError ) = 0; |
|
141 |
|
142 /** |
|
143 * Handles engine notification |
|
144 * @since 3.1 |
|
145 * @param aType Notification type |
|
146 * @param aData Notification related data |
|
147 * @param aName Notification related text |
|
148 * @return A notification related value |
|
149 */ |
|
150 virtual TInt NotifyL( |
|
151 TFileManagerNotify aType, |
|
152 TInt aData = 0, |
|
153 const TDesC& aName = KNullDesC ) = 0; |
|
154 |
|
155 }; |
|
156 |
|
157 #endif // MFILEMANAGERPROCESSOBSERVER_H |
|
158 |
|
159 // End of File |