|
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: Base class for plugin tester |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef CMMMTPDATAPROVIDERTESTER_H |
|
20 #define CMMMTPDATAPROVIDERTESTER_H |
|
21 |
|
22 #include <e32base.h> |
|
23 #include <stiflogger.h> |
|
24 #include <mtp/cmtpdataproviderplugin.h> |
|
25 #include <mtp/tmtptypeevent.h> |
|
26 #include <mtp/mtpdataproviderapitypes.h> |
|
27 #include <mtp/tmtptyperequest.h> |
|
28 #include <mtp/mtpprotocolconstants.h> |
|
29 #include "ctestobserver.h" |
|
30 #include "ctestconnectionchannel.h" |
|
31 |
|
32 class CMTPStorageMetaData; |
|
33 class MMTPObjectMgr; |
|
34 class CMTPTypeObjectInfo; |
|
35 class CMTPTypeObjectPropList; |
|
36 class CMTPTypeObjectPropDesc; |
|
37 class CMTPTypeFile; |
|
38 class CMTPTypeString; |
|
39 |
|
40 /** |
|
41 Defines the MTP data provider ECOM plug-in service provider |
|
42 interface. |
|
43 @publishedPartner |
|
44 @released |
|
45 */ |
|
46 class CMmMtpDataProviderTester : public CBase |
|
47 { |
|
48 public: |
|
49 virtual ~CMmMtpDataProviderTester(); |
|
50 |
|
51 void RegisterObserver( CTestObserver* aTestObserver, |
|
52 CTestConnectionChannel* aTestConnChannel, |
|
53 CMTPDataProviderPlugin* aDataProviderPlugin ); |
|
54 public: |
|
55 TInt CheckSupportedL( TMTPSupportCategory aCategory, |
|
56 RArray<TUint> aResponseArray ); |
|
57 |
|
58 virtual TInt PrepareEnvironmentL(); |
|
59 virtual TInt CleanEnvironmentL(); |
|
60 |
|
61 virtual TBool OpenSessionL_prepare( |
|
62 TMTPNotificationParamsSessionChange& param ); |
|
63 virtual TInt OpenSessionL_checkresults(); |
|
64 |
|
65 virtual TBool CloseSessionL_prepare( |
|
66 TMTPNotificationParamsSessionChange& param ); |
|
67 virtual TInt CloseSessionL_checkresults(); |
|
68 |
|
69 virtual TBool ObjectEnumerationL_prepare( CMTPStorageMetaData* |
|
70 aPhysicalStorage, CMTPStorageMetaData* aLogicalStorage ); |
|
71 virtual TInt ObjectEnumerationL_checkresults( MMTPObjectMgr& |
|
72 aObjectManager ); |
|
73 |
|
74 virtual TBool StorageEnumerationL_prepare(); |
|
75 virtual TInt StorageEnumerationL_checkresults( MMTPObjectMgr& |
|
76 aObjectManager ); |
|
77 |
|
78 virtual TBool CancelL_prepare(); |
|
79 virtual TInt CancelL_checkresults(); |
|
80 |
|
81 virtual TBool GetObjectInfoL_prepare( TMTPTypeRequest& aRequest ); |
|
82 virtual TInt GetObjectInfoL_checkresults( const CMTPTypeObjectInfo* |
|
83 aObjectInfo ); |
|
84 |
|
85 virtual TBool GetObjectL_prepare( TMTPTypeRequest& aRequest ); |
|
86 virtual TInt GetObjectL_checkresults( CMTPTypeFile* aObjectInfo ); |
|
87 |
|
88 virtual TBool GetObjectPropValueL_prepare( TMTPTypeRequest& aRequest ); |
|
89 virtual TInt GetObjectPropValueL_checkresults( |
|
90 const MMTPType* aObjectPropValue, const TUint aPropCode ); |
|
91 |
|
92 virtual TBool GetObjectPropListL_prepare( TMTPTypeRequest& aRequest ); |
|
93 virtual TInt GetObjectPropListL_checkresults( |
|
94 const CMTPTypeObjectPropList* aObjectPropList ); |
|
95 |
|
96 virtual TBool GetObjectPropDescL_prepare( TMTPTypeRequest& aRequest ); |
|
97 virtual TInt GetObjectPropDescL_checkresults( |
|
98 const CMTPTypeObjectPropDesc* aObjectPropDesc, |
|
99 const TUint aPropCode ); |
|
100 |
|
101 virtual TBool SendObjectInfoL_prepare( TMTPTypeRequest& aRequest ); |
|
102 virtual void SendObjectInfoReceiveData( CMTPTypeObjectInfo* aData ); |
|
103 virtual TInt SendObjectInfoL_checkresults(); |
|
104 |
|
105 virtual TBool SendObjectL_prepare( TMTPTypeRequest& aRequest ); |
|
106 virtual void SendObjectReceiveDataL( CMTPTypeFile* aData ); |
|
107 virtual TInt SendObjectL_checkresults(); |
|
108 |
|
109 virtual TBool SetObjectPropValueL_prepare( TMTPTypeRequest& aRequest ); |
|
110 virtual void SetObjectPropValueReceiveDataL( |
|
111 const TMTPTypeRequest& aRequest, MMTPType* aData ); |
|
112 virtual TInt SetObjectPropValueL_checkresults( const CMTPTypeObjectInfo* |
|
113 aObjectInfo ); |
|
114 |
|
115 virtual TBool SetObjectPropListL_prepare( TMTPTypeRequest& aRequest ); |
|
116 virtual void SetObjectPropListReceiveDataL( CMTPTypeObjectPropList* |
|
117 aData ); |
|
118 virtual TInt SetObjectPropListL_checkresults( |
|
119 const CMTPTypeObjectPropList* aObjectPropList ); |
|
120 |
|
121 virtual TBool DeleteObjectL_prepare( TMTPTypeRequest& aRequest ); |
|
122 virtual TInt DeleteObjectL_checkresults( MMTPObjectMgr& aObjectManager ); |
|
123 |
|
124 virtual TBool CopyObjectL_prepare( TMTPTypeRequest& aRequest ); |
|
125 virtual TInt CopyObjectL_checkresults( const CMTPObjectMetaData* |
|
126 aMetaData ); |
|
127 |
|
128 virtual TBool MoveObjectL_prepare( TMTPTypeRequest& aRequest ); |
|
129 virtual TInt MoveObjectL_checkresults( const CMTPObjectMetaData* |
|
130 aMetaData ); |
|
131 |
|
132 virtual TBool RenameObjectL_prepare( TMTPNotificationParamsHandle& |
|
133 aParam ); |
|
134 virtual TInt RenameObjectL_checkresults( const CMTPObjectMetaData* |
|
135 aMetaData ); |
|
136 |
|
137 virtual TBool GetPartialObjectL_prepare( TMTPTypeRequest& aRequest ); |
|
138 virtual TInt GetPartialObjectL_checkresults(); |
|
139 |
|
140 virtual TBool SetObjectReferencesL_prepare( TMTPTypeRequest& aRequest ); |
|
141 virtual TInt SetObjectReferencesL_checkresults(); |
|
142 |
|
143 virtual TBool GetObjectReferencesL_prepare( TMTPTypeRequest& aRequest ); |
|
144 virtual TInt GetObjectReferencesL_checkresults(); |
|
145 |
|
146 virtual TBool GetObjectPropsSupportedL_prepare( TMTPTypeRequest& |
|
147 aRequest ); |
|
148 virtual TInt GetObjectPropsSupportedL_checkresults( const CMTPTypeArray* |
|
149 aObjectProps ); |
|
150 protected: |
|
151 CMmMtpDataProviderTester(); |
|
152 protected: |
|
153 CStifLogger* iLog; |
|
154 // not owned: |
|
155 CTestObserver* iTestObserver; |
|
156 CTestConnectionChannel* iTestConnChannel; |
|
157 CMTPDataProviderPlugin* iDataProviderPlugin; |
|
158 }; |
|
159 |
|
160 #endif // CMMMTPDATAPROVIDERTESTER_H |