90 /** |
91 /** |
91 * Moves or copies video to another drive. |
92 * Moves or copies video to another drive. |
92 * |
93 * |
93 * @param aMdsId MDS id of the item to be moved. |
94 * @param aMdsId MDS id of the item to be moved. |
94 * @param aTargetDrive Target drive. |
95 * @param aTargetDrive Target drive. |
95 * @param aMove If ETrue, the source file is deleted. |
96 */ |
96 */ |
97 void MoveOrCopyVideoL( TUint32 aMdsId, TInt aTargetDrive ); |
97 void MoveOrCopyVideoL( TUint32 aMdsId, TInt aTargetDrive, TBool aMove ); |
|
98 |
98 |
99 /** |
99 /** |
100 * Generates and sends resp message for Move,Copy and Delete operations. |
100 * Generates and sends resp message for Move,Copy and Delete operations. |
101 * Does nothing if there is some other operation going on. |
101 * Does nothing if there is some other operation going on. |
102 * This function is called when operation is interrupted from a leave or |
102 * This function is called when operation is interrupted from a leave or |
141 * @param aTargetDrive Target drive. |
141 * @param aTargetDrive Target drive. |
142 */ |
142 */ |
143 void GenerateTargetPathForMoveOrCopyL( |
143 void GenerateTargetPathForMoveOrCopyL( |
144 const TDesC& aSourcePath, TDes& aTargetPath, TInt aTargetDrive ); |
144 const TDesC& aSourcePath, TDes& aTargetPath, TInt aTargetDrive ); |
145 |
145 |
|
146 /** |
|
147 * Initializes member variables for the Copy or Move operations. |
|
148 * |
|
149 * @param aCmd Command received from collection client. |
|
150 */ |
|
151 void InitMoveOrCopyOperationsL( CMPXMedia& aCmd ); |
|
152 |
|
153 /** |
|
154 * Called when file copying completes in Move or Copy operations. |
|
155 * |
|
156 * @param aErr Result code of the file copy. |
|
157 */ |
|
158 void HandleFileCopyCompletedL( TInt aErr ); |
|
159 |
|
160 /** |
|
161 * Initializes MDS and collection cache before the actual file copy. |
|
162 * Does some sanity checks also. |
|
163 * |
|
164 * @param aMdsId MDS ID of the video being moved/copied. |
|
165 * @param aTargetDrive Target drive. |
|
166 */ |
|
167 void InitSingleMoveOrCopyL( TUint32 aMdsId, TInt aTargetDrive ); |
|
168 |
146 public: |
169 public: |
147 |
170 |
148 /** |
171 /** |
149 * Array containing item ids which are being moved/copied or deleted. |
172 * Array containing item ids which are being moved/copied or deleted. |
150 */ |
173 */ |
172 * Target drive for Move or Copy operation. |
195 * Target drive for Move or Copy operation. |
173 */ |
196 */ |
174 TInt iTargetDrive; |
197 TInt iTargetDrive; |
175 |
198 |
176 /** |
199 /** |
|
200 * Set to ETrue if current operation is Move. |
|
201 */ |
|
202 TBool IsMoveOperation; |
|
203 |
|
204 /** |
177 * Owner of this class. |
205 * Owner of this class. |
178 */ |
206 */ |
179 CVcxMyVideosCollectionPlugin& iCollection; |
207 CVcxMyVideosCollectionPlugin& iCollection; |
|
208 |
|
209 /** |
|
210 * Performs single file copy in multiple steps. |
|
211 * Used to avoid long blockings when copying large files. |
|
212 * Own. |
|
213 */ |
|
214 CVcxMyVideosAsyncFileCopy* iFileCopier; |
|
215 |
|
216 /** |
|
217 * New media which is created to collection cache in copy operation. |
|
218 * It is stored in memeber variable in case that file operations |
|
219 * fail and we have to roll MDS and cache back. Own. |
|
220 */ |
|
221 CMPXMedia* iMediaForCopyOp; |
|
222 |
|
223 /** |
|
224 * Updated media which is changed in move operation. |
|
225 * It is stored in memeber variable in case that file operations |
|
226 * fail and we have to roll MDS and cache back. Own. |
|
227 */ |
|
228 CMPXMedia* iMediaForMoveOp; |
|
229 |
|
230 /** |
|
231 * Source path for move or copy operation. |
|
232 */ |
|
233 TFileName iSourcePath; |
|
234 |
|
235 /** |
|
236 * Target path for move or copy operation. |
|
237 */ |
|
238 TFileName iTargetPath; |
|
239 |
|
240 /** |
|
241 * Flag for move operation is stored just to avoid accessing |
|
242 * CMPXMedia object too much. |
|
243 */ |
|
244 TBool iIsMoveOperation; |
180 |
245 |
181 }; |
246 }; |
182 |
247 |
183 #endif // VCXMYVIDEOSASYNCFILEOPERATIONS_H |
248 #endif // VCXMYVIDEOSASYNCFILEOPERATIONS_H |
184 |
249 |