|
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: Comms buffer queue |
|
14 // |
|
15 |
|
16 #ifndef __COMMSBUFQ_H__ |
|
17 #define __COMMSBUFQ_H__ |
|
18 |
|
19 #include <e32base.h> |
|
20 #include <comms-infras/commsbufchain.h> |
|
21 class RCommsBuf; |
|
22 class RCommsBufChain; |
|
23 |
|
24 /** |
|
25 A linked list of RCommsBuf |
|
26 |
|
27 Note: Currently the class is tagged as internal technology. In order to move this class |
|
28 to other categories a detailed analysis of APIs to be conducted |
|
29 |
|
30 @internalTechnology |
|
31 */ |
|
32 class RCommsBufQ |
|
33 { |
|
34 friend class CSystemSharedBufPool; |
|
35 __DECLARE_CLEANUP |
|
36 public: |
|
37 inline RCommsBufQ(); |
|
38 IMPORT_C RCommsBufQ(RCommsBuf* aChain); |
|
39 |
|
40 inline RCommsBufQ(RCommsBuf* aFirst, RCommsBuf* aLast); |
|
41 |
|
42 inline TBool IsEmpty(); |
|
43 |
|
44 inline RCommsBuf* First(); |
|
45 |
|
46 inline RCommsBuf* Last(); |
|
47 |
|
48 IMPORT_C void Init(); |
|
49 IMPORT_C void Assign(RCommsBufQ& aQueue); |
|
50 IMPORT_C void Assign(RCommsBufChain& aChain); |
|
51 IMPORT_C void Append(RCommsBuf* aBuf); |
|
52 IMPORT_C void Append(RCommsBufQ& aQueue); |
|
53 IMPORT_C void Append(RCommsBufChain& aChain); |
|
54 IMPORT_C void Prepend(RCommsBuf* aBuf); |
|
55 IMPORT_C void Prepend(RCommsBufQ& aQueue); |
|
56 IMPORT_C void Prepend(RCommsBufChain& aChain); |
|
57 IMPORT_C RCommsBuf* Remove(); |
|
58 IMPORT_C void Free(); |
|
59 |
|
60 protected: |
|
61 RCommsBuf* iNext; |
|
62 RCommsBuf* iLast; |
|
63 |
|
64 protected: |
|
65 IMPORT_C TInt Transfer(RCommsBufQ& aQueue, TInt aSize, TInt aBufSize, TInt& aCount); |
|
66 IMPORT_C RCommsBuf* RemoveLast(); |
|
67 }; |
|
68 |
|
69 #include <comms-infras/commsbufq.inl> |
|
70 #endif // __COMMSBUFQ_H__ |
|
71 |
|
72 |
|
73 |
|
74 |