|
1 // Copyright (c) 2006-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 @internalComponent |
|
19 */ |
|
20 |
|
21 #ifndef CMTPFILEDP_H |
|
22 #define CMTPFILEDP_H |
|
23 |
|
24 #include <mtp/cmtpdataproviderplugin.h> |
|
25 |
|
26 #include "mmtpenumerationcallback.h" |
|
27 #include "mtpdebug.h" |
|
28 #include "rmtpfiledpsingletons.h" |
|
29 #include "rmtpdpsingletons.h" |
|
30 |
|
31 class CMTPFileDpExclusionMgr; |
|
32 class CMTPFSEnumerator; |
|
33 class MMTPRequestProcessor; |
|
34 |
|
35 /** |
|
36 Implements the file data provider plugin. |
|
37 @internalComponent |
|
38 |
|
39 */ |
|
40 class CMTPFileDataProvider : |
|
41 public CMTPDataProviderPlugin, |
|
42 public MMTPEnumerationCallback |
|
43 { |
|
44 public: |
|
45 |
|
46 static TAny* NewL(TAny* aParams); |
|
47 ~CMTPFileDataProvider(); |
|
48 |
|
49 private: // From CMTPDataProviderPlugin |
|
50 |
|
51 void Cancel(); |
|
52 void ProcessEventL(const TMTPTypeEvent& aEvent, MMTPConnection& aConnection); |
|
53 void ProcessNotificationL(TMTPNotification aNotification, const TAny* aParams); |
|
54 void ProcessRequestPhaseL(TMTPTransactionPhase aPhase, const TMTPTypeRequest& aRequest, MMTPConnection& aConnection); |
|
55 void StartObjectEnumerationL(TUint32 aStorageId, TBool aPersistentFullEnumeration); |
|
56 void StartStorageEnumerationL(); |
|
57 void Supported(TMTPSupportCategory aCategory, RArray<TUint>& aArray) const; |
|
58 |
|
59 private: // From MMTPEnumerationCallback |
|
60 |
|
61 void NotifyEnumerationCompleteL(TUint32 aStorageId, TInt aError); |
|
62 |
|
63 private: |
|
64 |
|
65 CMTPFileDataProvider(TAny* aParams); |
|
66 void ConstructL(); |
|
67 |
|
68 TInt LocateRequestProcessorL(const TMTPTypeRequest& aRequest, MMTPConnection& aConnection); |
|
69 TInt LocateRequestProcessorL(const TMTPTypeEvent& aEvent, MMTPConnection& aConnection); |
|
70 void SessionClosedL(const TMTPNotificationParamsSessionChange& aSession); |
|
71 void SessionOpenedL(const TMTPNotificationParamsSessionChange& aSession); |
|
72 |
|
73 /** |
|
74 * [SP-Format-0x3002]Special processing for PictBridge DP which own 6 dps file with format 0x3002, |
|
75 * but it does not really own the format 0x3002. |
|
76 * |
|
77 * Check whether the Pictbridgedp exists or not. |
|
78 */ |
|
79 TBool PictbridgeDpExistL() const; |
|
80 static void ImplementationsCleanup(TAny* aData); |
|
81 |
|
82 private: |
|
83 /** |
|
84 FLOGGER debug trace member variable. |
|
85 */ |
|
86 __FLOG_DECLARATION_MEMBER_MUTABLE; |
|
87 |
|
88 /** |
|
89 The active request processors table. |
|
90 */ |
|
91 RPointerArray<MMTPRequestProcessor> iActiveProcessors; |
|
92 |
|
93 /** |
|
94 The storage enumerator. |
|
95 */ |
|
96 CMTPFSEnumerator* iFileEnumerator; |
|
97 |
|
98 /** |
|
99 The file dp exclusion manager. |
|
100 */ |
|
101 CMTPFileDpExclusionMgr* iExclusionMgr; |
|
102 |
|
103 /** |
|
104 The list of storages to be enumerated. |
|
105 */ |
|
106 RArray<TUint32> iPendingEnumerations; |
|
107 |
|
108 /** |
|
109 File data provider singletons |
|
110 */ |
|
111 RMTPFileDpSingletons iFileDPSingletons; |
|
112 |
|
113 /** |
|
114 DP utility singletons |
|
115 */ |
|
116 RMTPDpSingletons iDpSingletons; |
|
117 |
|
118 TInt iActiveProcessor; |
|
119 TBool iActiveProcessorRemoved; |
|
120 |
|
121 }; |
|
122 |
|
123 #endif // CMTPFILEDP_H |