9 * Initial Contributors: |
9 * Initial Contributors: |
10 * Nokia Corporation - initial contribution. |
10 * Nokia Corporation - initial contribution. |
11 * |
11 * |
12 * Contributors: |
12 * Contributors: |
13 * |
13 * |
14 * Description: Get object properties descript operation |
14 * Description: Request processor which handle common property description |
15 * |
15 * |
16 */ |
16 */ |
17 |
|
18 |
17 |
19 #ifndef CGETOBJECTPROPDESC_H |
18 #ifndef CGETOBJECTPROPDESC_H |
20 #define CGETOBJECTPROPDESC_H |
19 #define CGETOBJECTPROPDESC_H |
21 |
20 |
22 #include "crequestprocessor.h" |
21 #include "crequestprocessor.h" |
30 */ |
29 */ |
31 class CGetObjectPropDesc : public CRequestProcessor |
30 class CGetObjectPropDesc : public CRequestProcessor |
32 { |
31 { |
33 public: |
32 public: |
34 /** |
33 /** |
|
34 * Two-phase construction method |
|
35 * @param aFramework The data provider framework |
|
36 * @param aConnection The connection from which the request comes |
|
37 * @param aDpConfig Configuration of data provider |
|
38 * @return The pointer to the created request processor object |
|
39 */ |
|
40 IMPORT_C static MMmRequestProcessor* NewL( MMTPDataProviderFramework& aFramework, |
|
41 MMTPConnection& aConnection, |
|
42 MMmMtpDpConfig& aDpConfig ); |
|
43 |
|
44 /** |
35 * Destructor |
45 * Destructor |
36 */ |
46 */ |
37 IMPORT_C virtual ~CGetObjectPropDesc(); |
47 IMPORT_C virtual ~CGetObjectPropDesc(); |
38 |
48 |
39 protected: |
49 private: |
40 /** |
50 /** |
41 * Standard c++ constructor |
51 * Standard c++ constructor |
42 * @param aFramework The data provider framework |
52 * @param aFramework The data provider framework |
43 * @param aConnection The connection from which the request comes |
53 * @param aConnection The connection from which the request comes |
44 * @param aWrapper Medadata access interface |
54 * @param aWrapper Medadata access interface |
45 */ |
55 */ |
46 IMPORT_C CGetObjectPropDesc( MMTPDataProviderFramework& aFramework, |
56 CGetObjectPropDesc( MMTPDataProviderFramework& aFramework, |
47 MMTPConnection& aConnection, |
57 MMTPConnection& aConnection, |
48 MMmMtpDpConfig& aDpConfig ); |
58 MMmMtpDpConfig& aDpConfig ); |
49 |
59 |
50 /** |
60 /** |
51 * Second phase constructor |
61 * Second phase constructor |
52 */ |
62 */ |
53 IMPORT_C void ConstructL(); |
63 void ConstructL(); |
54 |
64 |
55 protected: |
65 protected: |
56 //from CRequestProcessor |
66 // from CRequestProcessor |
57 /** |
|
58 * GetObjectPropDesc request handler |
|
59 */ |
|
60 IMPORT_C void ServiceL(); |
|
61 |
|
62 /** |
67 /** |
63 * Check the current request |
68 * Check the current request |
64 * @return EMTPRespCodeOK if the reqeust is good, otherwise, |
69 * @return EMTPRespCodeOK if the reqeust is good, otherwise, |
65 * one of the error response codes |
70 * one of the error response codes |
66 */ |
71 */ |
67 IMPORT_C TMTPResponseCode CheckRequestL(); |
72 IMPORT_C TMTPResponseCode CheckRequestL(); |
68 |
73 |
69 protected: |
74 /** |
70 // new virtuals |
75 * GetObjectPropDesc request handler |
71 virtual void ServiceSpecificObjectPropertyL( TUint16 aPropCode ) = 0; |
76 */ |
|
77 IMPORT_C void ServiceL(); |
72 |
78 |
73 private: |
79 private: |
74 /** |
80 /** |
75 * Ensures the object format operation parameter is valid |
81 * Ensures the object format operation parameter is valid |
76 * (done for CheckRequestL) |
82 * (done for CheckRequestL) |
83 * (done for CheckRequestL) |
89 * (done for CheckRequestL) |
84 * @return Response code of the check |
90 * @return Response code of the check |
85 */ |
91 */ |
86 TMTPResponseCode CheckPropCodeL() const; |
92 TMTPResponseCode CheckPropCodeL() const; |
87 |
93 |
88 /** |
94 private: |
89 * Create list of possible protection status and create new ObjectPropDesc |
95 TUint iFormatCode; |
90 */ |
|
91 void ServiceProtectionStatusL(); |
|
92 |
|
93 /** |
|
94 * Create Regular expression for a file name and create new ObjectPropDesc |
|
95 */ |
|
96 void ServiceFileNameL(); |
|
97 |
|
98 /** |
|
99 * Create list of possible nonConsumable values and create new ObjectPropDesc |
|
100 */ |
|
101 void ServiceNonConsumableL(); |
|
102 |
|
103 /* |
|
104 * Get group code according to property code |
|
105 * @param aPropCode Specify the property code of which the group code needed |
|
106 * @return Group code of specified property |
|
107 */ |
|
108 TUint32 GetGroupCode( TUint16 aPropCode ); |
|
109 |
|
110 |
|
111 protected: |
|
112 // Property object to return with the desc value |
|
113 CMTPTypeObjectPropDesc* iObjectProperty; |
|
114 |
|
115 //Format code |
|
116 TUint32 iFormatCode; |
|
117 |
96 |
118 MMmMtpDpConfig& iDpConfig; |
97 MMmMtpDpConfig& iDpConfig; |
|
98 |
|
99 TUint iPropCode; |
|
100 |
|
101 // property description |
|
102 CMTPTypeObjectPropDesc* iPropertyDesc; |
|
103 |
119 }; |
104 }; |
120 |
105 |
121 #endif // CGETOBJECTPROPDESC_H |
106 #endif // CGETOBJECTPROPDESC_H |