CRetrieveMobilePhoneSmsList Class Reference

class CRetrieveMobilePhoneSmsList : public CAsyncRetrieveStoreList

Reads stored, fixed length SMS message list from the phone or SIM message store

Instead of reading each message individually, a client may be able to retrieve multiple messages currently stored in one go. This functionality will be available if the TSY supports reading all SMS. The SMS storage capabilities are returned within the iCaps field of RMobilePhoneStore::TMobilePhoneStoreInfoV1 and this will inform a client what type(s) of storage access the TSY supports. These capabilities will also indicate whether the SMS store contains GSM/WCDMA or CDMA SMS messages. When all SMS entries in a store are read in one go, a list (CMobilePhoneGsmSmsList or CMobilePhoneCdmaSmsList) object will be returned to the client. This object will contain the message entries and the client is able to use the function members of the list class to enumerate and read the message entries.

Due to the probable time taken to retrieve a list, clients must use an asynchronous approach based around the use of this object.

Public Member Functions
~CRetrieveMobilePhoneSmsList()
IMPORT_C CRetrieveMobilePhoneSmsList *NewL(RMobilePhoneStore &, RMobileSmsStore::TMobileSmsEntryExtensionId)
IMPORT_C CMobilePhoneCdmaSmsList *RetrieveCdmaListL()
IMPORT_C CMobilePhoneGsmSmsList *RetrieveGsmListL()
IMPORT_C voidStart(TRequestStatus &)
IMPORT_C voidStartBatch(TRequestStatus &, TInt, TInt)
Protected Member Functions
CRetrieveMobilePhoneSmsList(RMobilePhoneStore &, RMobileSmsStore::TMobileSmsEntryExtensionId)
voidConstructL()
voidInitiateRequest(TRequestStatus &, TBool, TInt, TInt)
voidRestoreListL()
Inherited Functions
CActive::CActive(TInt)
CActive::Cancel()
CActive::Deque()
CActive::Extension_(TUint,TAny *&,TAny *)
CActive::IsActive()const
CActive::IsAdded()const
CActive::Priority()const
CActive::RunError(TInt)
CActive::SetActive()
CActive::SetPriority(TInt)
CActive::~CActive()
CAsyncRetrieveStoreList::CAsyncRetrieveStoreList(RMobilePhoneStore &)
CAsyncRetrieveStoreList::CancelReq(TInt,TInt)
CAsyncRetrieveStoreList::Get(TInt,TRequestStatus &,TDes8 &,TDes8 &)
CAsyncRetrieveStoreList::~CAsyncRetrieveStoreList()
CAsyncRetrieveVariableLengthBufferV2::CAsyncRetrieveVariableLengthBufferV2()
CAsyncRetrieveVariableLengthBufferV2::CompleteIfInUse(TRequestStatus &)
CAsyncRetrieveVariableLengthBufferV2::FreeBuffer()
CAsyncRetrieveVariableLengthBufferV2::Start(TRequestStatus &,TDes8 *,TDes8 *)
CAsyncRetrieveVariableLengthBufferV2::~CAsyncRetrieveVariableLengthBufferV2()
CAsyncRetrieveWithClientIds::CAsyncRetrieveWithClientIds(TInt,TInt)
CBase::CBase()
CBase::Delete(CBase *)
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()
Public Member Enumerations
enumanonymous { KValueNotUsed = -1 }
Inherited Enumerations
CActive:TPriority
CAsyncRetrieveVariableLengthBufferV2:@151
Private Attributes
CMobilePhoneCdmaSmsList *iCdmaResults
RMobileSmsStore::TMobileSmsEntryExtensionId iEntryType
CMobilePhoneGsmSmsList *iGsmResults
TPckgBuf< TBatchRequestData >iRequestData
Inherited Attributes
CActive::iStatus
CAsyncRetrieveStoreList::iStore
CAsyncRetrieveVariableLengthBufferV2::iIpcCancel
CAsyncRetrieveVariableLengthBufferV2::iIpcPhase1
CAsyncRetrieveVariableLengthBufferV2::iIpcPhase2
CAsyncRetrieveVariableLengthBufferV2::iResultsBuf
CAsyncRetrieveVariableLengthBufferV2::iResultsPtr
CAsyncRetrieveVariableLengthBufferV2::iState
CAsyncRetrieveWithClientIds::iId

Constructor & Destructor Documentation

CRetrieveMobilePhoneSmsList(RMobilePhoneStore &, RMobileSmsStore::TMobileSmsEntryExtensionId)

CRetrieveMobilePhoneSmsList(RMobilePhoneStore &aStore,
RMobileSmsStore::TMobileSmsEntryExtensionIdaType
)[protected]

~CRetrieveMobilePhoneSmsList()

IMPORT_C~CRetrieveMobilePhoneSmsList()

The destructor frees all resources owned by the object, prior to its destruction.

Member Functions Documentation

ConstructL()

voidConstructL()[protected]

InitiateRequest(TRequestStatus &, TBool, TInt, TInt)

voidInitiateRequest(TRequestStatus &aReqStatus,
TBoolaBatch,
TIntaStartIndex,
TIntaBatchSize
)[protected]

This method uses the base class's generic Start() method to start either reading the whole list or just a batch of entries

Parameters

TRequestStatus & aReqStatusreturns the result code after the asynchronous call completes
TBool aBatchSpecifies whether a batch or all entries is being read
TInt aStartIndexSpecifies the first index of the batch
TInt aBatchSizeSpecifies how many entries to read after the start

NewL(RMobilePhoneStore &, RMobileSmsStore::TMobileSmsEntryExtensionId)

IMPORT_C CRetrieveMobilePhoneSmsList *NewL(RMobilePhoneStore &aStore,
RMobileSmsStore::TMobileSmsEntryExtensionIdaType
)[static]

This function member creates an instance of the CActive derived CRetrieveMobilePhoneSmsList class.

capability
None

Parameters

RMobilePhoneStore & aStoreAn instance of RMobileSmsStore as this store that the list retrieval class will operate on.
RMobileSmsStore::TMobileSmsEntryExtensionId aTypeSpecifies whether GSM or CDMA message store entries will be retrieved.

RestoreListL()

voidRestoreListL()[protected, virtual]

This method restores a list from a buffer that contains the streamed version of the list

RetrieveCdmaListL()

IMPORT_C CMobilePhoneCdmaSmsList *RetrieveCdmaListL()

These function members will provide the client with a handle to the appropriate CDMA list class retrieved from the store.

The client will call this function member once Start() has completed.

When the client calls this function member the ownership of the list object will transfer to the client, so the client is then responsible for eventual deletion of this object.

leave
KErrNotFound If there is no valid list object to return to the client.
capability
ReadUserData

RetrieveGsmListL()

IMPORT_C CMobilePhoneGsmSmsList *RetrieveGsmListL()

These function members will provide the client with a handle to the appropriate GSM list class retrieved from the store.

The client will call this function member once Start() has completed.

When the client calls this function member the ownership of the list object will transfer to the client, so the client is then responsible for eventual deletion of this object.

leave
KErrNotFound If there is no valid list object to return to the client.
capability
ReadUserData

Start(TRequestStatus &)

IMPORT_C voidStart(TRequestStatus &aReqStatus)

This function member starts the two-phase list retrieval of all entries within the store.

capability
ReadUserData

Parameters

TRequestStatus & aReqStatusOn completion, the status of the request; KErrNone if successful, KErrNotSupported if the phone does not support access to an SMS list store and KErrNotFound if the store does not exist. If the list is empty then KErrNone is returned.

StartBatch(TRequestStatus &, TInt, TInt)

IMPORT_C voidStartBatch(TRequestStatus &aReqStatus,
TIntaStartIndex,
TIntaBatchSize
)

This function member starts the two-phase list retrieval of a batch of entries.

The client must supply the index (i.e. slot location) from which to start the batch retrieval and the number of entries to retrieve in that batch. Please note, that if the client specifies aStartIndex=X and aBatchSize=Y, the TSY should look in slot X to start with and then continue looking in slots until Y used entries are found (or less if the end of the store is reached). When the client receives the batch, the slot index attribute of the last entry in the list is not necessarily equal to aStartIndex+aBatchSize due to the possibility of empty slots.

capability
ReadUserData

Parameters

TRequestStatus & aReqStatusOn return, the status of the request; KErrNone if successful, KErrNotSupported if the phone does not support access to an emergency number store and KErrNotFound if the store does not exist. If the list is empty then KErrNone is returned.
TInt aStartIndexThe slot where the TSY will start looking.
TInt aBatchSizeThe number of entries the TSY will try to get.

Member Enumerations Documentation

Enum anonymous

Enumerators

KValueNotUsed = -1

Member Data Documentation

CMobilePhoneCdmaSmsList * iCdmaResults

CMobilePhoneCdmaSmsList *iCdmaResults[private]

RMobileSmsStore::TMobileSmsEntryExtensionId iEntryType

RMobileSmsStore::TMobileSmsEntryExtensionId iEntryType[private]

CMobilePhoneGsmSmsList * iGsmResults

CMobilePhoneGsmSmsList *iGsmResults[private]

TPckgBuf< TBatchRequestData > iRequestData

TPckgBuf< TBatchRequestData >iRequestData[private]