|
1 // Copyright (c) 1997-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 /**@file |
|
17 @internalAll */ |
|
18 #ifndef __DSTD_H |
|
19 #define __DSTD_H |
|
20 |
|
21 #include <e32base.h> |
|
22 #include "et_struct.h" |
|
23 #include "ET_PHONE.H" |
|
24 #include "../DSTD/ACQUIRE.H" |
|
25 #include <et_clsvr.h> |
|
26 |
|
27 |
|
28 /** |
|
29 Simple extended error codes to allow testing of extended error code handling. |
|
30 Valid licensee specific errors start at -21000 and go to -29999. |
|
31 @internalComponent |
|
32 */ |
|
33 const TInt KErrLicenseeSpecificCorrupt = -21001; |
|
34 const TInt KErrLicenseeSpecificOkay = -21002; |
|
35 |
|
36 |
|
37 |
|
38 // CFaxDstd |
|
39 |
|
40 class CPhoneFactoryDummyBase; |
|
41 class CFaxDstd : public CFaxDummyBase |
|
42 /** |
|
43 @internalComponent |
|
44 */ |
|
45 { |
|
46 public: |
|
47 static CFaxDstd* NewL(CPhoneFactoryDummyBase* aFac); |
|
48 CFaxDstd(CPhoneFactoryDummyBase* aFac); |
|
49 void ConstructL(); |
|
50 ~CFaxDstd(); |
|
51 RHandleBase* GlobalKernelObjectHandle(); |
|
52 private: |
|
53 RChunk iChunk; |
|
54 }; |
|
55 |
|
56 |
|
57 // CCallDstd |
|
58 |
|
59 class CCallDstd : public CCallDummyBase |
|
60 /** |
|
61 @internalComponent |
|
62 */ |
|
63 { |
|
64 public: |
|
65 static CCallDstd* NewL(CPhoneFactoryDummyBase* aFac); |
|
66 CCallDstd(CPhoneFactoryDummyBase* aFac); |
|
67 ~CCallDstd(); |
|
68 public: |
|
69 virtual TInt ExtFunc(const TTsyReqHandle aTsyReqHandle,const TInt aIpc,const TDataPackage&); |
|
70 virtual CTelObject* OpenNewObjectByNameL(const TDesC& aName); |
|
71 virtual CTelObject* OpenNewObjectL(TDes& aNewName); |
|
72 virtual TReqMode ReqModeL(const TInt aIpc); |
|
73 }; |
|
74 |
|
75 |
|
76 // CLineDstd |
|
77 |
|
78 class CLineDstd : public CLineDummyBase |
|
79 /** |
|
80 @internalComponent |
|
81 */ |
|
82 { |
|
83 public: |
|
84 static CLineDstd* NewL(CPhoneFactoryDummyBase* aFac); |
|
85 CLineDstd(CPhoneFactoryDummyBase* aFac); |
|
86 ~CLineDstd(); |
|
87 public: // virtual functions |
|
88 virtual TInt EnumerateCall(const TTsyReqHandle aTsyReqHandle,TInt* aCount); |
|
89 virtual TInt GetCallInfo(const TTsyReqHandle aTsyReqHandle,TCallInfoIndex*); |
|
90 virtual TInt ExtFunc(const TTsyReqHandle aTsyReqHandle,const TInt aIpc,const TDataPackage&); |
|
91 virtual CTelObject* OpenNewObjectByNameL(const TDesC& aName); |
|
92 virtual CTelObject* OpenNewObjectL(TDes& aNewName); |
|
93 private: |
|
94 CPhoneFactoryDummyBase* iFac; |
|
95 TInt iNumberOfCalls; |
|
96 }; |
|
97 |
|
98 |
|
99 // CPhoneDstd |
|
100 class CPhoneDstd : public CPhoneDummyBase |
|
101 /** |
|
102 @internalComponent |
|
103 */ |
|
104 { |
|
105 public: |
|
106 static CPhoneDstd* NewL(CPhoneFactoryDummyBase* aFac); |
|
107 CPhoneDstd(CPhoneFactoryDummyBase* aFac); |
|
108 ~CPhoneDstd(); |
|
109 public: |
|
110 virtual TInt EnumerateLines(const TTsyReqHandle aTsyReqHandle,TInt*); |
|
111 virtual TInt GetLineInfo(const TTsyReqHandle aTsyReqHandle,TLineInfoIndex*); |
|
112 virtual TInt ExtFunc(const TTsyReqHandle aTsyReqHandle,const TInt aIpc,const TDataPackage&); |
|
113 virtual TReqMode ReqModeL(const TInt aIpc); |
|
114 virtual CTelObject* OpenNewObjectByNameL(const TDesC& aName); |
|
115 virtual CTelObject* OpenNewObjectL(TDes& aNewName); |
|
116 virtual void Init(); |
|
117 virtual TSecurityPolicy GetRequiredPlatSecCaps(const TInt aIpc); |
|
118 TInt TestNarrowSetAndGet(const TTsyReqHandle aTsyReqHandle, const TDesC8* aDes1, TDes8* aDes2); |
|
119 TInt TestUnicodeSetAndNarrowGet(const TTsyReqHandle aTsyReqHandle, TDes8* aDes1, const TDesC16* aDes2); |
|
120 TInt TestUnicodeSetAndGet(const TTsyReqHandle aTsyReqHandle, const TDesC16* aDes1, TDes16* aDes2); |
|
121 TInt TestNarrowSetAndUnicodeGet(const TTsyReqHandle aTsyReqHandle, const TDesC8* aDes1, TDes16* aDes2); |
|
122 TInt TestDoubleUnicodeGet(const TTsyReqHandle aTsyReqHandle, TDes16* aDes1 , TDes16* aDes2); |
|
123 }; |
|
124 |
|
125 // |
|
126 // CFaxFc |
|
127 // |
|
128 class CFaxFc : public CFaxDummyBase |
|
129 /** |
|
130 @internalComponent |
|
131 */ |
|
132 { |
|
133 public: |
|
134 static CFaxFc* NewL(CPhoneFactoryDummyBase* aFac); |
|
135 CFaxFc(CPhoneFactoryDummyBase* aFac); |
|
136 void ConstructL(); |
|
137 ~CFaxFc(); |
|
138 RHandleBase* GlobalKernelObjectHandle(); |
|
139 private: |
|
140 RChunk iChunk; |
|
141 }; |
|
142 |
|
143 // |
|
144 // CCallFc |
|
145 // |
|
146 class CCallFc : public CCallDummyBase |
|
147 /** |
|
148 @internalComponent |
|
149 */ |
|
150 { |
|
151 public: |
|
152 static CCallFc* NewL(CPhoneFactoryDummyBase* aFac); |
|
153 CCallFc(CPhoneFactoryDummyBase* aFac); |
|
154 ~CCallFc(); |
|
155 public: |
|
156 virtual TInt ExtFunc(const TTsyReqHandle aTsyReqHandle,const TInt aIpc,const TDataPackage&); |
|
157 virtual CTelObject* OpenNewObjectByNameL(const TDesC& aName); |
|
158 virtual CTelObject* OpenNewObjectL(TDes& aNewName); |
|
159 }; |
|
160 |
|
161 // |
|
162 // CLineFc |
|
163 // |
|
164 class CLineFc : public CLineDummyBase |
|
165 /** |
|
166 @internalComponent |
|
167 */ |
|
168 { |
|
169 public: |
|
170 static CLineFc* NewL(CPhoneFactoryDummyBase* aFac); |
|
171 CLineFc(CPhoneFactoryDummyBase* aFac); |
|
172 ~CLineFc(); |
|
173 public: // virtual functions |
|
174 virtual TInt EnumerateCall(const TTsyReqHandle aTsyReqHandle,TInt* aCount); |
|
175 virtual TInt GetCallInfo(const TTsyReqHandle aTsyReqHandle,TCallInfoIndex*); |
|
176 virtual TInt ExtFunc(const TTsyReqHandle aTsyReqHandle,const TInt aIpc,const TDataPackage&); |
|
177 virtual CTelObject* OpenNewObjectByNameL(const TDesC& aName); |
|
178 virtual CTelObject* OpenNewObjectL(TDes& aNewName); |
|
179 private: |
|
180 TInt iNumberOfCalls; |
|
181 }; |
|
182 |
|
183 // |
|
184 // CPhoneFc |
|
185 // |
|
186 class CPhoneFc : public CPhoneDummyBase |
|
187 /** |
|
188 @internalComponent |
|
189 */ |
|
190 { |
|
191 public: |
|
192 static CPhoneFc* NewL(CPhoneFactoryDummyBase* aFac); |
|
193 CPhoneFc(CPhoneFactoryDummyBase* aFac); |
|
194 ~CPhoneFc(); |
|
195 public: |
|
196 virtual TInt EnumerateLines(const TTsyReqHandle aTsyReqHandle,TInt*); |
|
197 virtual TInt GetLineInfo(const TTsyReqHandle aTsyReqHandle,TLineInfoIndex*); |
|
198 virtual void Init(); |
|
199 virtual TInt ExtFunc(const TTsyReqHandle aTsyReqHandle,const TInt aIpc,const TDataPackage&); |
|
200 virtual CTelObject* OpenNewObjectByNameL(const TDesC& aName); |
|
201 virtual CTelObject* OpenNewObjectL(TDes& aNewName); |
|
202 public: |
|
203 void PhoneInit(); |
|
204 static TInt OpenPhoneHandler(TAny* aPtr); |
|
205 private: |
|
206 TTsyTimer iOpenPhone; |
|
207 }; |
|
208 |
|
209 // |
|
210 // CFaxPm |
|
211 // |
|
212 class CFaxPm : public CFaxDummyBase |
|
213 /** |
|
214 @internalComponent |
|
215 */ |
|
216 { |
|
217 public: |
|
218 static CFaxPm* NewL(CPhoneFactoryDummyBase* aFac); |
|
219 CFaxPm(CPhoneFactoryDummyBase* aFac); |
|
220 void ConstructL(); |
|
221 ~CFaxPm(); |
|
222 RHandleBase* GlobalKernelObjectHandle(); |
|
223 private: |
|
224 RChunk iChunk; |
|
225 }; |
|
226 |
|
227 // |
|
228 // CCallPm |
|
229 // |
|
230 class CCallPm : public CCallDummyBase |
|
231 /** |
|
232 @internalComponent |
|
233 */ |
|
234 { |
|
235 public: |
|
236 static CCallPm* NewL(TInt& aNumberOfCalls, CPhoneFactoryDummyBase* aFac); |
|
237 CCallPm(TInt& aNumberOfCalls,CPhoneFactoryDummyBase* aFac); |
|
238 ~CCallPm(); |
|
239 public: |
|
240 virtual TInt ExtFunc(const TTsyReqHandle aTsyReqHandle,const TInt aIpc,const TDataPackage&); |
|
241 virtual CTelObject* OpenNewObjectByNameL(const TDesC& aName); |
|
242 virtual CTelObject* OpenNewObjectL(TDes& aNewName); |
|
243 CAcquireEntry* FindByTsyReqHandle(const TTsyReqHandle aUid); |
|
244 void RemoveAcquireEntry(CAcquireEntry* aEntry); |
|
245 private: |
|
246 TInt& iNumberOfCalls; |
|
247 }; |
|
248 |
|
249 // |
|
250 // CLinePm |
|
251 // |
|
252 class CLinePm : public CLineDummyBase |
|
253 /** |
|
254 @internalComponent |
|
255 */ |
|
256 { |
|
257 public: |
|
258 static CLinePm* NewL(CPhoneFactoryDummyBase* aFac); |
|
259 CLinePm(CPhoneFactoryDummyBase* aFac); |
|
260 void ConstructL(); |
|
261 ~CLinePm(); |
|
262 public: // virtual functions |
|
263 virtual TInt EnumerateCall(const TTsyReqHandle aTsyReqHandle,TInt* aCount); |
|
264 virtual TInt GetCallInfo(const TTsyReqHandle aTsyReqHandle,TCallInfoIndex*); |
|
265 virtual TInt ExtFunc(const TTsyReqHandle aTsyReqHandle,const TInt aIpc,const TDataPackage&); |
|
266 virtual CTelObject* OpenNewObjectByNameL(const TDesC& aName); |
|
267 virtual CTelObject* OpenNewObjectL(TDes& aNewName); |
|
268 private: |
|
269 TInt iNumberOfCalls; |
|
270 TName iCallName; |
|
271 }; |
|
272 |
|
273 // |
|
274 // CPhonePm |
|
275 // |
|
276 class CPhonePm : public CPhoneDummyBase |
|
277 /** |
|
278 @internalComponent |
|
279 */ |
|
280 { |
|
281 public: |
|
282 static CPhonePm* NewL(CPhoneFactoryDummyBase* aFac); |
|
283 CPhonePm(CPhoneFactoryDummyBase* aFac); |
|
284 ~CPhonePm(); |
|
285 public: |
|
286 virtual TInt EnumerateLines(const TTsyReqHandle aTsyReqHandle,TInt*); |
|
287 virtual TInt GetLineInfo(const TTsyReqHandle aTsyReqHandle,TLineInfoIndex*); |
|
288 virtual void Init(); |
|
289 virtual TInt ExtFunc(const TTsyReqHandle aTsyReqHandle,const TInt aIpc,const TDataPackage&); |
|
290 virtual CTelObject* OpenNewObjectByNameL(const TDesC& aName); |
|
291 virtual CTelObject* OpenNewObjectL(TDes& aNewName); |
|
292 }; |
|
293 |
|
294 // |
|
295 // CPhoneFactoryDstd object |
|
296 // |
|
297 class CLibUnloader; |
|
298 class CPhoneFactoryDstd: public CPhoneFactoryDummyBase |
|
299 /** |
|
300 @internalComponent |
|
301 */ |
|
302 { |
|
303 public: |
|
304 static CPhoneFactoryDstd* NewL(); |
|
305 CPhoneFactoryDstd(); |
|
306 ~CPhoneFactoryDstd(); |
|
307 virtual TInt GetPhoneInfo(const TInt aIndex, RTelServer::TPhoneInfo& aPhoneFactoryBaseInfo); |
|
308 virtual TInt EnumeratePhones(); |
|
309 virtual CPhoneBase* NewPhoneL(const TDesC& aName); |
|
310 private: |
|
311 static void CloseObj(TAny* aObj); |
|
312 }; |
|
313 |
|
314 // CPhoneDstdSlow |
|
315 class CPhoneDstdSlow : public CPhoneDstd |
|
316 /** |
|
317 @internalComponent |
|
318 */ |
|
319 { |
|
320 public: |
|
321 static CPhoneDstdSlow* NewL(CPhoneFactoryDummyBase* aFac); |
|
322 CPhoneDstdSlow(CPhoneFactoryDummyBase* aFac); |
|
323 ~CPhoneDstdSlow(); |
|
324 public: |
|
325 virtual TInt GetLineInfo(const TTsyReqHandle aTsyReqHandle,TLineInfoIndex*); |
|
326 }; |
|
327 |
|
328 #endif |