|
1 /* |
|
2 * Copyright (c) 2004 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: |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef __UT_DEVSTAPLG_H__ |
|
20 #define __UT_DEVSTAPLG_H__ |
|
21 |
|
22 // EXTERNAL INCLUDES |
|
23 #include <digia/eunit/ceunittestsuiteclass.h> |
|
24 |
|
25 // INTERNAL INCLUDES |
|
26 #include "aicontentobserver.h" |
|
27 #include "stubdataholder.h" |
|
28 #include "ccontentcache.h" |
|
29 #include "aiprioritizer.h" |
|
30 #include "aipublisherbroadcaster.h" |
|
31 |
|
32 // FORWARD DECLARATIONS |
|
33 class CHsContentPublisher; |
|
34 class CContentObserver; |
|
35 class CStubDataHolder; |
|
36 |
|
37 #include <e32def.h> |
|
38 #ifndef NONSHARABLE_CLASS |
|
39 #define NONSHARABLE_CLASS(x) class x |
|
40 #endif |
|
41 |
|
42 |
|
43 // CLASS DEFINITION |
|
44 /** |
|
45 * |
|
46 * EUnitWizard generated test class. |
|
47 * |
|
48 */ |
|
49 NONSHARABLE_CLASS( UT_DevStaPlg ) |
|
50 : public CEUnitTestSuiteClass, |
|
51 public MAiPublishPrioritizer, |
|
52 public MAiPublisherBroadcaster, |
|
53 public MAiContentObserver |
|
54 |
|
55 { |
|
56 public: // Constructors and destructors |
|
57 |
|
58 /** |
|
59 * Two phase construction |
|
60 */ |
|
61 static UT_DevStaPlg* NewL(); |
|
62 static UT_DevStaPlg* NewLC(); |
|
63 /** |
|
64 * Destructor |
|
65 */ |
|
66 ~UT_DevStaPlg(); |
|
67 |
|
68 private: // Constructors and destructors |
|
69 |
|
70 UT_DevStaPlg(); |
|
71 void ConstructL(); |
|
72 |
|
73 public: // MAiPublishPrioritizer |
|
74 |
|
75 void TryToPublishL( MAiPublisherBroadcaster& aBroadcaster, |
|
76 TInt aContent, |
|
77 TInt aResource, |
|
78 TInt aPriority ) |
|
79 { |
|
80 }; |
|
81 |
|
82 void TryToPublishL( MAiPublisherBroadcaster& aBroadcaster, |
|
83 TInt aContent, |
|
84 const TDesC16& aText, |
|
85 TInt aPriority ) |
|
86 { |
|
87 }; |
|
88 |
|
89 void TryToPublishL( MAiPublisherBroadcaster& aBroadcaster, |
|
90 TInt aContent, |
|
91 const TDesC8& aBuf, |
|
92 TInt aPriority ) |
|
93 { |
|
94 }; |
|
95 |
|
96 void TryToCleanL( MAiPublisherBroadcaster& aBroadcaster, |
|
97 TInt aContent, |
|
98 TInt aPriority ) |
|
99 { |
|
100 }; |
|
101 |
|
102 |
|
103 TInt NextPriority() const |
|
104 { |
|
105 return 0; |
|
106 }; |
|
107 |
|
108 public: // MAiPublisherBroadcaster |
|
109 |
|
110 TBool RefreshPriorizedPublishersL( TInt aContentId, TInt aPriority ) |
|
111 { |
|
112 return ETrue; |
|
113 }; |
|
114 |
|
115 public: // MAiContentObserver |
|
116 |
|
117 virtual TInt StartTransaction( TInt aTxId ) |
|
118 { |
|
119 }; |
|
120 TInt Commit( TInt aTxId ) |
|
121 { |
|
122 }; |
|
123 TInt CancelTransaction( TInt aTxId ) |
|
124 { |
|
125 }; |
|
126 TBool CanPublish( CHsContentPublisher& aPlugin, TInt aContent, TInt aIndex ) |
|
127 { |
|
128 }; |
|
129 TInt Publish( CHsContentPublisher& aPlugin, TInt aContent, TInt aResource, TInt aIndex ) |
|
130 { |
|
131 }; |
|
132 TInt Publish( CHsContentPublisher& aPlugin, TInt aContent, const TDesC16& aText, TInt aIndex ) |
|
133 { |
|
134 }; |
|
135 TInt Publish( CHsContentPublisher& aPlugin, TInt aContent, const TDesC8& aBuf, TInt aIndex ) |
|
136 { |
|
137 }; |
|
138 TInt Publish( CHsContentPublisher& aPlugin, TInt aContent, RFile& aFile, TInt aIndex ) |
|
139 { |
|
140 }; |
|
141 TInt Clean( CHsContentPublisher& aPlugin, TInt aContent, TInt aIndex ) |
|
142 { |
|
143 }; |
|
144 TAny* Extension( TUid aUid ) |
|
145 { |
|
146 }; |
|
147 |
|
148 private: // New methods |
|
149 |
|
150 void SetupL(); |
|
151 void SetupEmptyL(); |
|
152 |
|
153 void Teardown(); |
|
154 |
|
155 void TestL(); |
|
156 |
|
157 private: // Data |
|
158 |
|
159 EUNIT_DECLARE_TEST_TABLE; |
|
160 |
|
161 // CAiContentPublisher* iPublisher; |
|
162 CHsContentPublisher* iPublisher; |
|
163 |
|
164 CContentObserver* iCache; |
|
165 |
|
166 CStubDataHolder* iStubDataHolder; |
|
167 |
|
168 }; |
|
169 |
|
170 #endif // __UT_DEVSTAPLG_H__ |
|
171 |
|
172 // End of file |