|
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: Operator to create the pond and the accessor of the pond |
|
14 // from TLS |
|
15 // |
|
16 |
|
17 #ifndef __COMMSBUFPONDINTERNALOP_H__ |
|
18 #define __COMMSBUFPONDINTERNALOP_H__ |
|
19 |
|
20 #include <e32base.h> |
|
21 #include <comms-infras/commsbufpond.h> |
|
22 |
|
23 |
|
24 /** |
|
25 Pool creation information. Typically read from the c32start.ini file |
|
26 |
|
27 @publishedPartner |
|
28 */ |
|
29 struct TCommsBufPoolCreateInfo |
|
30 { |
|
31 TInt iBufSize; // Buffer size for the pool |
|
32 TInt iInitialBufs; // No. of buffers initially allocater buffers |
|
33 TInt iGrowByBufs; // The minimum number of buffers that the pool will grow by |
|
34 TInt iMinFreeBufs; // Minimum no. of free bufs. If the value falls below this number |
|
35 // the buffer manager system will grow. |
|
36 TInt iCeiling; // Pool ceiling. Maximum no. of buffers the pool can have. |
|
37 TInt iAlignment; // Alignment |
|
38 }; |
|
39 |
|
40 /** |
|
41 Operator to initialize the pond with the given pool info and destruct the |
|
42 pond. |
|
43 |
|
44 @internalTechnology |
|
45 */ |
|
46 class RCommsBufPondOp : public RCommsBufPond |
|
47 { |
|
48 public: |
|
49 IMPORT_C RCommsBufPondOp (); |
|
50 IMPORT_C TInt Open(RArray<TCommsBufPoolCreateInfo>& aPoolInfo, TInt aMaxMBufSize =0); |
|
51 IMPORT_C void Close(); |
|
52 }; |
|
53 |
|
54 /** |
|
55 Accessor to set and get the comms buf pond from the TLS |
|
56 |
|
57 @internalTechnology |
|
58 */ |
|
59 class TCommsBufPondTLSOp |
|
60 { |
|
61 public: |
|
62 inline TCommsBufPondTLSOp(RCommsBufPond& aPond); |
|
63 IMPORT_C void Set(); |
|
64 IMPORT_C static RCommsBufPond Get(); |
|
65 private: |
|
66 RCommsBufPond& iPond; |
|
67 }; |
|
68 |
|
69 #include <comms-infras/commsbufpondop.inl> |
|
70 #endif // __COMMSBUFPONDOP_H__ |
|
71 |