|
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 object prop value |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef CGETOBJECTPROPVALUE_H |
|
20 #define CGETOBJECTPROPVALUE_H |
|
21 |
|
22 #include "crequestprocessor.h" |
|
23 |
|
24 // forward declaration |
|
25 class TMTPTypeUint8; |
|
26 class TMTPTypeUint16; |
|
27 class TMTPTypeUint32; |
|
28 class TMTPTypeUint64; |
|
29 class TMTPTypeUint128; |
|
30 class CMTPTypeString; |
|
31 class CMTPTypeArray; |
|
32 class TMTPObjectInfo; |
|
33 class MMmMtpDpConfig; |
|
34 |
|
35 |
|
36 /** |
|
37 * Defines GetObjectPropValue request processor |
|
38 */ |
|
39 class CGetObjectPropValue : public CRequestProcessor |
|
40 { |
|
41 public: |
|
42 /** |
|
43 * Two-phase construction method |
|
44 * @param aFramework The data provider framework |
|
45 * @param aConnection The connection from which the request comes |
|
46 * @param aWrapper medadata access interface |
|
47 * @return a pointer to the created request processor object |
|
48 */ |
|
49 //IMPORT_C static MMmRequestProcessor* NewL( MMTPDataProviderFramework& aFramework, MMTPConnection& aConnection, CMmMtpDpMetadataAccessWrapper& aWrapper ); |
|
50 |
|
51 /** |
|
52 * Destructor |
|
53 */ |
|
54 IMPORT_C virtual ~CGetObjectPropValue(); |
|
55 |
|
56 protected: |
|
57 /** |
|
58 * Standard c++ constructor |
|
59 * @param aFramework The data provider framework |
|
60 * @param aConnection The connection from which the request comes |
|
61 * @param aWrapper medadata access interface |
|
62 */ |
|
63 IMPORT_C CGetObjectPropValue( MMTPDataProviderFramework& aFramework, |
|
64 MMTPConnection& aConnection, |
|
65 MMmMtpDpConfig& aDpConfig ); |
|
66 |
|
67 protected: |
|
68 //from CRequestProcessor |
|
69 /** |
|
70 * Verify the reqeust |
|
71 * @return EMTPRespCodeOK if request is verified, otherwise one of |
|
72 * the error response codes |
|
73 */ |
|
74 IMPORT_C TMTPResponseCode CheckRequestL(); |
|
75 |
|
76 /** |
|
77 * GetObjectPropValue request handler |
|
78 */ |
|
79 IMPORT_C void ServiceL(); |
|
80 |
|
81 protected: |
|
82 // new virtuals |
|
83 virtual void ServiceSpecificObjectPropertyL( TUint16 aPropCode ) = 0; |
|
84 |
|
85 protected: |
|
86 /** |
|
87 * Get MetaData from CMetadataAccessWrapper and send data |
|
88 * or response to initiator. for internal use |
|
89 * @param aPropCode, specify property code of aMediaProp |
|
90 * @param aNewData, object property value which will be get from |
|
91 * aObjectMetaData |
|
92 * @param aObjectMetaData, owner of the property which should be |
|
93 * inserted or updated into database |
|
94 * @return void |
|
95 */ |
|
96 IMPORT_C void ServiceMetaDataFromWrapperL( const TUint16 aPropCode, |
|
97 MMTPType& aNewData, |
|
98 const CMTPObjectMetaData& aObjectMetaData ); |
|
99 |
|
100 protected: |
|
101 // object which is prepare for PC |
|
102 CMTPObjectMetaData* iObjectInfo; |
|
103 |
|
104 MMmMtpDpConfig& iDpConfig; |
|
105 TMTPTypeUint8 iMTPTypeUint8; |
|
106 TMTPTypeUint16 iMTPTypeUint16; |
|
107 TMTPTypeUint32 iMTPTypeUint32; |
|
108 TMTPTypeUint64 iMTPTypeUint64; |
|
109 TMTPTypeUint128 iMTPTypeUint128; |
|
110 CMTPTypeString* iMTPTypeString; |
|
111 CMTPTypeArray* iMTPTypeArray; |
|
112 |
|
113 }; |
|
114 |
|
115 #endif // CGETOBJECTPROPVALUE_H |