|
1 /* |
|
2 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: Get Format Capabilities operation |
|
15 * |
|
16 */ |
|
17 #ifndef CGETFORMATCAPABILITLIST_H |
|
18 #define CGETFORMATCAPABILITLIST_H |
|
19 |
|
20 #include <mtp/cmtptypeformatcapabilitylist.h> |
|
21 |
|
22 #include "crequestprocessor.h" |
|
23 #include "mmmtpdplogger.h" |
|
24 #include "mmmtpdpconfig.h" |
|
25 |
|
26 // forward declaration |
|
27 class MMTPRequestProcessor; |
|
28 class MMmMtpDpConfig; |
|
29 class CMTPTypeObjectPropDesc; |
|
30 class CMTPTypeInterdependentPropDesc; |
|
31 class CMTPTypeObjectPropDesc; |
|
32 class CMTPTypeString; |
|
33 |
|
34 /** |
|
35 Implements the file data provider CMTPGetFormatCapabilities request processor. |
|
36 @internalComponent |
|
37 */ |
|
38 class CGetFormatCapabilities : public CRequestProcessor |
|
39 { |
|
40 public: |
|
41 /** |
|
42 * Destructor |
|
43 */ |
|
44 IMPORT_C virtual ~CGetFormatCapabilities(); |
|
45 |
|
46 protected: |
|
47 /** |
|
48 * Standard c++ constructor |
|
49 * @param aFramework The data provider framework |
|
50 * @param aConnection The connection from which the request comes |
|
51 * @param aDpConfig, The interface of dataprovider configuration |
|
52 */ |
|
53 IMPORT_C CGetFormatCapabilities( MMTPDataProviderFramework& aFramework, |
|
54 MMTPConnection& aConnection, |
|
55 MMmMtpDpConfig& aDpConfig ); |
|
56 |
|
57 /** |
|
58 * Constructor |
|
59 * Second phase constructor |
|
60 */ |
|
61 IMPORT_C void ConstructL(); |
|
62 |
|
63 protected: |
|
64 // from CMTPRequestProcessor |
|
65 /** |
|
66 * CGetFormatCapabilities request handler |
|
67 */ |
|
68 IMPORT_C void ServiceL(); |
|
69 |
|
70 /** |
|
71 * Check the current request |
|
72 * @return EMTPRespCodeOK if the reqeust is good, otherwise, |
|
73 * one of the error response codes |
|
74 */ |
|
75 IMPORT_C TMTPResponseCode CheckRequestL(); |
|
76 |
|
77 protected: |
|
78 // new virtuals |
|
79 /** |
|
80 * Service specific object property |
|
81 * @param aPropCode, The prop code |
|
82 * @return MTPType object propdesc |
|
83 */ |
|
84 virtual CMTPTypeObjectPropDesc* ServiceSpecificPropertyDescL( TUint16 aPropCode ) = 0; |
|
85 |
|
86 /** |
|
87 * Service interdepent propdesc |
|
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 |
|
97 * @return The MTPTypeObject PropDesc |
|
98 */ |
|
99 CMTPTypeObjectPropDesc* ServicePropDescL( TUint16 aPropCode ); |
|
100 |
|
101 /** |
|
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 /* |
|
128 * Format code. |
|
129 */ |
|
130 TUint iFormatCode; |
|
131 |
|
132 CMTPTypeInterdependentPropDesc* iInterdependentPropDesc; |
|
133 |
|
134 private: // Owned |
|
135 /* |
|
136 * CMTPTypeCapabilityList dataset. |
|
137 */ |
|
138 CMTPTypeFormatCapabilityList* iCapabilityList; |
|
139 |
|
140 /* |
|
141 * MMmMtpDpConfig. |
|
142 */ |
|
143 MMmMtpDpConfig& iDpConfig; |
|
144 }; |
|
145 |
|
146 #endif // CMTPGETFORMATCAPABILITLIST_H |