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>
.
Constructor & Destructor Documentation
CMobilePhoneListBase(TInt, TInt)
IMPORT_C
|
CMobilePhoneListBase
|
(
|
TInt
|
aLength,
|
|
TInt
|
aGranularity
|
|
)
|
[protected]
|
Standard constructor, sets the length of the entries in the list and the granularity of the list.
Parameters
TInt
aLength
|
Length of the CArrayFixFlat<TAny> entries to be stored in the list.
|
TInt
aGranularity
|
Granularity of the list.
|
~CMobilePhoneListBase()
IMPORT_C
|
~CMobilePhoneListBase
|
(
|
)
|
|
Member Functions Documentation
AddEntryL(const TAny *)
IMPORT_C void
|
AddEntryL
|
(
|
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
* aEntry
|
Pointer to the entry that will be added to the list.
|
Enumerate()
IMPORT_C
TInt
|
Enumerate
|
(
|
)
|
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.
ExternalizeEntryL(const TAny *, RWriteStream &)
void
|
ExternalizeEntryL
|
(
|
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
* aPtr
|
Pointer to the entry to be written to the stream
|
RWriteStream
& aStream
|
On return, the write stream.
|
ExternalizeL(RWriteStream &)
This member function externalizes the list contents into a stream.
Parameters
RWriteStream
& aStream
|
The write stream to which to write the list.
|
GetEntryL(TInt)
IMPORT_C const
TAny
*
|
GetEntryL
|
(
|
TInt
|
aIndex
|
)
|
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
aIndex
|
Index of the entry to be retrieved.
|
InternalizeEntryL(TAny *, RReadStream &)
void
|
InternalizeEntryL
|
(
|
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
* aPtr
|
On return, pointer to the object that will contain the entry.
|
RReadStream
& aStream
|
The read stream containing the entry to be internalized.
|
InternalizeL(RReadStream &)
This member function internalizes the list contents from a stream.
Parameters
RReadStream
& aStream
|
The read stream containing the list.
|
MaxNumberEntries()
IMPORT_C
TInt
|
MaxNumberEntries
|
(
|
)
|
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.
RestoreL(const TDesC8 &)
IMPORT_C void
|
RestoreL
|
(
|
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.
Parameters
const
TDesC8
& aBuf
|
The read stream used to restore the list from.
|
SetMaxNumberEntries(TInt)
IMPORT_C void
|
SetMaxNumberEntries
|
(
|
TInt
|
aMax
|
)
|
|
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.
Parameters
TInt
aMax
|
The (new) maximum number of entries for this list.
|
StoreL(TDes8 &)
IMPORT_C void
|
StoreL
|
(
|
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.
Parameters
TDes8
& aDes
|
Descriptor in which to store the list.
|
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.
Member Enumerations Documentation
Enum anonymous
Enumerators
EBadRange
|
|
EListIndexOutOfRange
|
|
EListMaxNumberReached
|
|
Member Data Documentation
CArrayFixFlat< TAny > iList
TInt
iMaxNumber
TInt
|
iMaxNumber
|
[protected]
|
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.