|
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 #ifndef CMTPGETFORMATCAPABILITIES_H_ |
|
17 #define CMTPGETFORMATCAPABILITIES_H_ |
|
18 |
|
19 #include <mtp/cmtptypeformatcapabilitylist.h> |
|
20 |
|
21 #include "cmtprequestprocessor.h" |
|
22 #include "mmtptransactionproxy.h" |
|
23 #include "rmtpframework.h" |
|
24 |
|
25 |
|
26 class MMTPRequestProcessor; |
|
27 |
|
28 |
|
29 |
|
30 /** |
|
31 Implements the proxy data provider's GetFormatCapabilities request processor. |
|
32 @internalComponent |
|
33 |
|
34 */ |
|
35 class CMTPGetFormatCapabilities : public CMTPRequestProcessor, public MMTPTransactionProxy |
|
36 { |
|
37 public: |
|
38 |
|
39 static MMTPRequestProcessor* NewL(MMTPDataProviderFramework& aFramework, MMTPConnection& aConnection); |
|
40 ~CMTPGetFormatCapabilities(); |
|
41 |
|
42 private: // From CMTPRequestProcessor |
|
43 |
|
44 void ServiceL(); |
|
45 |
|
46 private: // From MMTPTransactionProxy |
|
47 |
|
48 void ProxyReceiveDataL(MMTPType& aData, const TMTPTypeRequest& aRequest, MMTPConnection& aConnection, TRequestStatus& aStatus); |
|
49 void ProxySendDataL(const MMTPType& aData, const TMTPTypeRequest& aRequest, MMTPConnection& aConnection, TRequestStatus& aStatus); |
|
50 void ProxySendResponseL(const TMTPTypeResponse& aResponse, const TMTPTypeRequest& aRequest, MMTPConnection& aConnection, TRequestStatus& aStatus); |
|
51 void ProxyTransactionCompleteL(const TMTPTypeRequest& aRequest, MMTPConnection& aConnection); |
|
52 |
|
53 private: |
|
54 CMTPGetFormatCapabilities(MMTPDataProviderFramework& aFramework, MMTPConnection& aConnection); |
|
55 void ConstructL(); |
|
56 void SendResponseL(TUint16 aCode); |
|
57 void Schedule(TInt aError); |
|
58 |
|
59 private: // From CActive |
|
60 void RunL(); |
|
61 TInt RunError(TInt aError); |
|
62 |
|
63 private: // Owned |
|
64 |
|
65 /* |
|
66 *FLOGGER debug trace member variable. |
|
67 */ |
|
68 __FLOG_DECLARATION_MEMBER_MUTABLE; |
|
69 |
|
70 |
|
71 /* |
|
72 * CMTPTypeCapabilityList dataset. |
|
73 */ |
|
74 CMTPTypeFormatCapabilityList* iCapabilityList; |
|
75 |
|
76 |
|
77 /* |
|
78 * The current data provider |
|
79 */ |
|
80 TInt iCurrentTarget; |
|
81 |
|
82 |
|
83 RArray<TUint> iTargetDps; |
|
84 |
|
85 /* |
|
86 * mtp framework interface. |
|
87 */ |
|
88 RMTPFramework iSingletons; |
|
89 |
|
90 }; |
|
91 |
|
92 |
|
93 #endif /*CMTPGETFORMATCAPABILITIES_H_*/ |