|
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(__MBufQ_h__) |
|
21 #define __MBufQ_h__ |
|
22 |
|
23 class RMBuf; |
|
24 |
|
25 class RMBufQ |
|
26 /** |
|
27 MBUF QUEUE |
|
28 @publishedPartner |
|
29 @released |
|
30 */ |
|
31 { |
|
32 friend class RMBufPoolChain; |
|
33 __DECLARE_CLEANUP |
|
34 public: |
|
35 inline RMBufQ(); |
|
36 IMPORT_C RMBufQ(RMBuf* aChain); |
|
37 |
|
38 inline RMBufQ(RMBuf* aFirst, RMBuf* aLast); |
|
39 |
|
40 inline TBool IsEmpty(); |
|
41 |
|
42 inline RMBuf* First(); |
|
43 |
|
44 inline RMBuf* Last(); |
|
45 IMPORT_C void Init(); |
|
46 IMPORT_C void Assign(RMBufQ& aQueue); |
|
47 IMPORT_C void Assign(RMBufChain& aChain); |
|
48 IMPORT_C void Append(RMBuf* aBuf); |
|
49 IMPORT_C void Append(RMBufQ& aQueue); |
|
50 IMPORT_C void Append(RMBufChain& aChain); |
|
51 IMPORT_C void Prepend(RMBuf* aBuf); |
|
52 IMPORT_C void Prepend(RMBufQ& aQueue); |
|
53 IMPORT_C void Prepend(RMBufChain& aChain); |
|
54 IMPORT_C RMBuf* Remove(); |
|
55 IMPORT_C void Free(); |
|
56 // |
|
57 protected: |
|
58 RMBuf* iNext; |
|
59 RMBuf* iLast; |
|
60 |
|
61 private: |
|
62 TInt Transfer(RMBufQ& aQueue, TInt aSize); |
|
63 }; |
|
64 |
|
65 #if !defined(__MBufQ_Ignore_Inlines__) |
|
66 #include <comms-infras/mbufq.inl> |
|
67 #endif // __MBufQ_Ignore_Inlines__ |
|
68 |
|
69 #endif |