|
1 // Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). |
|
2 // All rights reserved. |
|
3 // This component and the accompanying materials are made available |
|
4 // under the terms of "Eclipse Public License v1.0" |
|
5 // which accompanies this distribution, and is available |
|
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
7 // |
|
8 // Initial Contributors: |
|
9 // Nokia Corporation - initial contribution. |
|
10 // |
|
11 // Contributors: |
|
12 // |
|
13 // Description: |
|
14 // |
|
15 |
|
16 /** |
|
17 @file |
|
18 @internalTechnology |
|
19 */ |
|
20 |
|
21 #ifndef CMTPIMAGEDPDELETEOBJECT_H |
|
22 #define CMTPIMAGEDPDELETEOBJECT_H |
|
23 |
|
24 #include <badesca.h> |
|
25 #include <f32file.h> |
|
26 |
|
27 #include "cmtprequestprocessor.h" |
|
28 |
|
29 class MMTPObjectMgr; |
|
30 class CMTPImageDataProvider; |
|
31 class CMTPImageDpObjectPropertyMgr; |
|
32 /** |
|
33 Defines data provider GetObject request processor. |
|
34 @internalComponent |
|
35 */ |
|
36 class CMTPImageDpDeleteObject : public CMTPRequestProcessor |
|
37 { |
|
38 public: |
|
39 |
|
40 static MMTPRequestProcessor* NewL(MMTPDataProviderFramework& aFramework, MMTPConnection& aConnection,CMTPImageDataProvider& aDataProvider); |
|
41 ~CMTPImageDpDeleteObject(); |
|
42 |
|
43 private: // From CMTPRequestProcessor |
|
44 |
|
45 TMTPResponseCode CheckRequestL(); |
|
46 void ServiceL(); |
|
47 |
|
48 /** |
|
49 * AO Run method, deletes a selection of files on the system |
|
50 */ |
|
51 void RunL(); |
|
52 |
|
53 /** |
|
54 * Used to cancel the deletion of the files |
|
55 */ |
|
56 void DoCancel(); |
|
57 |
|
58 private: |
|
59 |
|
60 CMTPImageDpDeleteObject(MMTPDataProviderFramework& aFramework, MMTPConnection& aConnection,CMTPImageDataProvider& aDataProvider); |
|
61 void ConstructL(); |
|
62 TMTPResponseCode CheckStorageL(TUint32 aObjectHandle); |
|
63 |
|
64 /** |
|
65 * Gets all object handles (for GetObjectHandlesL) |
|
66 */ |
|
67 void GetObjectHandlesL( TUint32 aStorageId, TUint32 aFormatCode, TUint32 aParentHandle ); |
|
68 |
|
69 /** |
|
70 * Deletes an object from the file system and the object store |
|
71 */ |
|
72 void DeleteObjectL( TUint32 aHandle ); |
|
73 |
|
74 /** |
|
75 AO start |
|
76 */ |
|
77 void StartL(); |
|
78 |
|
79 /** |
|
80 Send response to PC |
|
81 */ |
|
82 void SendResponseL(); |
|
83 |
|
84 private: |
|
85 |
|
86 /** |
|
87 FLOGGER debug trace member variable. |
|
88 */ |
|
89 __FLOG_DECLARATION_MEMBER_MUTABLE; |
|
90 |
|
91 CMTPImageDataProvider& iDataProvider; |
|
92 CMTPObjectMetaData* iObjectMeta; |
|
93 |
|
94 /** |
|
95 Array of all the objects to delete |
|
96 */ |
|
97 RArray<TUint> iObjectsToDelete; |
|
98 |
|
99 /** |
|
100 The response code |
|
101 */ |
|
102 TMTPResponseCode iResponseCode; |
|
103 |
|
104 /** |
|
105 The number of Objects to delete |
|
106 */ |
|
107 TInt iObjectsNotDelete; |
|
108 }; |
|
109 |
|
110 #endif //CMTPIMAGEDPDELETEOBJECT_H |
|
111 |