CMobilePhoneListBase Class Reference

class CMobilePhoneListBase : public CBase

A base class within a thin-template implementation.

Implements the methods for "read-only" access to a list class. Entries are stored in a CArrayFixFlat<TAny>.

Inherits from

  • CMobilePhoneListBase

Constructor & Destructor Documentation

CMobilePhoneListBase(TInt, TInt)

IMPORT_CCMobilePhoneListBase(TIntaLength,
TIntaGranularity
)[protected]

Standard constructor, sets the length of the entries in the list and the granularity of the list.

Parameters

TInt aLengthLength of the CArrayFixFlat<TAny> entries to be stored in the list.
TInt aGranularityGranularity of the list.

~CMobilePhoneListBase()

IMPORT_C~CMobilePhoneListBase()

Empty destructor.

Member Functions Documentation

AddEntryL(const TAny *)

IMPORT_C voidAddEntryL(const TAny *aEntry)[protected]

This member function adds a new entry into the list, placing it in the next empty position.

leave
EListMaxNumberReached This member function will leave if the list fails to allocate memory for the new entry or if the maximum number of entries has been reached.
capability
None

Parameters

const TAny * aEntryPointer to the entry that will be added to the list.

Enumerate()

IMPORT_C TIntEnumerate()const

This member function gets the number of entries currently in the list. This number can therefore be between zero and the maximum number of entries if this attribute has been set.

capability
None

ExternalizeEntryL(const TAny *, RWriteStream &)

voidExternalizeEntryL(const TAny *aPtr,
RWriteStream &aStream
)const [protected, pure virtual]

Pure virtual function that should externalise entry *aPtr into the aStream write stream. This member function is used by ExternalizeL to externalise the separate entries in the list.

Parameters

const TAny * aPtrPointer to the entry to be written to the stream
RWriteStream & aStreamOn return, the write stream.

ExternalizeL(RWriteStream &)

IMPORT_C voidExternalizeL(RWriteStream &aStream)const

This member function externalizes the list contents into a stream.

capability
None

Parameters

RWriteStream & aStreamThe write stream to which to write the list.

GetEntryL(TInt)

IMPORT_C const TAny *GetEntryL(TIntaIndex)const [protected]

This member function retrieves the entry at position aIndex from the list.

A valid index ranges from 0 to count -1, where count is the value returned from CMobilePhoneListBase::Enumerate().

leave
EListIndexOutOfRange This member function will leave if aIndex is outside the current number of entries.
capability
None

Parameters

TInt aIndexIndex of the entry to be retrieved.

InternalizeEntryL(TAny *, RReadStream &)

voidInternalizeEntryL(TAny *aPtr,
RReadStream &aStream
)const [protected, pure virtual]

Pure virtual function that should internalise entry *aPtr from the aStream read stream. This member function is used by InternalizeL to internalise the separate entries in the stream.

Parameters

TAny * aPtrOn return, pointer to the object that will contain the entry.
RReadStream & aStreamThe read stream containing the entry to be internalized.

InternalizeL(RReadStream &)

IMPORT_C voidInternalizeL(RReadStream &aStream)

This member function internalizes the list contents from a stream.

capability
None

Parameters

RReadStream & aStreamThe read stream containing the list.

MaxNumberEntries()

IMPORT_C TIntMaxNumberEntries()const

This member function gets the maximum number of entries that can be stored in this list. This attribute is required because most phone-side storage will have an upper storage limit.

capability
None

RestoreL(const TDesC8 &)

IMPORT_C voidRestoreL(const TDesC8 &aBuf)

This member function will restore the contents of a read stream into the list's internal structure. Restoring the list's contents is necessary after the list has crossed the client-server interface.

This member function uses the aDes parameter as the read stream.

capability
None

Parameters

const TDesC8 & aBufThe read stream used to restore the list from.

SetMaxNumberEntries(TInt)

IMPORT_C voidSetMaxNumberEntries(TIntaMax)

This member function sets the maximum number of entries that can be stored in this list. This member function is intended for use by the TSY only, after it has performed a list retrieval. Clients are able to add new entries to an editable list returned to them but only up to the maximum number.

capability
None

Parameters

TInt aMaxThe (new) maximum number of entries for this list.

StoreL(TDes8 &)

IMPORT_C voidStoreL(TDes8 &aDes)

This member function will store the contents of the list class into a write stream. Placing the list's contents into a store is necessary prior to passing the list across the client-server interface.

This member function uses the aDes parameter as the write stream.

capability
None

Parameters

TDes8 & aDesDescriptor in which to store the list.

StoreLC()

IMPORT_C CBufBase *StoreLC()

Stores the streamed contents of the list into a CBufFlat. Placing the list's contents into a store is necessary prior to passing the list across the client-server interface.

capability
None

Member Enumerations Documentation

Enum anonymous

Enumerators

KMaxEntriesNotSet = - 1

Enum anonymous

Enumerators

EBadRange
EListIndexOutOfRange
EListMaxNumberReached

Member Data Documentation

CArrayFixFlat< TAny > iList

CArrayFixFlat< TAny >iList[protected]

TInt iMaxNumber

TInt iMaxNumber[protected]