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