author | ivan.fildichev@opencode.com |
Tue, 19 Oct 2010 18:11:09 +0300 | |
branch | opencode |
changeset 81 | 7f379d8ed02d |
parent 77 | 930a53cdc2d3 |
permissions | -rw-r--r-- |
24 | 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 |
/** |
|
17 |
@file |
|
18 |
@publishedPartner |
|
19 |
@released |
|
20 |
*/ |
|
21 |
||
22 |
#ifndef __ET_PHONE_H |
|
23 |
#define __ET_PHONE_H |
|
24 |
||
25 |
#include <etel.h> |
|
26 |
#include <et_tsy.h> |
|
27 |
||
28 |
#include <f32file.h> |
|
29 |
||
30 |
// |
|
31 |
// CReqEntry class |
|
32 |
// |
|
33 |
class CTelSession; |
|
34 |
class CTelObject; |
|
35 |
class CBuffer; |
|
36 |
||
37 |
class CReqEntry : public CBase |
|
38 |
/** |
|
39 |
@publishedPartner |
|
40 |
*/ |
|
41 |
{ |
|
42 |
friend class CPhoneBase; |
|
43 |
public: |
|
44 |
||
45 |
static CReqEntry* NewL(TTsyReqHandle aTsyReqHandle,const RMessage2& aMessage,CTelSession* aSession,CBuffer* aBuffer,const CTelObject* aTelObject,TInt aFunction,RHeap* aHeap); |
|
46 |
CReqEntry(TTsyReqHandle aTsyReqHandle,const RMessage2& aMessage,CTelSession* aSession,CBuffer* aBuffer,const CTelObject* aTelObject,TInt aFunction,RHeap* aHeap); |
|
47 |
~CReqEntry(); |
|
48 |
void Deque(); |
|
49 |
void CompleteAndDeque(TInt aError); |
|
50 |
// |
|
51 |
static TAny* operator new(TUint aSize) __NO_THROW; |
|
52 |
static TAny* operator new(TUint aSize,TLeave aLeave); |
|
53 |
static TAny* operator new(TUint aSize,TUint aExtraSize) __NO_THROW; |
|
54 |
static TAny* operator new(TUint aSize,RHeap* aHeap) __NO_THROW; // for a priority client request, the |
|
55 |
// objects created must all be taken from |
|
56 |
// the priority heap. |
|
57 |
static void operator delete(TAny* aPtr); |
|
58 |
static void operator delete(TAny* aPtr, TLeave aLeave); |
|
59 |
static void operator delete(TAny* aPtr, TUint aExtraSize); |
|
60 |
static void operator delete(TAny* aPtr, RHeap* aHeap); |
|
61 |
||
62 |
public: |
|
63 |
TTsyReqHandle iTsyReqHandle; |
|
64 |
RMessage2 iMessage; |
|
65 |
||
66 |
CTelSession* iSession; |
|
67 |
const CTelObject* iTelObject; |
|
68 |
TBool iClientInterested; |
|
69 |
TBool iCancelFnCalled; |
|
70 |
TInt iFunction; |
|
71 |
CBuffer* iBuffer; |
|
72 |
TBool iReadByClient; |
|
73 |
TBool iMessageNulled; |
|
74 |
TBool iPlacedRequest; |
|
75 |
MTelObjectTSY::TReqMode iReqMode; |
|
76 |
TInterestCategory iInterestCategory; |
|
77 |
private: |
|
78 |
TDblQueLink iLink; |
|
79 |
public: |
|
80 |
RHeap* iHeap; // a pointer to the priority heap, used during destruction |
|
81 |
}; |
|
82 |
||
83 |
// |
|
84 |
// CBuffer class |
|
85 |
// |
|
86 |
class HEtelBufC8; |
|
87 |
class HEtelBufC16; |
|
88 |
class CBuffer : public CBase |
|
89 |
/** |
|
90 |
@publishedPartner |
|
91 |
*/ |
|
92 |
{ |
|
93 |
public: |
|
94 |
enum TWhichSlot |
|
95 |
{ |
|
96 |
ESlotRead, |
|
97 |
ESlotWrite |
|
98 |
}; |
|
99 |
static CBuffer* NewL(HEtelBufC8* aBuf8,HEtelBufC16* aBuf16,RHeap* aHeap,TInt aSizeOfData1,TInt aSizeOfData2,TInt aNoOfSlots); |
|
100 |
CBuffer(HEtelBufC8* aBuf8,HEtelBufC16* aBuf16,RHeap* aHeap,TInt aSizeOfData1,TInt aSizeOfData2,TInt aNoOfSlots); |
|
101 |
CBuffer(HEtelBufC16* aBuf,RHeap* aHeap,TInt aSizeOfData1,TInt aSizeOfData2,TInt aNoOfSlots); |
|
102 |
~CBuffer(); |
|
103 |
TBool OverFlow() const; |
|
104 |
TBool BufferFull() const; |
|
105 |
TUint Size() const; |
|
106 |
TUint8* CurrentSlotData1(TWhichSlot aWhichSlot) const; |
|
107 |
TUint8* CurrentSlotData2(TWhichSlot aWhichSlot) const; |
|
108 |
TUint16* CurrentSlotData1u(TWhichSlot aWhichSlot) const; |
|
109 |
TUint16* CurrentSlotData2u(TWhichSlot aWhichSlot) const; |
|
110 |
void IncRead(); |
|
111 |
void IncWrite(); |
|
112 |
TInt CompareRWPtrs() const; |
|
113 |
TBool EqualSizes(TInt aSize1, TInt aSize2) const; |
|
114 |
// |
|
115 |
static TAny* operator new(TUint aSize) __NO_THROW; |
|
116 |
static TAny* operator new(TUint aSize,TLeave aLeave); |
|
117 |
static TAny* operator new(TUint aSize,TUint aExtraSize) __NO_THROW; |
|
118 |
static TAny* operator new(TUint aSize,RHeap* aHeap) __NO_THROW; |
|
119 |
static void operator delete(TAny* aPtr); |
|
120 |
static void operator delete(TAny* aPtr, TLeave aLeave); |
|
121 |
static void operator delete(TAny* aPtr, TUint aExtraSize); |
|
122 |
static void operator delete(TAny* aPtr, RHeap* aHeap); |
|
123 |
||
124 |
public: |
|
125 |
HEtelBufC8* iBuf8; // ptr to buffer if narrow |
|
126 |
HEtelBufC16* iBuf16; // ptr to buffer if unicode |
|
127 |
RHeap* iHeap; // a pointer to the priority heap, used during destruction |
|
128 |
private: |
|
129 |
TInt iRead; |
|
130 |
TInt iWrite; |
|
131 |
TInt iNoOfSlots; |
|
132 |
TInt iSizeOfData1; |
|
133 |
TInt iSizeOfData2; |
|
134 |
TBool iOverFlow; |
|
135 |
TBool iBufferFull; |
|
136 |
}; |
|
137 |
||
138 |
class CDestroyDummySubSession; |
|
139 |
class CTelServer; |
|
140 |
class CPhoneBase; |
|
141 |
class CPhoneManager; |
|
142 |
class CMmDeliveryObject; |
|
143 |
||
144 |
// |
|
145 |
// TPhoneClientId |
|
146 |
// |
|
147 |
// |
|
148 |
// |
|
149 |
NONSHARABLE_CLASS( TPhoneClientId ) |
|
150 |
{ |
|
151 |
public: |
|
152 |
TPhoneClientId(); |
|
153 |
TPhoneClientId(TInt aSessionId, TInt aSubSessionId); |
|
154 |
TBool operator == (const TPhoneClientId& aClientId) const; |
|
155 |
TBool operator != (const TPhoneClientId& aClientId) const; |
|
156 |
TPhoneClientId& operator = (const TPhoneClientId& aClientId); |
|
157 |
||
158 |
public: |
|
159 |
TInt iSessionId; |
|
160 |
TInt iSubSessionId; |
|
161 |
}; |
|
162 |
||
163 |
// |
|
164 |
// CTelObject |
|
165 |
// |
|
166 |
class CTelObject : public CObject, public MTelObjectTSY |
|
167 |
/** |
|
168 |
@publishedPartner |
|
169 |
@released |
|
170 |
*/ |
|
171 |
{ |
|
172 |
public: |
|
173 |
IMPORT_C CTelObject(); |
|
174 |
IMPORT_C virtual ~CTelObject(); |
|
175 |
IMPORT_C virtual void ReqCompleted(const TTsyReqHandle aTsyReqHandle,const TInt aError); |
|
176 |
IMPORT_C virtual void FlowControlSuspend(); |
|
177 |
IMPORT_C virtual void FlowControlResume(); |
|
178 |
IMPORT_C virtual TInt UpCallOption(const TInt aOptionNumber, TAny* aData); |
|
179 |
IMPORT_C virtual TInt DownCallOption(const TInt aOptionNumber, TAny* aData); // so TSY doesn't have to implement it |
|
180 |
IMPORT_C virtual TInt ServerVersion() const; |
|
181 |
IMPORT_C virtual TSecurityPolicy GetRequiredPlatSecCaps(const TInt aIpc); |
|
182 |
||
81
7f379d8ed02d
Implemented CTelObject::SetSessionOwnerByTsyHandleAndIpc() and CPhoneBase::FindByIpcAndSecureId()
ivan.fildichev@opencode.com
parents:
77
diff
changeset
|
183 |
IMPORT_C void SetSessionOwnerByTsyHandle(const TTsyReqHandle aTsyReqHandle); |
7f379d8ed02d
Implemented CTelObject::SetSessionOwnerByTsyHandleAndIpc() and CPhoneBase::FindByIpcAndSecureId()
ivan.fildichev@opencode.com
parents:
77
diff
changeset
|
184 |
IMPORT_C void SetSessionOwnerByTsyHandleAndIpc(const TTsyReqHandle aTsyReqHandle, TInt aIpc); |
24 | 185 |
IMPORT_C TInt ReserveSession(); |
186 |
IMPORT_C TBool IsSessionReserved() const; |
|
187 |
IMPORT_C void CancelReserveSession(); |
|
188 |
IMPORT_C void EndSession(); |
|
189 |
IMPORT_C TBool IsSessionInProgress() const; |
|
190 |
||
191 |
CPhoneBase* PhoneOwner() const; |
|
192 |
void SetPhoneOwner(CPhoneBase* aPhoneOwner); |
|
193 |
void FlushReqs(CTelSession* aSession,const TInt aSubSessionHandle); |
|
194 |
void GeneralReq(const RMessage2& aMessage,CTelSession* aSession,CReqEntry* aNewReqEntry,TBool aFromFlowControlResume=EFalse); |
|
195 |
void AcceptIncoming(const RMessage2& aMessage,CTelSession* aSession); |
|
196 |
void RejectIncoming(const RMessage2& aMessage,CTelSession* aSession); |
|
197 |
||
198 |
void TelObjectClose(); |
|
199 |
TDes8* BufferDes1(const CBuffer* aBuffer,CBuffer::TWhichSlot aWhichSlot) const; |
|
200 |
TDes8* BufferDes2(const CBuffer* aBuffer,CBuffer::TWhichSlot aWhichSlot) const; |
|
201 |
TDes16* BufferDes1u(const CBuffer* aBuffer,CBuffer::TWhichSlot aWhichSlot) const; |
|
202 |
TDes16* BufferDes2u(const CBuffer* aBuffer,CBuffer::TWhichSlot aWhichSlot) const; |
|
203 |
TUint8* Ptr1(const TDes8* aDes1) const; |
|
204 |
||
205 |
void WriteBackAndCompleteBufferedReq(const RMessage2& aMessage,CReqEntry* aReqEntry,TInt aError) const; |
|
206 |
void WriteBackAndCompleteReq(CReqEntry* aReqEntry,const TInt aError) const; |
|
207 |
void UpdateAndCompleteIfNecessary(CReqEntry* aReqEntry,TInt aError) const; |
|
208 |
void CancelSubSession(CTelSession* aSession,const TInt aSubSessionHandle); |
|
209 |
void CreateDummySession(CTelSession* aSession,const TInt aSubSessionHandle, TBool aCreateDummy=EFalse); |
|
210 |
void CheckAndDestroyDummySubSession(); |
|
211 |
void RemoveDummySubSessionDestroyer(); |
|
212 |
TInt ResolveError(CTelSession* aSession, const TInt aError) const; |
|
213 |
void CreateDummySessionObjectL(CTelSession* aTelSession); |
|
214 |
||
215 |
TInt DeliverReqL(CReqEntry* aUpdatedReqEntry,const TReqMode aReqMode,const TInt aIpc,const TInt aError); |
|
216 |
void FindReq(CReqEntry* aUpdatedReqEntry,const TReqMode aReqMode,const TInt aIpc,const TInt aError); |
|
217 |
void OfferToClient(CReqEntry* aReqEntry,CReqEntry* aUpdatedReqEntry,const TReqMode aReqMode,const TInt aError); |
|
218 |
void RepostRequest(CReqEntry* aUpdatedReqEntry, const TInt aError); |
|
219 |
||
220 |
void SetSessionOwner(TInt aSessionHandle, TInt aSubSessionHandle); |
|
221 |
TBool IsSessionOwner(CReqEntry* aReqEntry) const; |
|
222 |
||
223 |
TInterestCategory FindInterestCategory( const TSecureId aSid); |
|
224 |
||
225 |
// |
|
226 |
// Pure Virtual |
|
227 |
// |
|
228 |
virtual void OpenPostProcessing(CTelSession* aSession,const TInt aSubSessionHandle)=0; |
|
229 |
virtual void CloseSubSessionPreProcessing(CTelSession* aSession,const TInt aSubSessionHandle)=0; |
|
230 |
virtual TInt Service(const RMessage2& aMessage,CReqEntry* aReqEntry)=0; |
|
231 |
||
232 |
||
233 |
protected: |
|
234 |
TBool IsPriorityClientReq(TInt aReq) const; |
|
235 |
private: |
|
236 |
void CompleteAndDestroyReq(CReqEntry* aReqEntry,const TInt aStatus) const; |
|
237 |
void DestroyReq(CReqEntry* aReqEntry) const; |
|
238 |
||
239 |
CReqEntry* ReqAnalyserL(const RMessage2& aMessage,CTelSession* aSession,TReqMode& aReqMode); |
|
240 |
CReqEntry* CheckForSimilarRequestAndCreateL(const RMessage2& aMessage,CTelSession* aSession) const; |
|
241 |
||
242 |
void CompleteOrBufferRead(const RMessage2& aMessage,CReqEntry* aReqEntry); |
|
243 |
||
244 |
TBool IsActiveReq(CTelSession* aSession,const TInt aSubSessionHandle); |
|
245 |
void CancelActiveReq(CTelSession* aSession,const TInt aSubSessionHandle); |
|
246 |
void CheckAndResize(TInt& aSizeOfData,const RMessage2& aMessage) const; |
|
247 |
||
248 |
HEtelBufC8* CreateNarrowBufferLC(RHeap* aHeap,const RMessage2& aMessage,TUint aIndexOfClientPtr1,TUint aIndexOfClientPtr2,TInt& aSize1,TInt& aSize2,TInt aNoOfSlots) const; |
|
249 |
HEtelBufC16* CreateUnicodeBufferLC(RHeap* aHeap,const RMessage2& aMessage,TUint aIndexOfClientPtr1,TUint aIndexOfClientPtr2,TInt& aSize1,TInt& aSize2,TInt aNoOfSlots) const; |
|
250 |
TBool IsSameMessageType(const RMessage2& aMessage, CReqEntry* aReqEntry) const; |
|
251 |
void GetMessageDescriptorSizes(const RMessage2& aMessage,TInt &aSize1, TInt &aSize2) const; |
|
252 |
private:// data |
|
253 |
CPhoneBase* iPhoneOwner; |
|
254 |
TInt iActiveReqCount; |
|
255 |
CTelServer* iTelServer; |
|
256 |
CDestroyDummySubSession* iDestroyDummySubSession; |
|
257 |
TBool iCreateDummy; |
|
258 |
IMPORT_C virtual void CTelObject_Reserved1(); |
|
259 |
TAny* iCTelObject_Reserved; |
|
260 |
//TPhoneClientId iSessionOwner; |
|
261 |
||
262 |
CMmDeliveryObject* iDeliveryObject; |
|
263 |
//TBool iSessionReserved; |
|
264 |
}; |
|
265 |
||
266 |
// |
|
267 |
// CMmDeliveryObject |
|
268 |
// |
|
269 |
NONSHARABLE_CLASS( CMmDeliveryObject ) : public CActive |
|
270 |
/** |
|
271 |
@internalComponent |
|
272 |
@released |
|
273 |
*/ |
|
274 |
{ |
|
275 |
public: |
|
276 |
static CMmDeliveryObject* NewL( CTelObject& aTelObject ); |
|
277 |
~CMmDeliveryObject(); |
|
278 |
void RunL(); |
|
279 |
void DoCancel(); |
|
280 |
TInt DeliverReqL( TDblQue<CReqEntry>& aArray, CReqEntry* aUpdatedReqEntry, |
|
281 |
CTelObject::TReqMode aReqMode, const TInt aIpc, TInt aError); |
|
282 |
TBool DeliveryInProgress() const; |
|
283 |
TInt ClientsDecision( const RMessage2& aMessage, CTelSession* aSession, TBool aAccepted ); |
|
284 |
void DeletedReqEntry( CReqEntry* aReqEntry ); |
|
285 |
CReqEntry* NewUpdatedReqEntry(); |
|
77 | 286 |
CTelObject::TReqMode GetReqMode()const; |
24 | 287 |
|
288 |
private: |
|
289 |
void ConstructL(); |
|
290 |
CMmDeliveryObject( CTelObject& aTelObject ); |
|
291 |
||
292 |
CReqEntry* HighestPriorityReq( TInterestCategory& aInterestCategory ); |
|
293 |
void OfferToClient( CReqEntry* aReq ); |
|
294 |
||
295 |
void DoStart(); |
|
296 |
void Clear(); |
|
297 |
||
298 |
public: |
|
77 | 299 |
|
24 | 300 |
TPhoneClientId iSessionOwner; |
301 |
TBool iSessionReserved; |
|
302 |
||
303 |
private: |
|
304 |
||
305 |
RTimer iDeliveryTimer; |
|
306 |
TTimeIntervalMicroSeconds32 iTimeSlice; |
|
307 |
||
308 |
CReqEntry* iCurrentReq; |
|
309 |
CReqEntry* iPriorityReq; |
|
310 |
CReqEntry* iDefaultReq; |
|
311 |
RPointerArray<CReqEntry> iPendingReqs; |
|
312 |
CTelObject& iTelObject; |
|
313 |
||
314 |
CReqEntry* iUpdatedReqEntry; |
|
315 |
CTelObject::TReqMode iReqMode; |
|
316 |
TInt iError; |
|
317 |
}; |
|
318 |
||
319 |
// |
|
320 |
// CSubSessionExtBase |
|
321 |
// |
|
322 |
class CSubSessionExtBase : public CTelObject, public MSubSessionExtBaseTSY |
|
323 |
/** |
|
324 |
@publishedPartner |
|
325 |
@released |
|
326 |
*/ |
|
327 |
{ |
|
328 |
public: |
|
329 |
IMPORT_C CSubSessionExtBase(); |
|
330 |
IMPORT_C virtual ~CSubSessionExtBase(); |
|
331 |
||
332 |
TInt ServiceExtFunc(const RMessage2& aMessage,CReqEntry* aReqEntry); |
|
333 |
||
334 |
protected: |
|
335 |
IMPORT_C virtual TInt Service(const RMessage2& aMessage,CReqEntry* aReqEntry); |
|
336 |
||
337 |
IMPORT_C virtual void OpenPostProcessing(CTelSession*,const TInt); |
|
338 |
IMPORT_C virtual void CloseSubSessionPreProcessing(CTelSession* aSession,const TInt aSubSessionHandle); |
|
339 |
IMPORT_C void NullMethod1(); |
|
340 |
IMPORT_C virtual RHandleBase* GlobalKernelObjectHandle(); |
|
341 |
private: |
|
342 |
inline void Inc(); |
|
343 |
}; |
|
344 |
||
345 |
// |
|
346 |
// CFaxBase Object |
|
347 |
// |
|
348 |
class CFaxBase : public CTelObject, public MFaxBaseTSY |
|
349 |
/** |
|
350 |
@publishedPartner |
|
351 |
@released |
|
352 |
*/ |
|
353 |
{ |
|
354 |
public: |
|
355 |
IMPORT_C CFaxBase(); |
|
356 |
IMPORT_C virtual ~CFaxBase(); |
|
357 |
IMPORT_C virtual TReqMode ReqModeL(const TInt aIpc); |
|
358 |
IMPORT_C virtual TInt NumberOfSlotsL(const TInt aIpc); |
|
359 |
IMPORT_C virtual TInt CancelService(const TInt aIpc,const TTsyReqHandle aTsyReqHandle); |
|
360 |
// |
|
361 |
// Pure Virtual |
|
362 |
// |
|
363 |
private: |
|
364 |
IMPORT_C virtual CTelObject* OpenNewObjectByNameL(const TDesC& aName); |
|
365 |
IMPORT_C virtual CTelObject* OpenNewObjectL(TDes& aName); |
|
366 |
IMPORT_C virtual TInt Service(const RMessage2& aMessage,CReqEntry* aReqEntry); |
|
367 |
||
368 |
IMPORT_C virtual void OpenPostProcessing(CTelSession*,const TInt); |
|
369 |
IMPORT_C virtual void CloseSubSessionPreProcessing(CTelSession* aSession,const TInt aSubSessionHandle); |
|
370 |
IMPORT_C virtual void Init(); |
|
371 |
IMPORT_C void NullMethod2(); |
|
372 |
}; |
|
373 |
||
374 |
// |
|
375 |
// CCallBase |
|
376 |
// |
|
377 |
class CCallBase : public CSubSessionExtBase, public MCallBaseTSY |
|
378 |
/** |
|
379 |
@publishedPartner |
|
380 |
@released |
|
381 |
*/ |
|
382 |
{ |
|
383 |
public: |
|
384 |
IMPORT_C CCallBase(); |
|
385 |
IMPORT_C virtual ~CCallBase(); |
|
386 |
||
387 |
||
388 |
IMPORT_C TCallOwnership CheckOwnership(const TTsyReqHandle aTsyReqHandle) const; |
|
389 |
IMPORT_C TInt SetUnowned(); |
|
390 |
IMPORT_C TInt SetOwnership(const TTsyReqHandle aTsyReqHandle); |
|
391 |
IMPORT_C TBool CheckPriorityClient(const TTsyReqHandle aTsyReqHandle) const; |
|
392 |
IMPORT_C CCallBase* ResolveSubSessionHandle(const TTsyReqHandle aTsyReqHandle,const TInt aSubSessionHandle); |
|
393 |
IMPORT_C void RelinquishOwnershipCompleted(const TInt aError); |
|
394 |
IMPORT_C void RecoverDataPortAndRelinquishOwnershipCompleted(const TInt aError); |
|
395 |
IMPORT_C RFax::TProgress* CreateFaxProgressChunk(); |
|
396 |
IMPORT_C void DeleteFaxProgressChunk(); |
|
397 |
IMPORT_C virtual TReqMode ReqModeL(const TInt aIpc); |
|
398 |
IMPORT_C virtual TInt NumberOfSlotsL(const TInt aIpc); |
|
399 |
IMPORT_C virtual TInt CancelService(const TInt aIpc,const TTsyReqHandle aTsyReqHandle); |
|
400 |
IMPORT_C virtual RHandleBase* GlobalKernelObjectHandle(); |
|
401 |
IMPORT_C virtual TInt SetFaxSharedHeaderFile(const TTsyReqHandle aTsyReqHandle, CFaxSharedFileHandles* aFaxSharedFileHandles); |
|
402 |
||
403 |
private: |
|
404 |
IMPORT_C RCall::TOwnershipStatus CheckOwnershipBySession(CTelSession* aSession,const TInt aSubSession) const; |
|
405 |
IMPORT_C virtual TInt Service(const RMessage2& aMessage,CReqEntry* aReqEntry); |
|
406 |
||
407 |
IMPORT_C virtual void Init(); |
|
408 |
IMPORT_C virtual void OpenPostProcessing(CTelSession*,const TInt); |
|
409 |
IMPORT_C virtual void CloseSubSessionPreProcessing(CTelSession* aSession,const TInt aSubSessionHandle); |
|
410 |
||
411 |
TCallOwnership iOwnershipStatus; |
|
412 |
CTelSession* iOwnerSession; |
|
413 |
TInt iOwnerSubSessionHandle; |
|
414 |
TBool iLoanDataPort; |
|
415 |
RChunk iChunk; |
|
416 |
}; |
|
417 |
||
418 |
// |
|
419 |
// CLineBase object |
|
420 |
// |
|
421 |
class CCallBase; |
|
422 |
class CLineBase : public CSubSessionExtBase, public MLineBaseTSY |
|
423 |
/** |
|
424 |
@publishedPartner |
|
425 |
@released |
|
426 |
*/ |
|
427 |
{ |
|
428 |
public: |
|
429 |
IMPORT_C CLineBase(); |
|
430 |
IMPORT_C virtual ~CLineBase(); |
|
431 |
IMPORT_C virtual TReqMode ReqModeL(const TInt aIpc); |
|
432 |
IMPORT_C virtual TInt NumberOfSlotsL(const TInt aIpc); |
|
433 |
IMPORT_C virtual TInt CancelService(const TInt aIpc,const TTsyReqHandle aTsyReqHandle); |
|
434 |
private: |
|
435 |
IMPORT_C virtual TInt Service(const RMessage2& aMessage,CReqEntry* aReqEntry); |
|
436 |
||
437 |
IMPORT_C virtual void Init(); |
|
438 |
IMPORT_C virtual void OpenPostProcessing(CTelSession*,const TInt); |
|
439 |
IMPORT_C virtual void CloseSubSessionPreProcessing(CTelSession* aSession,const TInt aSubSessionHandle); |
|
440 |
||
441 |
}; |
|
442 |
||
443 |
// |
|
444 |
// CPhoneBase object |
|
445 |
// |
|
446 |
class CPhoneBase : public CSubSessionExtBase, public MPhoneBaseTSY |
|
447 |
/** |
|
448 |
@publishedPartner |
|
449 |
@released |
|
450 |
*/ |
|
451 |
{ |
|
452 |
public: |
|
453 |
IMPORT_C CPhoneBase(); |
|
454 |
IMPORT_C virtual ~CPhoneBase(); |
|
455 |
IMPORT_C virtual TReqMode ReqModeL(const TInt aIpc); |
|
456 |
IMPORT_C virtual TInt NumberOfSlotsL(const TInt aIpc); |
|
457 |
IMPORT_C virtual TInt CancelService(const TInt aIpc,const TTsyReqHandle aTsyReqHandle); |
|
458 |
IMPORT_C TBool CheckEmergencyClient(const TTsyReqHandle aTsyReqHandle) const; |
|
459 |
IMPORT_C TInt FindSessionByTsyHandle(const TTsyReqHandle aTsyReqHandle); |
|
460 |
IMPORT_C TInt FindSubSessionByTsyHandle(const TTsyReqHandle aTsyReqHandle); |
|
461 |
||
462 |
||
463 |
void FlowControlInc(); |
|
464 |
void FlowControlDec(); |
|
465 |
TInt FlowControl() const; |
|
466 |
CReqEntry* ActivateNextWaitingReq(); |
|
467 |
CReqEntry* FindByTsyHandle(const TTsyReqHandle aTsyReqHandle); |
|
468 |
CReqEntry* FindByTsyHandleAndPlacedRequest(const TTsyReqHandle aTsyReqHandle); |
|
469 |
void UpdateBuffer(CReqEntry* aUpdatedReqEntry,CReqEntry* aReqEntry); |
|
470 |
CReqEntry* FindClientInWaiting(CTelSession* aSession,const TInt aSubSessionHandle,const TInt aIpc); |
|
471 |
CReqEntry* FindClientInActive(CTelSession* aSession,const TInt aSubSessionHandle,const TInt aIpc); |
|
472 |
CReqEntry* FindByIpcAndTelObject(const TInt aIpc, const CTelObject* aTelObject, const TUint aBufSize); |
|
473 |
CReqEntry* FindByIpcAndTelObjectInWaiting(const TInt aIpc, const CTelObject* aTelObject, const TUint aBufSize); |
|
81
7f379d8ed02d
Implemented CTelObject::SetSessionOwnerByTsyHandleAndIpc() and CPhoneBase::FindByIpcAndSecureId()
ivan.fildichev@opencode.com
parents:
77
diff
changeset
|
474 |
CReqEntry* FindByIpcAndSecureId(const TInt aIpc, const TSecureId aSid); |
24 | 475 |
void AddReqToActive(CReqEntry* aReqEntry); |
476 |
void AddReqToWaiting(CReqEntry* aReqEntry); |
|
477 |
||
478 |
CReqEntry* NewReqL(const RMessage2& aMessage,CTelSession* aSession,CBuffer* aBuffer,const CTelObject* aTelObject,TInt aFunction); |
|
479 |
CReqEntry* FindSameClientEntry(CTelSession* aSession,const TInt aSubSessionHandle,const TInt aIpc); |
|
480 |
CReqEntry* FindClientReqInWaitList(CTelSession* aSession,const TInt aSubSessionHandle); |
|
481 |
CReqEntry* FindThisReqByAnotherClient(CTelSession* aSession,const TInt aSubSessionHandle,const TInt aIpc,const TUint aBufSize,const CTelObject* aThisTelObject); |
|
482 |
CReqEntry* FindNonCancelledClientReq(CTelSession* aSession,const TInt aSubSessionHandle,const TInt aIpc); |
|
483 |
void CheckAndCompleteAllActive(CReqEntry* aUpdatedReqEntry,const TReqMode aReqMode,const TInt aIpc,const TInt aError); |
|
484 |
TDblQue<CReqEntry>& ReqActiveList(); |
|
485 |
private: |
|
486 |
||
487 |
IMPORT_C virtual TInt Service(const RMessage2& aMessage,CReqEntry* aReqEntry); |
|
488 |
IMPORT_C virtual void OpenPostProcessing(CTelSession* aSession,const TInt aSubSessionHandle); |
|
489 |
IMPORT_C virtual void CloseSubSessionPreProcessing(CTelSession* aSession,const TInt aSubSessionHandle); |
|
490 |
||
491 |
TTsyReqHandle TsyReqHandle(); |
|
492 |
TInt iTsyReqHandleCnt; |
|
493 |
TInt iFlowControlCnt; |
|
494 |
TDblQue<CReqEntry> iReqWaitList; |
|
495 |
TDblQue<CReqEntry> iReqActiveList; |
|
496 |
}; |
|
497 |
||
498 |
||
499 |
class CLibUnloader; |
|
500 |
||
501 |
#ifndef SYMBIAN_ENABLE_SPLIT_HEADERS |
|
502 |
#include <et_phone_util.h> |
|
503 |
#endif |
|
504 |
||
505 |
// |
|
506 |
// CPhoneBase factory object |
|
507 |
// |
|
508 |
class CPhoneFactoryBase : public CObject, public MPhoneFactoryBaseTSY |
|
509 |
/** |
|
510 |
@publishedPartner |
|
511 |
@released |
|
512 |
*/ |
|
513 |
{ |
|
514 |
public: |
|
515 |
IMPORT_C CPhoneFactoryBase(); |
|
516 |
IMPORT_C virtual ~CPhoneFactoryBase(); |
|
517 |
||
518 |
IMPORT_C virtual TBool QueryVersionSupported(TVersion const& aVersion) const; |
|
519 |
void ConstructL(RLibrary& aLib); |
|
520 |
inline void Inc(); |
|
521 |
inline TVersion TsyVersionNumber() const; |
|
522 |
protected: |
|
523 |
TVersion iVersion; |
|
524 |
private: |
|
525 |
CLibUnloader* iLibUnloader; |
|
526 |
IMPORT_C virtual void CPhoneFactoryBase_Reserved1(); |
|
527 |
TAny* iCPhoneFactoryBase_Reserved; |
|
528 |
}; |
|
529 |
||
530 |
// |
|
531 |
// HEtelBufC8 class - this is our version of HBufC8 which will allocate to the |
|
532 |
// priority client heap if aHeap is not NULL (i.e. this is a priority client |
|
533 |
// request) |
|
534 |
// |
|
535 |
||
536 |
class HEtelBufC8 |
|
537 |
/** |
|
538 |
@publishedPartner |
|
539 |
*/ |
|
540 |
{ |
|
541 |
public: |
|
542 |
static HEtelBufC8* NewMaxLC(TInt aMaxLength,RHeap* aHeap); |
|
543 |
TPtr8 Des(); |
|
544 |
const TUint8* Ptr() const; |
|
545 |
static void operator delete(TAny* aPtr); |
|
546 |
protected: |
|
547 |
RHeap* iHeap; // pointer to the priority heap. Used during destruction |
|
548 |
TInt iLength; |
|
549 |
}; |
|
550 |
||
551 |
// |
|
552 |
// and the unicode version... |
|
553 |
// |
|
554 |
||
555 |
class HEtelBufC16 |
|
556 |
/** |
|
557 |
@publishedPartner |
|
558 |
*/ |
|
559 |
{ |
|
560 |
public: |
|
561 |
static HEtelBufC16* NewMaxLC(TInt aMaxLength,RHeap* aHeap); |
|
562 |
TPtr16 Des(); |
|
563 |
const TUint16* Ptr() const; |
|
564 |
static void operator delete(TAny* aPtr); |
|
565 |
protected: |
|
566 |
RHeap* iHeap; |
|
567 |
TInt iLength; |
|
568 |
}; |
|
569 |
||
570 |
/** |
|
571 |
Utility class that provides a container for holding an adopted file handle passed between a client and server. |
|
572 |
||
573 |
As part of the classes instantiation it takes in an RMessage2 reference which it uses to call RFile::AdoptFromClient(). |
|
574 |
Once the file been successfully adopted it is the responsibility of the adoptee to close the file when finished. Therefore the |
|
575 |
destructor of the class calls RFile::Close() to close the adopted file handle on deletion of this class. |
|
576 |
||
577 |
This class is only intended to be instantiated from within Etel which is why the factory constructor is not exported. Etel passes a pointer to TSYs as part of transmitting a fax. |
|
578 |
||
579 |
@publishedPartner |
|
580 |
@released Released in v9.0 to aid passing of adopted file handle between Etel server, TSY and Fax server. |
|
581 |
*/ |
|
582 |
class CFaxSharedFileHandles : CBase |
|
583 |
{ |
|
584 |
public: |
|
585 |
static CFaxSharedFileHandles* NewL(const RMessage2& aMsg); |
|
586 |
IMPORT_C ~CFaxSharedFileHandles(); |
|
587 |
IMPORT_C RFile& File(); |
|
588 |
protected: |
|
589 |
CFaxSharedFileHandles(); |
|
590 |
void ConstructL(const RMessage2& aMsg); |
|
591 |
private: |
|
592 |
RFile iFile; |
|
593 |
}; |
|
594 |
#include <et_phone.inl> |
|
595 |
||
596 |
#endif |