|
1 // Copyright (c) 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: Implementation of the asynchronous allocation support for the |
|
14 // comms buffers |
|
15 // |
|
16 |
|
17 #ifndef __COMMSBUFASYNCREQINTERNAL_H__ |
|
18 #define __COMMSBUFASYNCREQINTERNAL_H__ |
|
19 |
|
20 #include <e32base.h> |
|
21 #include <es_commsbuf.h> |
|
22 #include <comms-infras/commsbufq.h> |
|
23 /** |
|
24 Implementation of the RCommsBufAsyncRequest. |
|
25 @internalTechnology |
|
26 */ |
|
27 class CCommsBufAsyncRequest : public CBase |
|
28 { |
|
29 friend class CSystemSharedBufPond; |
|
30 friend class CMBufManager; |
|
31 friend class RMBufAsyncRequest; |
|
32 friend class RCommsBufAsyncRequest; |
|
33 friend class CSystemSharedAsyncAlloc; |
|
34 |
|
35 public: |
|
36 IMPORT_C CCommsBufAsyncRequest(TCommsBufAllocator& aAllocator); |
|
37 ~CCommsBufAsyncRequest(); |
|
38 void Alloc(RCommsBufChain& aChain, TInt aSize, TInt aMinSize, TInt aMaxSize, TRequestStatus& aStatus); |
|
39 void Cancel(); |
|
40 IMPORT_C void Complete(TInt aCode); |
|
41 |
|
42 private: |
|
43 TInt iSize; |
|
44 TInt iMinSize; |
|
45 TInt iMaxSize; |
|
46 RCommsBufQ iBufQ; |
|
47 RCommsBufChain* iChain; |
|
48 TRequestStatus* iStatusPtr; |
|
49 RThread iThread; |
|
50 TDblQueLink iLink; |
|
51 TCommsBufAllocator iAllocator; |
|
52 }; |
|
53 |
|
54 #endif // __COMMSBUFASYNCREQINTERNAL_H__ |