|
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: Asynchronous allocation support to allocate shared buffer(s) |
|
14 // |
|
15 |
|
16 #ifndef __COMMSBUFASYNCREQUEST_H__ |
|
17 #define __COMMSBUFASYNCREQUEST_H__ |
|
18 |
|
19 #include <e32base.h> |
|
20 |
|
21 #include <es_commsbuf.h> |
|
22 #include <comms-infras/commsbufq.h> |
|
23 |
|
24 class RCommsBufChain; |
|
25 class CCommsBufAsyncRequest; |
|
26 /** |
|
27 Class that specialises the allocation of RCommsBuf asynchronously. |
|
28 |
|
29 @publishedPartner |
|
30 */ |
|
31 class RCommsBufAsyncRequest |
|
32 { |
|
33 friend class CSystemSharedBufPond; |
|
34 friend class RCommsBufPond; |
|
35 friend class CMBufManager; |
|
36 friend class RMBufAsyncRequest; |
|
37 public: |
|
38 IMPORT_C RCommsBufAsyncRequest(); |
|
39 IMPORT_C ~RCommsBufAsyncRequest(); |
|
40 IMPORT_C TInt Open(TCommsBufAllocator& aAllocator); |
|
41 IMPORT_C void Close(); |
|
42 IMPORT_C void Alloc(RCommsBufChain& aChain, TInt aSize, TRequestStatus& aStatus); |
|
43 IMPORT_C void Alloc(RCommsBufChain& aChain, TInt aSize, TInt aMinSize, TInt aMaxSize, TRequestStatus& aStatus); |
|
44 IMPORT_C void Cancel(); |
|
45 |
|
46 protected: |
|
47 IMPORT_C void Complete(TInt aCode); |
|
48 |
|
49 private: |
|
50 IMPORT_C RCommsBufAsyncRequest(CCommsBufAsyncRequest* aImpl); |
|
51 private: |
|
52 CCommsBufAsyncRequest* iAsyncReqImpl; |
|
53 }; |
|
54 |
|
55 #endif // __COMMSBUFASYNCREQUEST_H__ |