|
1 // Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies). |
|
2 // All rights reserved. |
|
3 // This component and the accompanying materials are made available |
|
4 // under the terms of "Eclipse Public License v1.0" |
|
5 // which accompanies this distribution, and is available |
|
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
7 // |
|
8 // Initial Contributors: |
|
9 // Nokia Corporation - initial contribution. |
|
10 // |
|
11 // Contributors: |
|
12 // |
|
13 // Description: |
|
14 // |
|
15 |
|
16 /** |
|
17 @file |
|
18 @internalTechnology |
|
19 */ |
|
20 |
|
21 #ifndef CMTPCOMMONREQUESTPROCESSOR_H |
|
22 #define CMTPCOMMONREQUESTPROCESSOR_H |
|
23 |
|
24 #include <mtp/cmtptypetrivialdata.h> |
|
25 #include "cmtprequestprocessor.h" |
|
26 |
|
27 |
|
28 /** |
|
29 Defines generic file system object CMTPCommonRequestProcessor request processor. |
|
30 @internalTechnology |
|
31 */ |
|
32 class CMTPCommonRequestProcessor : public CMTPRequestProcessor |
|
33 { |
|
34 public: |
|
35 |
|
36 template<TMTPResponseCode RESPCODE, TBool HASITORDATA> |
|
37 static MMTPRequestProcessor* NewL(MMTPDataProviderFramework& aFramework, MMTPConnection& aConnection); |
|
38 IMPORT_C static MMTPRequestProcessor* NewL(MMTPDataProviderFramework& aFramework, MMTPConnection& aConnection, TMTPResponseCode aResponseCode, TBool aHasIToRDataPhase); |
|
39 IMPORT_C ~CMTPCommonRequestProcessor(); |
|
40 |
|
41 private: |
|
42 |
|
43 CMTPCommonRequestProcessor(MMTPDataProviderFramework& aFramework, MMTPConnection& aConnection, TMTPResponseCode aResponseCode, TBool aHasIToRDataPhase); |
|
44 void ConstructL(); |
|
45 |
|
46 private: // From CMTPRequestProcessor |
|
47 virtual void ServiceL(); |
|
48 virtual TBool DoHandleResponsePhaseL(); |
|
49 virtual TBool HasDataphase() const; |
|
50 |
|
51 private: |
|
52 TMTPResponseCode iResponseCode; |
|
53 TBool iHasIToRDataPhase; |
|
54 CMTPTypeTrivialData* iIToRData; |
|
55 }; |
|
56 |
|
57 |
|
58 template<TMTPResponseCode RESPCODE, TBool HASITORDATA> |
|
59 MMTPRequestProcessor* CMTPCommonRequestProcessor::NewL(MMTPDataProviderFramework& aFramework, MMTPConnection& aConnection) |
|
60 { |
|
61 return CMTPCommonRequestProcessor::NewL(aFramework, aConnection, RESPCODE, HASITORDATA); |
|
62 } |
|
63 |
|
64 |
|
65 #endif // CMTPCOMMONREQUESTPROCESSOR_H |
|
66 |