RMobilePhoneStore Class Reference

class RMobilePhoneStore : public RTelSubSessionBase

Abstract class used to define common phone storage actions and types

Clients open one of the specialised phone store classes that are derived from RMobilePhoneStore

Inherits from

Public Member Functions
IMPORT_C voidDelete(TRequestStatus &, TInt)
IMPORT_C voidDeleteAll(TRequestStatus &)
IMPORT_C voidGetInfo(TRequestStatus &, TDes8 &)
IMPORT_C voidNotifyStoreEvent(TRequestStatus &, TUint32 &, TInt &)
IMPORT_C voidRead(TRequestStatus &, TDes8 &)
IMPORT_C voidWrite(TRequestStatus &, TDes8 &)
Protected Member Functions
RMobilePhoneStore()
IMPORT_C voidBaseConstruct(CMobilePhoneStorePtrHolder *)
IMPORT_C voidDestruct()
Inherited Functions
RSubSessionBase::CloseSubSession(TInt)
RSubSessionBase::CreateAutoCloseSubSession(RSessionBase &,TInt,const TIpcArgs &)
RSubSessionBase::CreateSubSession(const RSessionBase &,TInt)
RSubSessionBase::CreateSubSession(const RSessionBase &,TInt,const TIpcArgs &)
RSubSessionBase::RSubSessionBase()
RSubSessionBase::Send(TInt)const
RSubSessionBase::Send(TInt,const TIpcArgs &)const
RSubSessionBase::SendReceive(TInt)const
RSubSessionBase::SendReceive(TInt,TRequestStatus &)const
RSubSessionBase::SendReceive(TInt,const TIpcArgs &)const
RSubSessionBase::SendReceive(TInt,const TIpcArgs &,TRequestStatus &)const
RSubSessionBase::Session()const
RSubSessionBase::SubSessionHandle()const
RTelSubSessionBase::Blank(const TInt,TReqPriorityType)const
RTelSubSessionBase::Blank(const TInt,TRequestStatus &,TReqPriorityType)const
RTelSubSessionBase::CancelAsyncRequest(TInt)const
RTelSubSessionBase::CancelReq(const TInt,const TInt)const
RTelSubSessionBase::CancelSubSession()const
RTelSubSessionBase::Get(const TInt,TDes16 &,TDes16 &,TReqPriorityType)const
RTelSubSessionBase::Get(const TInt,TDes16 &,TReqPriorityType)const
RTelSubSessionBase::Get(const TInt,TDes8 &,TDes16 &,TReqPriorityType)const
RTelSubSessionBase::Get(const TInt,TDes8 &,TDes8 &,TReqPriorityType)const
RTelSubSessionBase::Get(const TInt,TDes8 &,TReqPriorityType)const
RTelSubSessionBase::Get(const TInt,TRequestStatus &,TDes16 &,TDes16 &,TReqPriorityType)const
RTelSubSessionBase::Get(const TInt,TRequestStatus &,TDes16 &,TReqPriorityType)const
RTelSubSessionBase::Get(const TInt,TRequestStatus &,TDes8 &,TDes16 &,TReqPriorityType)const
RTelSubSessionBase::Get(const TInt,TRequestStatus &,TDes8 &,TDes8 &,TReqPriorityType)const
RTelSubSessionBase::Get(const TInt,TRequestStatus &,TDes8 &,TReqPriorityType)const
RTelSubSessionBase::RTelSubSessionBase()
RTelSubSessionBase::ResetSessionHandle()
RTelSubSessionBase::SessionHandle()const
RTelSubSessionBase::Set(const TInt,TRequestStatus &,const TDesC16 &,TReqPriorityType)const
RTelSubSessionBase::Set(const TInt,TRequestStatus &,const TDesC16 &,const TDesC16 &,TReqPriorityType)const
RTelSubSessionBase::Set(const TInt,TRequestStatus &,const TDesC8 &,TReqPriorityType)const
RTelSubSessionBase::Set(const TInt,TRequestStatus &,const TDesC8 &,const TDesC16 &,TReqPriorityType)const
RTelSubSessionBase::Set(const TInt,TRequestStatus &,const TDesC8 &,const TDesC8 &,TReqPriorityType)const
RTelSubSessionBase::Set(const TInt,const RFile &,TReqPriorityType)const
RTelSubSessionBase::Set(const TInt,const TDesC16 &,TReqPriorityType)const
RTelSubSessionBase::Set(const TInt,const TDesC16 &,const TDesC16 &,TReqPriorityType)const
RTelSubSessionBase::Set(const TInt,const TDesC8 &,TReqPriorityType)const
RTelSubSessionBase::Set(const TInt,const TDesC8 &,const TDesC16 &,TReqPriorityType)const
RTelSubSessionBase::Set(const TInt,const TDesC8 &,const TDesC8 &,TReqPriorityType)const
RTelSubSessionBase::SetAndGet(const TInt,TRequestStatus &,TDes8 &,const TDesC16 &,TReqPriorityType)const
RTelSubSessionBase::SetAndGet(const TInt,TRequestStatus &,const TDesC16 &,TDes16 &,TReqPriorityType)const
RTelSubSessionBase::SetAndGet(const TInt,TRequestStatus &,const TDesC8 &,TDes16 &,TReqPriorityType)const
RTelSubSessionBase::SetAndGet(const TInt,TRequestStatus &,const TDesC8 &,TDes8 &,TReqPriorityType)const
RTelSubSessionBase::SetSessionHandle(RSessionBase &)
RTelSubSessionBase::SubSessionHandle()
Public Member Enumerations
enumTMobilePhoneStoreCaps {
KCapsWholeStore = 0x80000000, KCapsIndividualEntry = 0x40000000, KCapsReadAccess = 0x20000000, KCapsWriteAccess = 0x10000000, KCapsDeleteAll = 0x08000000, KCapsNotifyEvent = 0x04000000
}
enumTMobilePhoneStoreInfoExtId {
KETelMobilePhoneStoreV1 = KETelExtMultimodeV1, KETelMobilePhonebookStoreV1, KETelMobileSmsStoreV1, KETelMobileNamStoreV1, KETelMobileONStoreV1, KETelMobileENStoreV1, KETelMobilePhonebookStoreV2 = KETelExtMultimodeV2, KETelMobilePhonebookStoreV5 = KEtelExtMultimodeV5
}
enumTMobilePhoneStoreType {
EPhoneStoreTypeUnknown, EShortMessageStore, ENamStore, EPhoneBookStore, EEmergencyNumberStore, EOwnNumberStore
}
enumTMobileStoreEvent {
KStoreFull = 0x00000001, KStoreHasSpace = 0x00000002, KStoreEmpty = 0x00000004, KStoreEntryAdded = 0x00000008, KStoreEntryDeleted = 0x00000010, KStoreEntryChanged = 0x00000020, KStoreDoRefresh = 0x00000040
}
Inherited Enumerations
RTelSubSessionBase:TReqPriorityType
Public Member Type Definitions
typedef TPckg< TMobilePhoneStoreInfoV1 > TMobilePhoneStoreInfoV1Pckg
Protected Attributes
CMobilePhoneStorePtrHolder *iStorePtrHolder
Inherited Attributes
RTelSubSessionBase::iPtrHolder

Constructor & Destructor Documentation

RMobilePhoneStore()

RMobilePhoneStore()[protected]

Constructor.

Member Functions Documentation

BaseConstruct(CMobilePhoneStorePtrHolder *)

IMPORT_C voidBaseConstruct(CMobilePhoneStorePtrHolder *aPtrHolder)[protected]
capability
None

Parameters

CMobilePhoneStorePtrHolder * aPtrHolder

Delete(TRequestStatus &, TInt)

IMPORT_C voidDelete(TRequestStatus &aReqStatus,
TIntaIndex
)const

This member function deletes the entry in the slot.

Use RTelSubSessionBase::CancelAsyncRequest(EMobilePhoneStoreDelete) to cancel a previously placed asynchronous Delete() request.

capability
WriteUserData

Parameters

TRequestStatus & aReqStatusOn return, KErrNone if successful, KErrNotFound if the slot is empty
TInt aIndexThe slot entry to delete.

DeleteAll(TRequestStatus &)

IMPORT_C voidDeleteAll(TRequestStatus &aReqStatus)const

This member function deletes all the entries in the store.

Use RTelSubSessionBase::CancelAsyncRequest(EMobilePhoneStoreDeleteAll) to cancel a previously placed asynchronous DeleteAll() request.

capability
WriteUserData

Parameters

TRequestStatus & aReqStatusOn return, KErrNone if successful, KErrNotFound if the store is empty

Destruct()

IMPORT_C voidDestruct()[protected]
Standard destructor.
capability
None

GetInfo(TRequestStatus &, TDes8 &)

IMPORT_C voidGetInfo(TRequestStatus &aReqStatus,
TDes8 &aInfo
)const

This member function gets information about the selected store.

This information includes the store's name, the type of thing it stores, the total number of storage slots and the number of used slots. It does not give information about which slots are filled and which are empty.

Defined in RMobilePhoneBookStore::TMobilePhoneStoreInfoV1::iExtensionId is the type of class that is being used. See TMobilePhoneStoreInfoExtId for the different possible types.

Use RTelSubSessionBase::CancelAsyncRequest(EMobilePhoneStoreGetInfo) to cancel a previously placed asynchronous GetInfo() request.

capability
ReadUserData

Parameters

TRequestStatus & aReqStatusOn return, KErrNone if successful.
TDes8 & aInfoOn completion, a from RMobilePhoneBookStore::TMobilePhoneBookInfoV1 derived packaged class.

NotifyStoreEvent(TRequestStatus &, TUint32 &, TInt &)

IMPORT_C voidNotifyStoreEvent(TRequestStatus &aReqStatus,
TUint32 &aEvent,
TInt &aIndex
)const

This member functions allows a client to be notified when one or more of the events occurs to the store.

These events allow a client to know the overall status of a store (full, empty etc.) and also when a slot within a store changes. A slot could change because another client or the phone has created, updated or deleted an entry.

Use RTelSubSessionBase::CancelAsyncRequest(EMobilePhoneStoreNotifyStoreEvent) to cancel a previously placed asynchronous NotifyStoreEvent() request.

capability
ReadUserData

Parameters

TRequestStatus & aReqStatusOn return, KErrNone if successful
TUint32 & aEventOn completion, the TMobileStoreEvent.
TInt & aIndexOn completion, the index of the changed slot. If multiple entries have been added or deleted then it will not be possible to return the indices of these entries, so the TSY could trigger the KStoreDoRefresh event.

Read(TRequestStatus &, TDes8 &)

IMPORT_C voidRead(TRequestStatus &aReqStatus,
TDes8 &aEntry
)const

This overloaded member function reads the entry in the slot specified.

This member function is implemented using a TDes8 descriptor for aEntry so that any kind of store entry can be read from any kind of store using this common member function. For example, a client will have opened one of the specialised store sub-sessions, e.g. RMobileONStore. The client will read a store entry by packaging the specialised store's entry definition into its associated packaged version. In the own number store example, the client will have a RMobileONStore::TMobileONEntryV1 which it will put into a RMobileONStore::TMobileONEntryV1Pckg. The packaged version will be passed to the Read() request.

This function has a specialised version in the RMobilePhoneBookStore

Use RTelSubSessionBase::CancelAsyncRequest(EMobilePhoneStoreRead) to cancel a previously placed asynchronous Read() request.

capability
ReadUserData

Parameters

TRequestStatus & aReqStatusOn return, KErrNone if successful, KErrNotFound if the slot specified by iIndex is empty.
TDes8 & aEntryThe iIndex field specifies what entry to read. On completion, the entry data will be filled in.

Write(TRequestStatus &, TDes8 &)

IMPORT_C voidWrite(TRequestStatus &aReqStatus,
TDes8 &aEntry
)const

This overloaded member function writes the entry into the store.

This member function is implemented using a TDes8 descriptor for aEntry so that any kind of store entry can be read from any kind of store using this common member function. For example, a client will have opened one of the specialised store sub-sessions, eg. RMobileONStore. The client will read a store entry by packaging the specialised store's entry definition into its associated packaged version. In the own number store example, the client will have a RMobileONStore::TMobileONEntryV1 which it will put into a RMobileONStore::TMobileONEntryV1Pckg. The packaged version will be passed to the Write() request.

This function has a specialised version in the RMobilePhoneBookStore

Use RTelSubSessionBase::CancelAsyncRequest(EMobilePhoneStoreWrite) to cancel a previously placed asynchronous Write() request.

capability
WriteUserData

Parameters

TRequestStatus & aReqStatusOn return, KErrNone if successful.
TDes8 & aEntryThe packaged entry to write in the store. If aEntry.index==-1 the TSY will store the entry in the first free location and then return this location within aEntry.iIndex when it completes the request

Member Enumerations Documentation

Enum TMobilePhoneStoreCaps

Store capabilities.

Enumerators

KCapsWholeStore = 0x80000000

The store can be accessed as a whole using the ReadAll() and StoreAll() member functions.

KCapsIndividualEntry = 0x40000000

The store can be accessed one entry at a time using the RMobilePhoneStore::Read(), RMobilePhoneStore::Write() and RMobilePhoneStore::Delete() member functions.

KCapsReadAccess = 0x20000000

The store can be accessed in order to read entries.

KCapsWriteAccess = 0x10000000

The store can be accessed in order to write or delete entries.

KCapsDeleteAll = 0x08000000

The TSY supports deleting all the store entries at once.

KCapsNotifyEvent = 0x04000000

The TSY supports notification of store events such as entries added, deleted or store becoming full.

Enum TMobilePhoneStoreInfoExtId

The type of store information. As defined in TMobilePhoneStoreInfoV1::iExtensionId

Modes: Common

TMobilePhoneStoreInfoV1 RMobilePhone::TMultimodeType

Enumerators

KETelMobilePhoneStoreV1 = KETelExtMultimodeV1

The iExtensionId contents indicate that the packaged class is a RMobilePhoneStore::TMobilePhoneStoreInfoV1. Modes: Common

KETelMobilePhonebookStoreV1

The iExtensionId contents indicate that the packaged class is a RMobilePhoneBookStore::TMobilePhoneBookInfoV1. Modes: Common

KETelMobileSmsStoreV1

Reserved for SMS store specific information class. Modes: Common

KETelMobileNamStoreV1

The iExtensionId contents indicate that the packaged class is a RMobileNamStore::TMobileNamStoreInfoV1. Modes: CDMA 9.5

KETelMobileONStoreV1

The iExtensionId contents indicate that the packaged class is a RMobileONStore::TMobileONStoreInfoV1. Modes: Common

KETelMobileENStoreV1

Reserved for Emergency Number store specific infoprmation class. Modes: Common

KETelMobilePhonebookStoreV2 = KETelExtMultimodeV2

The iExtensionId contents indicate that the packaged class is a TMobilePhoneBookInfoV2. Modes: Common

KETelMobilePhonebookStoreV5 = KEtelExtMultimodeV5

The iExtensionId contents indicate that the packaged class is a TMobilePhoneBookInfoV2. Modes: Common

Enum TMobilePhoneStoreType

Types of store.

Modes: Common

Enumerators

EPhoneStoreTypeUnknown

Store type is unknown.

Modes: Common

EShortMessageStore

Store contains SMS messages.

Modes: Common

ENamStore

Store contains NAM entries.

Modes: CDMA 9.5

EPhoneBookStore

Store contains PhoneBook entries.

Modes: Common

EEmergencyNumberStore

Store contains emergency number entries.

Modes: Common

EOwnNumberStore

Store contains own number entries.

Modes: Common

Enum TMobileStoreEvent

The store events. It is possible for more than one event to occur at the same time, therefore the events are a bitmask and should be tested as a bitmask.

Modes: Common

NotifyStoreEvent()

Enumerators

KStoreFull = 0x00000001

The store has become full. This event will trigger after the last possible entry in a store has been written.

KStoreHasSpace = 0x00000002

The store was full but now has some space. This event will trigger after one or more entries have been deleted from a full store.

KStoreEmpty = 0x00000004

The store is empty. This event will trigger after the last entry in a store has been deleted or if all entries are deleted at once.

KStoreEntryAdded = 0x00000008

The store has a new entry, placed in the slot indicated by the aIndex parameter.

KStoreEntryDeleted = 0x00000010

The store has deleted the entry that was in the slot indicated by the aIndex parameter.

KStoreEntryChanged = 0x00000020

The store has changed the entry that was in the slot indicated by the aIndex parameter.

KStoreDoRefresh = 0x00000040

The store contents have substantially changed and the TSY is recommending that the client performs a refresh by reading all the contents again.

Member Type Definitions Documentation

Typedef TMobilePhoneStoreInfoV1Pckg

typedef TPckg< TMobilePhoneStoreInfoV1 >TMobilePhoneStoreInfoV1Pckg

A typedef'd packaged TMobilePhoneStoreInfoV1 for passing through a generic API member function.

Member Data Documentation

CMobilePhoneStorePtrHolder * iStorePtrHolder

CMobilePhoneStorePtrHolder *iStorePtrHolder[protected]