CSenChunk Class Reference

class CSenChunk : public CBase

Inherits from

Public Member Functions
~CSenChunk ()
IMPORT_C TInt AdjustChunk ( TInt )
IMPORT_C TInt AllocDescToChunk ( TInt , TPtr8 *&)
IMPORT_C RChunk & Chunk ()
IMPORT_C TChunkHeader & ChunkHeader ()
IMPORT_C TPtrC ChunkName ()
IMPORT_C void ChunkToArgs ( TIpcArgs &, TInt )
IMPORT_C void CloseChunk ()
IMPORT_C TInt CreateChunk ()
IMPORT_C TInt DescFromChunk ( TPtrC8 &, TInt )
IMPORT_C TInt DescToChunk (const TDesC8 &)
IMPORT_C TInt DescToChunk (const TDesC8 &, TInt )
IMPORT_C TInt DescsFromChunk ( TPtrC8 &, TPtrC8 &)
IMPORT_C TInt DescsToChunk (const TDesC8 &, const TDesC8 &)
IMPORT_C CSenChunk * NewL (const TDesC &)
IMPORT_C CSenChunk * NewLC (const TDesC &)
IMPORT_C TInt OpenChunk ()
IMPORT_C TInt OpenChunkFromHandleNumberL ( TInt )
IMPORT_C TInt OpenChunkFromRMsgL (const RMessage2 &, TInt )
IMPORT_C RFile & RequestFileHandle ()
IMPORT_C void RequestFileHandle ( RFile &)
IMPORT_C void SetLogger ( RFileLogger *)
IMPORT_C TBool operator== (const CSenChunk &)
Protected Member Functions
CSenChunk ()
IMPORT_C RFileLogger * Log ()
Private Member Functions
void ConstructL (const TDesC &)
TUint8 * RoundToNextDividableByFourAddress ( TUint8 *)
Inherited Functions
CBase::CBase()
CBase::Delete(CBase *)
CBase::Extension_(TUint,TAny *&,TAny *)
CBase::operator new(TUint)
CBase::operator new(TUint,TAny *)
CBase::operator new(TUint,TLeave)
CBase::operator new(TUint,TLeave,TUint)
CBase::operator new(TUint,TUint)
CBase::~CBase()
Protected Attributes
HBufC * ipChunkName
Private Attributes
RChunk iChunk
RFile iFile
RFileLogger * iLog

Constructor & Destructor Documentation

CSenChunk()

IMPORT_C CSenChunk ( ) [protected]

Constructor.

~CSenChunk()

IMPORT_C ~CSenChunk ( )

Destructor.

Member Functions Documentation

AdjustChunk(TInt)

IMPORT_C TInt AdjustChunk ( TInt aNewSize )
Changes the number of bytes committed to the internal chunk. This value is always rounded up to the next nearest processor page boundary. This value is rounded up to KSenMinRChunkSize if value is less than KSenMinRChunkSize.
Since
Series60 4.0

Parameters

TInt aNewSize The number of bytes to be committed to this chunk.

AllocDescToChunk(TInt, TPtr8 *&)

IMPORT_C TInt AllocDescToChunk ( TInt aSize,
TPtr8 *& apAllocated
)
Changes the number of bytes committed to the internal chunk and places a pointer to chunk to apAllocated. Size is always rounded up to the next nearest processor page boundary. Size is rounded up to KSenMinRChunkSize if given size is less than KSenMinRChunkSize.
Since
Series60 4.0

Parameters

TInt aSize The number of bytes to be committed to this chunk.
TPtr8 *& apAllocated

Chunk()

IMPORT_C RChunk & Chunk ( )
Since
Series60 4.0

ChunkHeader()

IMPORT_C TChunkHeader & ChunkHeader ( )
Since
Series60 4.0

ChunkName()

IMPORT_C TPtrC ChunkName ( ) const
Since
Series60 4.0

ChunkToArgs(TIpcArgs &, TInt)

IMPORT_C void ChunkToArgs ( TIpcArgs & aArgs,
TInt aIndex
)
Sets an internal chunk into TIpcArgs into given po.
Since
Series60 4.0

Parameters

TIpcArgs & aArgs The IPC message arguments
TInt aIndex An index value that identifies the slot in the array of arguments into which the chunk is to be placed. This must be a value in the range 0 to 3.

CloseChunk()

IMPORT_C void CloseChunk ( )
Closes RChunk inside CSenChunk
Since
Series60 4.0

ConstructL(const TDesC &)

void ConstructL ( const TDesC & aChunkName ) [private]
Basic ConstructL function
Since
Series60 4.0

Parameters

const TDesC & aChunkName is the chunk name.

CreateChunk()

IMPORT_C TInt CreateChunk ( )
Creates global protected RChunk inside CSenChunk
Since
Series60 4.0

DescFromChunk(TPtrC8 &, TInt)

IMPORT_C TInt DescFromChunk ( TPtrC8 & aDesc,
TInt aIndex = 0
)
Gets stored descriptor in given index from internal chunk.
Since
Series60 4.0

Parameters

TPtrC8 & aDesc will hold the pointer to descriptor in internal chunk
TInt aIndex = 0 is the index of descriptor to get

DescToChunk(const TDesC8 &)

IMPORT_C TInt DescToChunk ( const TDesC8 & aDesc )
Stores given descriptor into internal chunk. Internal chunk is tried to adjust so that given descriptor fits into chunk.
Since
Series60 4.0

Parameters

const TDesC8 & aDesc is the descriptor to store

DescToChunk(const TDesC8 &, TInt)

IMPORT_C TInt DescToChunk ( const TDesC8 & aDesc,
TInt aIndex
)
Stores given descriptor into internal chunk. Internal chunk is tried to adjust so that given descriptor fits into chunk.
Since
Series60 4.0

Parameters

const TDesC8 & aDesc is the descriptor to store
TInt aIndex

DescsFromChunk(TPtrC8 &, TPtrC8 &)

IMPORT_C TInt DescsFromChunk ( TPtrC8 & aDesc1,
TPtrC8 & aDesc2
)
Gets stored descriptors from internal chunk.
Since
Series60 4.0

Parameters

TPtrC8 & aDesc1 will hold the pointer to the first descriptor in internal chunk
TPtrC8 & aDesc2 will hold the pointer to the second descriptor in internal chunk

DescsToChunk(const TDesC8 &, const TDesC8 &)

IMPORT_C TInt DescsToChunk ( const TDesC8 & aDesc,
const TDesC8 & aDesc2
)
Stores given descriptors into internal chunk. Internal chunk is tried to adjust so that both of the given descriptors fit into chunk.
Since
Series60 4.0

Parameters

const TDesC8 & aDesc is the first descriptor to store
const TDesC8 & aDesc2 is the second descriptor to store

Log()

IMPORT_C RFileLogger * Log ( ) const [protected]
Since
Series60 4.0

NewL(const TDesC &)

IMPORT_C CSenChunk * NewL ( const TDesC & aChunkName ) [static]
Helper class for storing RChunks Two-phased constructor.
Since
Series60 4.0

Parameters

const TDesC & aChunkName is the chunk name.

NewLC(const TDesC &)

IMPORT_C CSenChunk * NewLC ( const TDesC & aChunkName ) [static]
Two-phased constructor.
Since
Series60 4.0

Parameters

const TDesC & aChunkName is the chunk name.

OpenChunk()

IMPORT_C TInt OpenChunk ( )
Opens global protected RChunk inside CSenChunk
Since
Series60 4.0

OpenChunkFromHandleNumberL(TInt)

IMPORT_C TInt OpenChunkFromHandleNumberL ( TInt aHandleOrError )
Opens internal chunk using a handle number returned by a server to a client. This function is called by the client.
Since
Series60 4.0

Parameters

TInt aHandleOrError A handle-number, if zero or positive; an error value, if negative.

OpenChunkFromRMsgL(const RMessage2 &, TInt)

IMPORT_C TInt OpenChunkFromRMsgL ( const RMessage2 & aMessage,
TInt aIndex
)
Opens internal chunk using a handle number sent by a client to a server. This function is called by the server.
Since
Series60 4.0

Parameters

const RMessage2 & aMessage Represents the contents of the client message
TInt aIndex An index specifying which of the four message arguments contains the handle number.

RequestFileHandle()

IMPORT_C RFile & RequestFileHandle ( )
Gets the Rfile Pointer to CHUNK to send content by HTTP:POST
Since
Series60

RequestFileHandle(RFile &)

IMPORT_C void RequestFileHandle ( RFile & aFile )
Sets the Rfile Pointer to CHUNK to send content by HTTP:POST
Since
Series60

Parameters

RFile & aFile

RoundToNextDividableByFourAddress(TUint8 *)

TUint8 * RoundToNextDividableByFourAddress ( TUint8 * aValue ) [private]

This private helper ensures that cast address is dividable by four (MANDATORY in ARMv5 environment, for example)

Parameters

TUint8 * aValue

SetLogger(RFileLogger *)

IMPORT_C void SetLogger ( RFileLogger * aLog )
Sets the file logger used for debug messages.
Since
Series60 4.0

Parameters

RFileLogger * aLog is the file logger

operator==(const CSenChunk &)

IMPORT_C TBool operator== ( const CSenChunk & aChunk )
Tests whether two CSenChunks are equal.
Since
Series60 4.0

Parameters

const CSenChunk & aChunk The SenChunk to be compared with this SenChunk

Member Data Documentation

RChunk iChunk

RChunk iChunk [private]

RFile iFile

RFile iFile [private]

RFileLogger * iLog

RFileLogger * iLog [private]

HBufC * ipChunkName

HBufC * ipChunkName [protected]