RMBufChain Class Reference
class RMBufChain : public RCommsBufChain
|
Public Member Functions
|
|
RMBufChain
()
|
|
RMBufChain
(
RCommsBuf
*)
|
IMPORT_C
TInt
|
Align
(
TInt
)
|
IMPORT_C
TInt
|
Alloc
(
TInt
)
|
IMPORT_C
TInt
|
Alloc
(
TInt
,
TInt
)
|
IMPORT_C
TInt
|
Alloc
(
TInt
,
TInt
,
TInt
)
|
IMPORT_C
TInt
|
Alloc
(
TInt
,
RMBufAllocator
&)
|
IMPORT_C
TInt
|
Alloc
(
TInt
,
TInt
,
RMBufAllocator
&)
|
IMPORT_C
TInt
|
Alloc
(
TInt
,
TInt
,
TInt
,
RMBufAllocator
&)
|
IMPORT_C void
|
AllocL
(
TInt
)
|
IMPORT_C void
|
AllocL
(
TInt
,
RMBufAllocator
&)
|
IMPORT_C void
|
Append
(
RMBufChain
&)
|
IMPORT_C
TInt
|
Append
(
TInt
)
|
IMPORT_C
TInt
|
Append
(
TInt
,
RMBufAllocator
&)
|
IMPORT_C void
|
AppendL
(
TInt
)
|
IMPORT_C void
|
Assign
(
RMBufQ
&)
|
IMPORT_C void
|
Assign
(
RMBufChain
&)
|
TInt
|
Copy
(
RMBufChain
&)
|
TInt
|
Copy
(
RMBufChain
&,
TInt
)
|
TInt
|
Copy
(
RMBufChain
&,
TInt
,
TInt
)
|
IMPORT_C
TInt
|
Copy
(
RMBufChain
&,
TInt
,
TInt
,
TInt
)
|
IMPORT_C void
|
CopyIn
(const
TDesC8
&,
TInt
)
|
IMPORT_C void
|
CopyL
(
RMBufChain
&,
TInt
,
TInt
)
|
IMPORT_C void
|
CopyOut
(
TDes8
&,
TInt
)
|
IMPORT_C
TInt
|
Create
(const
TDesC8
&,
TInt
)
|
IMPORT_C void
|
CreateL
(const
TDesC8
&,
TInt
)
|
IMPORT_C void
|
FillZ
(
TInt
)
|
RMBuf
*
|
First
()
|
const
RMBuf
*
|
First
()
|
IMPORT_C void
|
Free
()
|
IMPORT_C
TBool
|
Goto
(
TInt
,
RMBuf
*&,
TInt
&,
TInt
&,
RMBuf
*&)
|
TBool
|
Goto
(
TInt
,
RMBuf
*&,
TInt
&,
TInt
&)
|
void
|
Init
()
|
TBool
|
IsEmpty
()
|
IMPORT_C
RMBuf
*
|
Last
()
|
IMPORT_C
TInt
|
Length
()
|
void
|
Link
(
RMBufChain
&)
|
RMBufChain
&
|
Next
()
|
const
RMBufChain
&
|
Next
()
|
IMPORT_C
TInt
|
NumBufs
()
|
IMPORT_C
TInt
|
Prepend
(
TInt
)
|
IMPORT_C
TInt
|
Prepend
(
TInt
,
RMBufAllocator
&)
|
IMPORT_C void
|
Prepend
(
RMBuf
*)
|
IMPORT_C void
|
Prepend
(
RMBufChain
&)
|
IMPORT_C void
|
PrependL
(
TInt
)
|
IMPORT_C
TInt
|
ReAlloc
(
TInt
)
|
IMPORT_C void
|
ReAllocL
(
TInt
)
|
IMPORT_C
RMBuf
*
|
Remove
()
|
IMPORT_C
TInt
|
Split
(
TInt
,
RMBufChain
&)
|
IMPORT_C
TInt
|
Split
(
TInt
,
RMBufChain
&,
RMBufAllocator
&)
|
IMPORT_C void
|
SplitL
(
TInt
,
RMBufChain
&)
|
IMPORT_C void
|
TrimEnd
(
TInt
)
|
IMPORT_C void
|
TrimStart
(
TInt
)
|
void
|
Unlink
()
|
RMBufChain
&
|
operator=
(
RMBuf
*)
|
Inherited Functions
|
|
RCommsBufChain::Alloc(TInt,TCommsBufAllocator &)
|
|
RCommsBufChain::Alloc(TInt,TInt,TCommsBufAllocator &)
|
|
RCommsBufChain::Alloc(TInt,TInt,TInt,TCommsBufAllocator &)
|
|
RCommsBufChain::Append(RCommsBuf *)
|
|
RCommsBufChain::Append(RCommsBufChain &)
|
|
RCommsBufChain::Assign(RCommsBufChain &)
|
|
RCommsBufChain::Goto(TInt,TInt &,TInt &)const
|
|
RCommsBufChain::Goto(TInt,TInt &,TInt &,RCommsBuf *&)const
|
|
RCommsBufChain::Prepend(RCommsBuf *)
|
|
RCommsBufChain::Prepend(RCommsBufChain &)
|
|
RCommsBufChain::RCommsBufChain()
|
|
RCommsBufChain::RCommsBufChain(RCommsBuf *)
|
|
RCommsBufChain::Read(TDes8 &,TInt)const
|
|
RCommsBufChain::Split(TInt,RCommsBufChain &)
|
|
RCommsBufChain::Write(const TDesC8 &,TInt)
|
Constructor & Destructor Documentation
Member Functions Documentation
Align(TInt)
Ensure that the first aSize bytes can be safely cast to a structure of size aSize.
Alloc(TInt)
Allocate sufficient mbufs to hold specfied amount of data
Parameters
TInt
aLen = 0
|
A length of the cell
|
Alloc(TInt, RMBufAllocator &)
Alloc(TInt, TInt, RMBufAllocator &)
Alloc(TInt, TInt, TInt, RMBufAllocator &)
Alloc(TInt, const RMBufChain &)
Allocate sufficient mbufs to hold specfied amount of data
Alloc(TInt, const RMBufChain &, RMBufAllocator &)
AllocL(TInt)
IMPORT_C void
|
AllocL
|
(
|
TInt
|
aLen = 0
|
)
|
|
AllocL(TInt, RMBufAllocator &)
Append(TInt)
Append space to the end of a MBuf chain
Parameters
TInt
aLen
|
the length (how many byte to be appended to the end)
|
Append(TInt, RMBufAllocator &)
AppendL(TInt)
IMPORT_C void
|
AppendL
|
(
|
TInt
|
aLen
|
)
|
|
Append space to the end of a MBuf chain
Parameters
TInt
aLen
|
the length (how many byte to be appended to the end)
|
Assign(RMBufQ &)
IMPORT_C void
|
Assign
|
(
|
RMBufQ
&
|
aQueue
|
)
|
|
Copy(RMBufChain &, TInt, TInt)
Copy(RMBufChain &, TInt, TInt, TInt)
Copy data into a new chain starting at a given offset into this chain.
Parameters
RMBufChain
& newChain
|
A new chain, where the data is copied to
|
TInt
aOffset
|
A offset,
|
TInt
aLen
|
the length of the data to be copied
|
TInt
aHdrReserve
|
Amount of space (bytes) to offset the start of data from the start of the first buffer, so allowing subsequent prepending without further allocation (typically used for protocol headers)
|
CopyIn(const TDesC8 &, TInt)
IMPORT_C void
|
CopyIn
|
(
|
const
TDesC8
&
|
aDes,
|
|
TInt
|
aOffset = 0
|
|
)
|
|
CopyL(RMBufChain &, TInt, TInt)
Copy data into a new chain starting at a given offset into this chain. Allocate sufficient mbufs to hold specfied amount of data, optionally zeroing the buffers.
CopyOut(TDes8 &, TInt)
IMPORT_C void
|
CopyOut
|
(
|
TDes8
&
|
aDes,
|
|
TInt
|
aOffset = 0
|
|
)
|
const
|
Copy data from an mbuf chain into linear buffer starting at specified offset.
Parameters
TDes8
& aDes
|
the buffer to copy in to
|
TInt
aOffset = 0
|
the offset
|
Create(const TDesC8 &, TInt)
Create an Mbuf chain from a descriptor optionally allowing room at front for a protocol header.
Parameters
const
TDesC8
& aDes
|
|
TInt
aHdrLen = 0
|
A header length
|
CreateL(const TDesC8 &, TInt)
IMPORT_C void
|
CreateL
|
(
|
const
TDesC8
&
|
aDes,
|
|
TInt
|
aHdrLen = 0
|
|
)
|
|
Create an Mbuf chain from a descriptor optionally allowing room at front for a protocol header.
Parameters
const
TDesC8
& aDes
|
|
TInt
aHdrLen = 0
|
A header length
|
FillZ(TInt)
Zero fill the first aLen bytes of an mbuf chain
Parameters
TInt
aLen =
KMBufAll
|
the length (how many byte to be appended to the end)
|
First()
RMBuf
*
|
First
|
(
|
)
|
[inline]
|
Rerurns the first in the chain
First()
const
RMBuf
*
|
First
|
(
|
)
|
const [inline]
|
Returns the first in the chain
Free()
Free an MBuf chain, returning it to the free Pool A pointer to the first mbuf of the next packet is returned.
Goto(TInt, RMBuf *&, TInt &, TInt &, RMBuf *&)
Goto specified byte offset into an Mbuf chain. Used as part of copyin/out, split etc to position MBuf pointer and offset from start of iBuffer.
Parameters
TInt
aOffset
|
The offset
|
RMBuf
*& resBuf
|
result buffer
|
TInt
& resOffset
|
result offset
|
TInt
& resLength
|
result length
|
RMBuf
*& resPrevBuf
|
result previous Buf in the chain
|
Goto(TInt, RMBuf *&, TInt &, TInt &)
Goto specified byte offset into an Mbuf chain. Used as part of copyin/out, split etc to position MBuf pointer and offset from start of iBuffer.
Parameters
TInt
aOffset
|
The offset
|
RMBuf
*& resBuf
|
result buffer
|
TInt
& resOffset
|
result offset
|
TInt
& resLength
|
result length
|
Init()
Initializes the members (iNext = NULL)
IsEmpty()
TBool
|
IsEmpty
|
(
|
)
|
const [inline]
|
Check if empty, if empty returns true
Last()
IMPORT_C
RMBuf
*
|
Last
|
(
|
)
|
const
|
Find the last MBuf in a chain
Length()
IMPORT_C
TInt
|
Length
|
(
|
)
|
const
|
Return the number of bytes of actual data contained in an MBuf chain
Link(RMBufChain &)
Links a chain to the chain in the chain
Next()
Returns next in the chain if there is next else returns the current
Next()
Returns next in the chain if there is next else returns the current
NumBufs()
IMPORT_C
TInt
|
NumBufs
|
(
|
)
|
const
|
Count the number of buffers in a chain
Prepend(TInt)
Prepend space onto the front of a chain
Parameters
TInt
aLen
|
the length of the space
|
Prepend(TInt, RMBufAllocator &)
Prepend(RMBuf *)
IMPORT_C void
|
Prepend
|
(
|
RMBuf
*
|
aBuf
|
)
|
|
PrependL(TInt)
IMPORT_C void
|
PrependL
|
(
|
TInt
|
aLen
|
)
|
|
Prepend space onto the front of a chain
Parameters
TInt
aLen
|
the length of the space
|
ReAlloc(TInt)
Adjust the size of a chain, allocates a new memory for the chain
ReAllocL(TInt)
IMPORT_C void
|
ReAllocL
|
(
|
TInt
|
aLen
|
)
|
|
Adjust the size of a chain, allocates a new memory for the chain
Remove()
IMPORT_C
RMBuf
*
|
Remove
|
(
|
)
|
|
Removes and returns the first
RCommsBuf
. The ownership of the returned
RCommsBuf
is with the caller
Split(TInt, RMBufChain &)
Split a chain into two new chains Original chain gets the 1st half newChain gets the other half.
Split(TInt, RMBufChain &, RMBufAllocator &)
SplitL(TInt, RMBufChain &)
Split a chain into two new chains Original chain gets the 1st half newChain gets the other half.
TrimEnd(TInt)
IMPORT_C void
|
TrimEnd
|
(
|
TInt
|
aOffset
|
)
|
|
TrimStart(TInt)
IMPORT_C void
|
TrimStart
|
(
|
TInt
|
nBytes
|
)
|
|
Unlink()
Unlink the nfirst in the chain
Copyright ©2010 Nokia Corporation and/or its subsidiary(-ies).
All rights
reserved. Unless otherwise stated, these materials are provided under the terms of the Eclipse Public License
v1.0.