|
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 */ |
|
19 |
|
20 #if !defined(__MBufAsyncRequest_h__) |
|
21 #define __MBufAsyncRequest_h__ |
|
22 |
|
23 #define ALIGN_MASK 0x03 |
|
24 #define ALIGN_UP(n) (((n)+(ALIGN_MASK)) & ~ALIGN_MASK) |
|
25 #define ALIGN_DOWN(n) ((n) & ~ALIGN_MASK) |
|
26 #define IS_ALIGNED(p) ((((TUint32)(p)) & ALIGN_MASK)==0) |
|
27 |
|
28 #ifndef __KERNEL_MODE__ |
|
29 class CMBufAsyncReq; |
|
30 class RMBufAsyncRequest |
|
31 /** |
|
32 ASYNC ALLOCATOR SUPPORT |
|
33 @publishedPartner |
|
34 @released |
|
35 */ |
|
36 { |
|
37 friend class CMBufManager; // for access to iLink |
|
38 public: |
|
39 IMPORT_C RMBufAsyncRequest(); |
|
40 IMPORT_C ~RMBufAsyncRequest(); |
|
41 IMPORT_C void Alloc(RMBufChain& aChain, TInt aLength, TRequestStatus& aStatus); |
|
42 IMPORT_C void Cancel(); |
|
43 protected: |
|
44 void Complete(TInt aCode); |
|
45 protected: |
|
46 TInt iLength; |
|
47 RMBufQ iMBufs; |
|
48 RMBufChain* iChain; |
|
49 TRequestStatus* iStatusPtr; |
|
50 RThread iThread; |
|
51 TDblQueLink iLink; |
|
52 private: |
|
53 TUint iLogger; //alternative for __FLOG_DECLARATION_MEMBER |
|
54 }; |
|
55 #endif // __KERNEL_MODE__ |
|
56 |
|
57 #endif // __MBufAsyncRequest_h__ |