CImapTransportBufferSizes Class Reference

class CImapTransportBufferSizes : public CBase

Stores the transport buffer sizes to be used for IMAP operations.

Each rule consists of a bearer types field, and some buffer size information. The bearer types are defined by the TCommDbBearer enumeration and it is possible to specify multiple bearer types for one rule by performing a bitwise OR operation on the values from the enumeration and passing the resulting value to the various APIs. The buffer size options supported are: 1) Fetch request size - Maximum amount of data that can be requested from the server by a FETCH command. Fetching large email components such as atatchments may require multiple fetch requests to be made dependent on the size specified. 2) Fetch commands outstanding - The maximum number of fetch responses that can be outstanding at any one time. Fetching large email components such as attachments may require multiple fetch requests to be made. It is possible to send multiple fetch requests to the server at the same time, and this option determines how many responses can be outstanding at any one time.

Inherits from

Constructor & Destructor Documentation

CImapTransportBufferSizes()

CImapTransportBufferSizes ( ) [private]

Class constructor

~CImapTransportBufferSizes()

~CImapTransportBufferSizes ( )

Class destructor

Member Functions Documentation

AddSizesL(TInt, TUint32, TInt, TInt)

IMPORT_C TInt AddSizesL ( TInt aPos,
TUint32 aBearerTypes,
TInt aFetchRequestSize,
TInt aMaxOutstandingFetchResponses
)

Adds a transport buffer sizes entry

The position for the new entry is specified in the parameter list. If the position is greater than the number of entries already in the list then the new entry is added at the end of the list. If the position is less than the number of entries already in the list, then the new entry is inserted at that position and all subsequent entries moved down by one position. The actual position where the entry was added is given by the return value.

Invalid arguments passed to the routine will cause a panic on debug builds but a leave with KErrArgument on a release build.

leave
KErrArgument Argument passed in is invalid

Parameters

TInt aPos Position in the list to add the entry.
TUint32 aBearerTypes Bearer types that will use the entry.
TInt aFetchRequestSize Fetch request size in bytes. Minimum value 1024. Must be a multiple of 1024.
TInt aMaxOutstandingFetchResponses Maximum number of outstanding fetch responses allowed. Minimum value 1, Maximum value 8.

ConstructL()

void ConstructL ( ) [private]

Second phase constructor

CopyL()

IMPORT_C CImapTransportBufferSizes * CopyL ( )

Make copy of an instance of the class.

CopyLC()

IMPORT_C CImapTransportBufferSizes * CopyLC ( )

Make new copy of an instance of the class. On return the copy will be on the cleanup stack.

DeleteBearerTypesL(TUint32, TBool &)

IMPORT_C TInt DeleteBearerTypesL ( TUint32 aBearerTypes,
TBool & aSizesRemoved
)

Deletes bearer types from the transport buffer sizes entries.

Every entry is examined to see if the bearer types associated with that entry contain all of the passed in bearer types. If there is a match then the bearer types are removed from the entry. If this results in all the bearer types for the entry being removed then the entry is deleted and all subsequent entries are moved up one position.

Invalid arguments passed to the routine will cause a panic on debug builds but a leave with KErrArgument on a release build.

leave
KErrArgument Argument passed in is invalid

Parameters

TUint32 aBearerTypes Bearer types to remove.
TBool & aSizesRemoved If the bearer types are removed, this flag indicates if the removal resulted in the entry being removed as well.

DeleteSizesL(TInt)

IMPORT_C TBool DeleteSizesL ( TInt aPos )

Deletes a transport buffer sizes entry from a given position

Invalid arguments passed to the routine will cause a panic on debug builds but a leave with KErrArgument on a release build.

leave
KErrArgument Argument passed in is invalid

Parameters

TInt aPos Position in the list to add the entry.

GetSizesL(TInt, TUint32 &, TInt &, TInt &)

IMPORT_C TBool GetSizesL ( TInt aPos,
TUint32 & aBearerTypes,
TInt & aFetchRequestSize,
TInt & aMaxOutstandingFetchResponses
) const

Gets the transport buffer sizes entry at a given position.

Invalid arguments passed to the routine will cause a panic on debug builds but a leave with KErrArgument on a release build.

leave
KErrArgument Argument passed in is invalid

Parameters

TInt aPos Position of the entry in the list
TUint32 & aBearerTypes On successful completion, this holds the bearer types for the entry
TInt & aFetchRequestSize On successful completion, this holds the fetch request size in bytes.
TInt & aMaxOutstandingFetchResponses On successful completion, this holds the maximum number of outstanding fetch responses allowed.

GetSizesL(TUint32, TInt &, TInt &)

IMPORT_C TInt GetSizesL ( TUint32 aBearerTypes,
TInt & aFetchRequestSize,
TInt & aMaxOutstandingFetchResponses
) const

Gets the transport buffer sizes entry for a bearer type.

An entry is returned only if the bearer types associated with the entry contain all the bearer types specified in the passed in value.

Invalid arguments passed to the routine will cause a panic on debug builds but a leave with KErrArgument on a release build.

leave
KErrArgument Argument passed in is invalid

Parameters

TUint32 aBearerTypes The bearer types to search for
TInt & aFetchRequestSize On successful completion, this holds the fetch request size in bytes.
TInt & aMaxOutstandingFetchResponses On successful completion, this holds the maximum number of outstanding fetch responses allowed.

NewL()

IMPORT_C CImapTransportBufferSizes * NewL ( ) [static]

Factory constructor.

NewLC()

IMPORT_C CImapTransportBufferSizes * NewLC ( ) [static]

Factory constructor.

Reset()

IMPORT_C void Reset ( )

Reset the entries list so that it is empty

Member Data Documentation

RArray< TImapTransportBufferSizes > iSizesList

RArray < TImapTransportBufferSizes > iSizesList [private]