|
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 operation |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef CGETOBJECT_H |
|
20 #define CGETOBJECT_H |
|
21 |
|
22 #include "crequestprocessor.h" |
|
23 |
|
24 // forward declaration |
|
25 class RFs; |
|
26 class CMTPTypeFile; |
|
27 class MMmMtpDpConfig; |
|
28 |
|
29 /** |
|
30 * Defines GetObject request processor |
|
31 */ |
|
32 class CGetObject : public CRequestProcessor |
|
33 { |
|
34 public: |
|
35 /** |
|
36 * Two-phase construction method |
|
37 * @param aFramework The data provider framework |
|
38 * @param aConnection The connection from which the request comes |
|
39 * @param aWrapper medadata access interface |
|
40 * @return a pointer to the created request processor object |
|
41 */ |
|
42 IMPORT_C static MMmRequestProcessor* NewL( MMTPDataProviderFramework& aFramework, |
|
43 MMTPConnection& aConnection, |
|
44 MMmMtpDpConfig& aDpConfig ); |
|
45 |
|
46 /** |
|
47 * Destructor |
|
48 */ |
|
49 IMPORT_C ~CGetObject(); |
|
50 |
|
51 protected: |
|
52 // from CRequestProcessor |
|
53 /** |
|
54 * GetObject request handler |
|
55 */ |
|
56 void ServiceL(); |
|
57 |
|
58 /** |
|
59 * Handle the response phase of the current request |
|
60 * @return EFalse |
|
61 */ |
|
62 TBool DoHandleResponsePhaseL(); |
|
63 |
|
64 /** |
|
65 * Two-phase construction |
|
66 */ |
|
67 void ConstructL(); |
|
68 |
|
69 private: |
|
70 /** |
|
71 * Standard c++ constructor |
|
72 * @param aFramework The data provider framework |
|
73 * @param aConnection The connection from which the request comes |
|
74 */ |
|
75 CGetObject( MMTPDataProviderFramework& aFramework, |
|
76 MMTPConnection& aConnection ); |
|
77 |
|
78 void GetObjectL( const TDesC& aFileName ); |
|
79 |
|
80 private: |
|
81 // File server used to open the database |
|
82 RFs& iFs; |
|
83 |
|
84 // File Object to encapsulate the object to send back |
|
85 CMTPTypeFile* iFileObject; |
|
86 |
|
87 // Object Info |
|
88 CMTPObjectMetaData* iObjectInfo; |
|
89 |
|
90 // |
|
91 TMTPResponseCode iError; |
|
92 }; |
|
93 |
|
94 #endif // CGETOBJECT_H |