|
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: |
|
14 // |
|
15 |
|
16 #ifndef __COMMSBUFPOND_INTERNAL_H__ |
|
17 #define __COMMSBUFPOND_INTERNAL_H__ |
|
18 |
|
19 class TShPool; |
|
20 |
|
21 /** |
|
22 @internalTechnology |
|
23 */ |
|
24 class TPoolRecord |
|
25 { |
|
26 public: |
|
27 TPoolRecord() : iShPool(NULL), iCommsShPoolHandle(0), iCommsOpaqueHandle(0), iCommsBufSize(0) {} |
|
28 #ifdef __KERNEL_MODE__ |
|
29 TPoolRecord(TShPool* aShPool, TInt aCommsShPoolHandle, TInt aCommsOpaqueHandle, TInt aCommsBufSize) : |
|
30 iShPool(aShPool), |
|
31 iCommsShPoolHandle(aCommsShPoolHandle), |
|
32 iCommsOpaqueHandle(aCommsOpaqueHandle), |
|
33 iCommsBufSize(aCommsBufSize) |
|
34 { |
|
35 } |
|
36 #else |
|
37 TPoolRecord(TInt aCommsShPoolHandle, TInt aCommsOpaqueHandle, TInt aCommsBufSize) : |
|
38 iShPool(NULL), |
|
39 iCommsShPoolHandle(aCommsShPoolHandle), |
|
40 iCommsOpaqueHandle(aCommsOpaqueHandle), |
|
41 iCommsBufSize(aCommsBufSize) |
|
42 { |
|
43 } |
|
44 #endif |
|
45 |
|
46 #ifdef __KERNEL_MODE__ |
|
47 TShPool* iShPool; |
|
48 #else |
|
49 TAny* iShPool; |
|
50 #endif |
|
51 TInt iCommsShPoolHandle; |
|
52 TInt iCommsOpaqueHandle; // Meaningful user (comms) side only. Maintained only - kernel side |
|
53 TInt iCommsBufSize; |
|
54 }; |
|
55 |
|
56 |
|
57 /** |
|
58 @internalTechnology |
|
59 */ |
|
60 class TCommsPond |
|
61 { |
|
62 friend class CSystemSharedBufPond; |
|
63 friend class DCommsPond; |
|
64 |
|
65 public: |
|
66 TCommsPond() : iNumPools(0) |
|
67 {} |
|
68 |
|
69 static const TInt KMaxPoolsPerPond = 8; |
|
70 |
|
71 TInt NumPools() const |
|
72 { |
|
73 return iNumPools; |
|
74 } |
|
75 |
|
76 private: |
|
77 TInt iNumPools; |
|
78 TPoolRecord iPoolRecords[KMaxPoolsPerPond]; |
|
79 }; |
|
80 |
|
81 #endif __COMMSBUFPOND_INTERNAL_H__ |