18 #define CGETFORMATCAPABILITLIST_H |
18 #define CGETFORMATCAPABILITLIST_H |
19 |
19 |
20 #include <mtp/cmtptypeformatcapabilitylist.h> |
20 #include <mtp/cmtptypeformatcapabilitylist.h> |
21 |
21 |
22 #include "crequestprocessor.h" |
22 #include "crequestprocessor.h" |
23 #include "mmmtpdplogger.h" |
|
24 #include "mmmtpdpconfig.h" |
|
25 |
23 |
26 // forward declaration |
24 // forward declaration |
27 class MMTPRequestProcessor; |
|
28 class MMmMtpDpConfig; |
25 class MMmMtpDpConfig; |
29 class CMTPTypeObjectPropDesc; |
26 class CMTPTypeObjectPropDesc; |
30 class CMTPTypeInterdependentPropDesc; |
27 class CMTPTypeInterdependentPropDesc; |
31 class CMTPTypeObjectPropDesc; |
|
32 class CMTPTypeString; |
|
33 |
28 |
34 /** |
29 /** |
35 Implements the file data provider CMTPGetFormatCapabilities request processor. |
30 Implements the file data provider CMTPGetFormatCapabilities request processor. |
36 @internalComponent |
31 @internalComponent |
37 */ |
32 */ |
38 class CGetFormatCapabilities : public CRequestProcessor |
33 class CGetFormatCapabilities : public CRequestProcessor |
39 { |
34 { |
40 public: |
35 public: |
41 /** |
36 /** |
|
37 * Two-phase construction method |
|
38 * @param aFramework The data provider framework |
|
39 * @param aConnection The connection from which the request comes |
|
40 * @param aDpConfig Configuration of data provider |
|
41 * @return The pointer to the created request processor object |
|
42 */ |
|
43 IMPORT_C static MMmRequestProcessor* NewL( MMTPDataProviderFramework& aFramework, |
|
44 MMTPConnection& aConnection, |
|
45 MMmMtpDpConfig& aDpConfig ); |
|
46 |
|
47 /** |
42 * Destructor |
48 * Destructor |
43 */ |
49 */ |
44 IMPORT_C virtual ~CGetFormatCapabilities(); |
50 IMPORT_C virtual ~CGetFormatCapabilities(); |
45 |
51 |
46 protected: |
52 private: |
47 /** |
53 /** |
48 * Standard c++ constructor |
54 * Standard c++ constructor |
49 * @param aFramework The data provider framework |
55 * @param aFramework The data provider framework |
50 * @param aConnection The connection from which the request comes |
56 * @param aConnection The connection from which the request comes |
51 * @param aDpConfig, The interface of dataprovider configuration |
57 * @param aDpConfig, The interface of dataprovider configuration |
52 */ |
58 */ |
53 IMPORT_C CGetFormatCapabilities( MMTPDataProviderFramework& aFramework, |
59 CGetFormatCapabilities( MMTPDataProviderFramework& aFramework, |
54 MMTPConnection& aConnection, |
60 MMTPConnection& aConnection, |
55 MMmMtpDpConfig& aDpConfig ); |
61 MMmMtpDpConfig& aDpConfig ); |
56 |
62 |
57 /** |
63 /** |
58 * Constructor |
64 * Constructor |
59 * Second phase constructor |
65 * Second phase constructor |
60 */ |
66 */ |
61 IMPORT_C void ConstructL(); |
67 void ConstructL(); |
62 |
68 |
63 protected: |
69 protected: |
64 // from CMTPRequestProcessor |
70 // from CMTPRequestProcessor |
65 /** |
71 /** |
66 * CGetFormatCapabilities request handler |
72 * CGetFormatCapabilities request handler |
72 * @return EMTPRespCodeOK if the reqeust is good, otherwise, |
78 * @return EMTPRespCodeOK if the reqeust is good, otherwise, |
73 * one of the error response codes |
79 * one of the error response codes |
74 */ |
80 */ |
75 IMPORT_C TMTPResponseCode CheckRequestL(); |
81 IMPORT_C TMTPResponseCode CheckRequestL(); |
76 |
82 |
77 protected: |
83 private: |
78 // new virtuals |
|
79 /** |
84 /** |
80 * Service specific object property |
85 * Handle one format's capabilities |
81 * @param aPropCode, The prop code |
86 */ |
82 * @return MTPType object propdesc |
87 void ServiceOneFormatCapabilitiesL( TUint aFormatCode ); |
83 */ |
|
84 virtual CMTPTypeObjectPropDesc* ServiceSpecificPropertyDescL( TUint16 aPropCode ) = 0; |
|
85 |
88 |
86 /** |
89 /** |
87 * Service interdepent propdesc |
90 * Handle one property description of one format |
88 * @param aFormatCode, The format code |
|
89 * @return MTPTypeInterdependentPropDesc |
|
90 */ |
|
91 virtual void ServiceInterdepentPropDescL() = 0; |
|
92 |
|
93 private: |
|
94 /** |
|
95 * Get PropDesc via PropCode |
|
96 * @param aPropCode The Property Code |
91 * @param aPropCode The Property Code |
97 * @return The MTPTypeObject PropDesc |
92 * @return The MTPTypeObject PropDesc |
98 */ |
93 */ |
99 CMTPTypeObjectPropDesc* ServicePropDescL( TUint16 aPropCode ); |
94 CMTPTypeObjectPropDesc* ServiceOnePropDescL( TUint16 aPropCode ); |
100 |
95 |
101 /** |
96 private: |
102 * Get PropDesc with Protection status |
|
103 * @return The MTPTypeObject PropDesc |
|
104 */ |
|
105 CMTPTypeObjectPropDesc* ServiceProtectionStatusL(); |
|
106 |
|
107 /** |
|
108 * Get PropDesc with file name |
|
109 * @return The MTPTypeObject PropDesc |
|
110 */ |
|
111 CMTPTypeObjectPropDesc* ServiceFileNameL(); |
|
112 |
|
113 /** |
|
114 * Get PropDesc with nonconsumable |
|
115 * @return The MTPTypeObject PropDesc |
|
116 */ |
|
117 CMTPTypeObjectPropDesc* ServiceNonConsumableL(); |
|
118 |
|
119 /** |
|
120 * Get group code |
|
121 * @param aPropCode Specify the property code of which the group code needed |
|
122 * @return Group code of specified property |
|
123 */ |
|
124 TUint32 GetGroupCode( TUint32 aPropCode ); |
|
125 |
|
126 protected: |
|
127 /* |
97 /* |
128 * Format code. |
98 * Format code. |
129 */ |
99 */ |
130 TUint iFormatCode; |
100 TUint iFormatCode; |
131 |
101 |
132 CMTPTypeInterdependentPropDesc* iInterdependentPropDesc; |
102 /* |
|
103 * MMmMtpDpConfig. |
|
104 */ |
|
105 MMmMtpDpConfig& iDpConfig; |
133 |
106 |
134 private: // Owned |
|
135 /* |
107 /* |
136 * CMTPTypeCapabilityList dataset. |
108 * CMTPTypeCapabilityList dataset. |
137 */ |
109 */ |
138 CMTPTypeFormatCapabilityList* iCapabilityList; |
110 CMTPTypeFormatCapabilityList* iCapabilityList; |
139 |
111 |
140 /* |
|
141 * MMmMtpDpConfig. |
|
142 */ |
|
143 MMmMtpDpConfig& iDpConfig; |
|
144 }; |
112 }; |
145 |
113 |
146 #endif // CMTPGETFORMATCAPABILITLIST_H |
114 #endif // CMTPGETFORMATCAPABILITLIST_H |