|
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 |
|
17 inline RCommsBufChain::RCommsBufChain() |
|
18 : iNext(NULL) |
|
19 { |
|
20 } |
|
21 |
|
22 inline RCommsBufChain::RCommsBufChain(RCommsBuf* aHeadBuf) |
|
23 : iNext(aHeadBuf) |
|
24 { |
|
25 } |
|
26 |
|
27 inline TBool RCommsBufChain::IsEmpty() const |
|
28 /** |
|
29 Check if the chain is empty. If empty returns ETrue otherwise EFalse |
|
30 */ |
|
31 { |
|
32 return (iNext == NULL); |
|
33 } |
|
34 |
|
35 inline RCommsBuf* RCommsBufChain::First() |
|
36 /** |
|
37 Returns the first RCommsBuf in the chain. |
|
38 */ |
|
39 { |
|
40 return iNext; |
|
41 } |
|
42 |
|
43 inline RCommsBuf* RCommsBufChain::Goto(TInt aDataOffset, TInt& aBufDataOffset, TInt& aBufDataLen) const |
|
44 /** |
|
45 Goto specified byte offset into a CommsBuf chain. Used as part of copyin/out, split etc to position |
|
46 RCommsBuf pointer and offset from start of iBuffer. |
|
47 |
|
48 @param anOffset The offset |
|
49 @param resBuf result buffer |
|
50 @param resOffset result offset |
|
51 @param resLength result length |
|
52 @param resPrevBuf result previous RCommsBuf in the chain |
|
53 @return ETrue if successful |
|
54 */ |
|
55 { |
|
56 RCommsBuf* buf; |
|
57 return Goto(aDataOffset, aBufDataOffset, aBufDataLen, buf); |
|
58 } |
|
59 |