CMmsSettings Class Reference

class CMmsSettings : public CBase
CMmsSettings contains all Mms Engine's settings. Loading and Saving methods are offered as well as accessors for all setting values. Mutators are offered to most of the settings, but there are a few 'read-only' settings. mmsserversettings.lib
Since
3.0

Inherits from

Public Member Functions
~CMmsSettings ()
TBool AcceptAdvertisementMessages ()
TBool AcceptAnonymousMessages ()
TBool AcceptInformationalMessages ()
TBool AcceptPersonalMessages ()
IMPORT_C TInt32 AccessPoint ( TInt )
TInt AccessPointCount ()
IMPORT_C void AddAccessPointL ( TUint32 , TInt )
TMsvId ApplicationFolder ()
IMPORT_C void CopyL (const CMmsSettings &)
IMPORT_C TInt CreateFolderEntryL ( CMsvSession &, TMsvId , const TDesC &, TMsvId &)
IMPORT_C void CreateNewServiceL ( CMsvSession &)
TInt32 CreationMode ()
IMPORT_C void DeleteAccessPointL ( TInt )
TInt32 DeliveryReportSendingAllowed ()
TInt32 DeliveryReportWanted ()
TInt32 ExpiryInterval ()
TInt ExpiryOvershoot ()
TBool FetchOverride ()
IMPORT_C TMsvId FolderEntryL ( CMsvSession &, TMsvId , const TDesC &)
TInt32 ImageHeight ()
TInt32 ImageWidth ()
IMPORT_C void LoadSettingsL ()
TBool LocalMode ()
const TDesC & LocalModeIn ()
const TDesC & LocalModeOut ()
TBool LogEmailRecipients ()
TMsvId MMBoxFolder ()
TInt32 MaximumReceiveSize ()
TInt32 MaximumSendSize ()
TInt32 MessageClass ()
TInt32 MessagePriority ()
TInt16 MmsVersion ()
TBool MoveToSent ()
IMPORT_C CMmsSettings * NewL ()
TMsvId NotificationFolder ()
TBool ReadReplyReportSendingAllowed ()
TInt32 ReadReplyReportWanted ()
TMmsReceivingMode ReceivingModeForeign ()
TMmsReceivingMode ReceivingModeHome ()
IMPORT_C void Reset ()
IMPORT_C void RestoreFactorySettingsL ( CMsvSession &, TMmsFactorySettingsLevel )
IMPORT_C void SaveSettingsL ()
TInt32 SenderVisibility ()
TMsvId Service ()
void SetAcceptAdvertisementMessages ( TBool )
void SetAcceptAnonymousMessages ( TBool )
void SetAcceptInformationalMessages ( TBool )
void SetAcceptPersonalMessages ( TBool )
void SetCreationMode ( TMmsCreationMode )
void SetDeliveryReportSendingAllowed ( TInt32 )
void SetDeliveryReportWanted ( TInt32 )
void SetExpiryInterval ( TInt32 )
void SetFetchOverride ( TBool )
void SetImageHeight ( TInt32 )
void SetImageWidth ( TInt32 )
void SetLocalMode ( TBool )
void SetLocalModeIn (const TDesC &)
void SetLocalModeOut (const TDesC &)
void SetLogEmailRecipients ( TBool )
void SetMessageClass ( TMmsMessageClass )
void SetMessagePriority ( TMmsMessagePriority )
void SetReadReplyReportSendingAllowed ( TBool )
void SetReadReplyReportWanted ( TInt32 )
void SetReceivingModeForeign ( TMmsReceivingMode )
void SetReceivingModeHome ( TMmsReceivingMode )
void SetSenderVisibility ( TMmsMessageSenderVisibility )
TInt32 SettingsVersion ()
TBool ShowSentTime ()
IMPORT_C TInt ValidateSettings ()
Private Member Functions
CMmsSettings ()
CRepository * ConnectCenRepL (const TUid )
void ConstructL ()
void SaveAccesspointArrayL ()
void SaveSetting ( TUint32 , TInt )
Inherited Functions
CBase::CBase()
CBase::Delete(CBase *)
CBase::Extension_(TUint,TAny *&,TAny *)
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()
Private Attributes
TBool iAcceptAdvertisement
TBool iAcceptAnonymous
TBool iAcceptInformational
TBool iAcceptPersonal
RArray < TUint32 > iAccesspointArray
TMsvId iApplicationFolderId
TInt32 iCreationMode
TMsvId iDefaultServiceId
TInt32 iDeliveryReportAllowed
TInt32 iDeliveryReportWanted
TInt32 iExpiryInterval
TInt iExpiryOvershoot
TBool iFetchOverride
TInt32 iImageHeight
TInt32 iImageWidth
TBool iLocalMode
HBufC * iLocalModeDir
TBool iLogEmailRecipients
TMsvId iMMBoxFolderId
TInt32 iMaxReceiveSize
TInt32 iMaxSendSize
TInt32 iMessageClass
TInt32 iMessagePriority
CRepository * iMmsRepository
TInt16 iMmsVersion
TBool iMoveToSent
TMsvId iNotificationFolderId
TBool iReadReplyReportAllowed
TInt32 iReadReplyReportWanted
TInt32 iReceivingModeForeign
TInt32 iReceivingModeHome
TInt32 iSenderVisibility
TInt32 iSettingsVersion
TBool iShowSentTime

Constructor & Destructor Documentation

CMmsSettings()

CMmsSettings ( ) [private]

C++ default constructor.

~CMmsSettings()

~CMmsSettings ( ) [virtual]

Destructor.

Member Functions Documentation

AcceptAdvertisementMessages()

TBool AcceptAdvertisementMessages ( ) const [inline]

Get accept advertisement messages flag.

AcceptAnonymousMessages()

TBool AcceptAnonymousMessages ( ) const [inline]

Get accept anonymous messages flag (anonymous message == message without From: field).

AcceptInformationalMessages()

TBool AcceptInformationalMessages ( ) const [inline]

Get accept informational messages flag.

AcceptPersonalMessages()

TBool AcceptPersonalMessages ( ) const [inline]

Get accept personal messages flag.

AccessPoint(TInt)

IMPORT_C TInt32 AccessPoint ( TInt aIndex ) const

AccessPoint is accessor for accesspoint array

Parameters

TInt aIndex

AccessPointCount()

TInt AccessPointCount ( ) const [inline]

AccessPointCount

AddAccessPointL(TUint32, TInt)

IMPORT_C void AddAccessPointL ( TUint32 aAccessPointId,
TInt aIndex
)

Adds an accesspoint id to a specific index in the array

Parameters

TUint32 aAccessPointId specifies the accesspoint id
TInt aIndex specifies the array index

ApplicationFolder()

TMsvId ApplicationFolder ( ) const [inline]

Gets application folder id

ConnectCenRepL(const TUid)

CRepository * ConnectCenRepL ( const TUid aRepositoryId ) [private]

Utility to connect to a particular CenRep

Parameters

const TUid aRepositoryId

ConstructL()

void ConstructL ( ) [private]

By default EPOC constructor is private.

CopyL(const CMmsSettings &)

IMPORT_C void CopyL ( const CMmsSettings & aMmsSettings )

CopyL copies the contents (member values) from aMmsSettings.

Parameters

const CMmsSettings & aMmsSettings refernce to another CMmsSettings object

CreateFolderEntryL(CMsvSession &, TMsvId, const TDesC &, TMsvId &)

IMPORT_C TInt CreateFolderEntryL ( CMsvSession & aSession,
TMsvId aParentFolder,
const TDesC & aFolderName,
TMsvId & aFolderId
)

CreateFolderEntryL creates a new folder entry under a given folder with 'aFolderName' name.

Parameters

CMsvSession & aSession messageserver session
TMsvId aParentFolder a folder, under which the new folder is created.
const TDesC & aFolderName
TMsvId & aFolderId entry id of the new folder or if the folder already exists, the folder id of the existing folder

CreateNewServiceL(CMsvSession &)

IMPORT_C void CreateNewServiceL ( CMsvSession & aSession )

Creates a new service entry into messagestore and saves the entryid into CenRep. The invisible Notification folder and MMBox folder will also be created. Before creating new entries, MessageStore is first searched for old entries. If old entries are found, they will be used. Note that the method can be called only from client side of the Messaging architecture.

Parameters

CMsvSession & aSession

CreationMode()

TInt32 CreationMode ( ) const [inline]

Get MMS creation mode

DeleteAccessPointL(TInt)

IMPORT_C void DeleteAccessPointL ( TInt aIndex )

Deletes an accesspoint id from a specific index in the array

Parameters

TInt aIndex specifies the array index

DeliveryReportSendingAllowed()

TInt32 DeliveryReportSendingAllowed ( ) const [inline]

Get Delivery report sending allowed

DeliveryReportWanted()

TInt32 DeliveryReportWanted ( ) const [inline]

Get delivery report wanted code.

ExpiryInterval()

TInt32 ExpiryInterval ( ) const [inline]

ExpiryInterval refers to messages expiration interval in the network.

ExpiryOvershoot()

TInt ExpiryOvershoot ( ) const [inline]

Get the value (in seconds) that the expiry interval can be exceeded and message fetching will still be attempted.

FetchOverride()

TBool FetchOverride ( ) const [inline]

FetchOverride specifies whether message should be retrieved regardless of what has been set to receiving mode value. This setting is not saved in Central Repository, but instead it is handled "on the fly".

FolderEntryL(CMsvSession &, TMsvId, const TDesC &)

IMPORT_C TMsvId FolderEntryL ( CMsvSession & aSession,
TMsvId aParentFolder,
const TDesC & aFolderName
)

Gets a folder entry id under a given folder id with 'aFolderName' name.

Parameters

CMsvSession & aSession messageserver session
TMsvId aParentFolder a folder, under where the folder is searched
const TDesC & aFolderName name of folder entry

ImageHeight()

TInt32 ImageHeight ( ) const [inline]

Get image height.

ImageWidth()

TInt32 ImageWidth ( ) const [inline]

Get image width.

LoadSettingsL()

IMPORT_C void LoadSettingsL ( )

LoadSettingsL loads the settings from Central Repository

LocalMode()

TBool LocalMode ( ) const [inline]

Get MMS local mode (Localmode is for test purposes only)

LocalModeIn()

const TDesC & LocalModeIn ( ) [inline]

LocalModeIn returns the directory path for incoming localmode messages

LocalModeOut()

const TDesC & LocalModeOut ( ) [inline]

LocalModeOut returns the directory path for outgoing localmode messages

LogEmailRecipients()

TBool LogEmailRecipients ( ) const [inline]

Get logging state of messages to Email recipients

MMBoxFolder()

TMsvId MMBoxFolder ( ) const [inline]

Gets mmbox folder id

MaximumReceiveSize()

TInt32 MaximumReceiveSize ( ) const [inline]

Get maximum size of messages that can be received in bytes.

MaximumSendSize()

TInt32 MaximumSendSize ( ) const [inline]

Get maximum size of messages that can be sent in bytes.

MessageClass()

TInt32 MessageClass ( ) const [inline]

Get default message class.

MessagePriority()

TInt32 MessagePriority ( ) const [inline]

Get message priority.

MmsVersion()

TInt16 MmsVersion ( ) const [inline]
Get the current MMS encapsulation versio
Since
3.2

MoveToSent()

TBool MoveToSent ( ) const [inline]

MoveToSent returns a boolean specifying whether messages are moved to sent folder after they have been successfully sent. If not, the message will be deleted. This setting is common to all messaging types.

NewL()

IMPORT_C CMmsSettings * NewL ( ) [static]

Two-phased constructor.

NotificationFolder()

TMsvId NotificationFolder ( ) const [inline]

Gets notification folder id

ReadReplyReportSendingAllowed()

TBool ReadReplyReportSendingAllowed ( ) const [inline]

Get read report sending allowed value. Specifies if the terminal is allowed to send a read report when the message is opened the first time and the sender has requested a read report

ReadReplyReportWanted()

TInt32 ReadReplyReportWanted ( ) const [inline]

Get Read report wanted setting. Specifies if the user wants a report for each message when the recipient opens the message the first time

ReceivingModeForeign()

TMmsReceivingMode ReceivingModeForeign ( ) const [inline]

ReceivingModeForeign

ReceivingModeHome()

TMmsReceivingMode ReceivingModeHome ( ) const [inline]

ReceivingModeHome

Reset()

IMPORT_C void Reset ( )

Reset clears the member variables representing Mms settings (the method does not modify data in CenRep).

RestoreFactorySettingsL(CMsvSession &, TMmsFactorySettingsLevel)

IMPORT_C void RestoreFactorySettingsL ( CMsvSession & aSession,
TMmsFactorySettingsLevel aLevel
)

Parameters

CMsvSession & aSession
TMmsFactorySettingsLevel aLevel

SaveAccesspointArrayL()

void SaveAccesspointArrayL ( ) [private]

Handles saving of AP array The method assumes that connection to CenRep has been already created.

SaveSetting(TUint32, TInt)

void SaveSetting ( TUint32 aKey,
TInt aValue
) [private]

Handles saving of one integer value to CenRep. First, settings tried to be set normally, but if it turns out that such key does not exist, it will be created. The method assumes that connection to CenRep has been already created.

Parameters

TUint32 aKey refers to CenRep key
TInt aValue contains the value to be saved

SaveSettingsL()

IMPORT_C void SaveSettingsL ( )

SaveSettingsL saves the settings to Central Repository

SenderVisibility()

TInt32 SenderVisibility ( ) const [inline]

SenderVisibility

Service()

TMsvId Service ( ) const [inline]

Gets default service for MMS

SetAcceptAdvertisementMessages(TBool)

void SetAcceptAdvertisementMessages ( TBool aAdvertisementsAllowed = ETrue ) [inline]

Set acceptance flag for advertisement messages.

Parameters

TBool aAdvertisementsAllowed = ETrue

SetAcceptAnonymousMessages(TBool)

void SetAcceptAnonymousMessages ( TBool aAnonymousAllowed = ETrue ) [inline]

Set acceptance flag for anonymous messages

Parameters

TBool aAnonymousAllowed = ETrue

SetAcceptInformationalMessages(TBool)

void SetAcceptInformationalMessages ( TBool aInformationalAllowed = ETrue ) [inline]

Set acceptance flag for informational messages

Parameters

TBool aInformationalAllowed = ETrue

SetAcceptPersonalMessages(TBool)

void SetAcceptPersonalMessages ( TBool aPersonalAllowed = ETrue ) [inline]

Set acceptance flag for personal messages.

Parameters

TBool aPersonalAllowed = ETrue

SetCreationMode(TMmsCreationMode)

void SetCreationMode ( TMmsCreationMode aCreationMode ) [inline]

Set MMS Creation Mode

Parameters

TMmsCreationMode aCreationMode Possible values: EMmsCreationModeRestricted, EMmsCreationModeWarning (default), EMmsCreationModeFree

SetDeliveryReportSendingAllowed(TInt32)

void SetDeliveryReportSendingAllowed ( TInt32 aDeliveryReportSendingAllowed ) [inline]

Set Delivery report sending allowed

Parameters

TInt32 aDeliveryReportSendingAllowed

SetDeliveryReportWanted(TInt32)

void SetDeliveryReportWanted ( TInt32 aDeliveryReportWanted ) [inline]

Set delivery report wanted

Parameters

TInt32 aDeliveryReportWanted

SetExpiryInterval(TInt32)

void SetExpiryInterval ( TInt32 aExpiryInterval ) [inline]

SetExpiryInterval

Parameters

TInt32 aExpiryInterval message expiration interval in seconds Recommended values: 0 ( = maximum allowed by MMSC ) 1 * 3600( 1 hour ) 6 * 3600( 6 hours ) 24 * 3600( 24 hours ) 72 * 3600( 3 days = 72 hours ) 168 * 3600 ( 1 week = 168 hours ) Default value 0

SetFetchOverride(TBool)

void SetFetchOverride ( TBool aOverride ) [inline]

SetFetchOverride

Parameters

TBool aOverride

SetImageHeight(TInt32)

void SetImageHeight ( TInt32 aImageHeight ) [inline]

Set image height.

Parameters

TInt32 aImageHeight image height in pixels

SetImageWidth(TInt32)

void SetImageWidth ( TInt32 aImageWidth ) [inline]

Set image width.

Parameters

TInt32 aImageWidth image width in pixels

SetLocalMode(TBool)

void SetLocalMode ( TBool aLocalMode ) [inline]

Set MMS local mode (Localmode is for test purposes only)

Parameters

TBool aLocalMode specifying whether normal or local mode is in use.

SetLocalModeIn(const TDesC &)

void SetLocalModeIn ( const TDesC & aPath ) [inline]

SetLocalModeIn sets the directory path for incoming localmode messages

Parameters

const TDesC & aPath

SetLocalModeOut(const TDesC &)

void SetLocalModeOut ( const TDesC & aPath ) [inline]

SetLocalModeOut sets the directory path for incoming localmode messages

Parameters

const TDesC & aPath

SetLogEmailRecipients(TBool)

void SetLogEmailRecipients ( TBool aEmailLogging ) [inline]

Set logging state of messages to Email recipients

Parameters

TBool aEmailLogging

SetMessageClass(TMmsMessageClass)

void SetMessageClass ( TMmsMessageClass aMessageClass ) [inline]

Set default message class.

Parameters

TMmsMessageClass aMessageClass message class code Possible values: EMmsClassPersonal (default), EMmsClassAdvertisement, EMmsClassInformational

SetMessagePriority(TMmsMessagePriority)

void SetMessagePriority ( TMmsMessagePriority aMessagePriority ) [inline]

Set message priority

Parameters

TMmsMessagePriority aMessagePriority

SetReadReplyReportSendingAllowed(TBool)

void SetReadReplyReportSendingAllowed ( TBool aReadReplyReportSendingAllowed ) [inline]

Set read report sending allowed code. Specifies if the terminal is allowed to send a read report when the message is opened the first time and the sender has requested a read report

Parameters

TBool aReadReplyReportSendingAllowed read report sending allowed value (ETrue or EFalse).

SetReadReplyReportWanted(TInt32)

void SetReadReplyReportWanted ( TInt32 aReadReplyReportWanted ) [inline]

Set Read report wanted setting. Specifies if the user wants a report for each message when the recipient opens the message the first time

Parameters

TInt32 aReadReplyReportWanted read report wanted code Possible values: KMmsYes, KMmsNo

SetReceivingModeForeign(TMmsReceivingMode)

void SetReceivingModeForeign ( TMmsReceivingMode aMode ) [inline]

SetReceivingModeForeign sets the receiving mode in foreign network

Parameters

TMmsReceivingMode aMode Possible values as in ReceivingModeHome

SetReceivingModeHome(TMmsReceivingMode)

void SetReceivingModeHome ( TMmsReceivingMode aMode ) [inline]

SetReceivingModeHome sets the receiving mode in home network

Parameters

TMmsReceivingMode aMode Possible values as in ReceivingModeHome

SetSenderVisibility(TMmsMessageSenderVisibility)

void SetSenderVisibility ( TMmsMessageSenderVisibility aSenderVisibility ) [inline]

Set sender visibility code

Parameters

TMmsMessageSenderVisibility aSenderVisibility

SettingsVersion()

TInt32 SettingsVersion ( ) const [inline]

SettingsVersion returns the version information of the settings.

ShowSentTime()

TBool ShowSentTime ( ) const [inline]

ShowSentTime returns the value that tells if sending time or receiving time should be shown for incoming messages This value is stored in iDate member in TMsvEntry ETrue = show sending time EFalse = show time the message arrived at the terminal (default)

ValidateSettings()

IMPORT_C TInt ValidateSettings ( )

Validate current MMS settings Checks that access points point to valid entries in commsdb

Member Data Documentation

TBool iAcceptAdvertisement

TBool iAcceptAdvertisement [private]

TBool iAcceptAnonymous

TBool iAcceptAnonymous [private]

TBool iAcceptInformational

TBool iAcceptInformational [private]

TBool iAcceptPersonal

TBool iAcceptPersonal [private]

RArray< TUint32 > iAccesspointArray

RArray < TUint32 > iAccesspointArray [private]

TMsvId iApplicationFolderId

TMsvId iApplicationFolderId [private]

TInt32 iCreationMode

TInt32 iCreationMode [private]

TMsvId iDefaultServiceId

TMsvId iDefaultServiceId [private]

TInt32 iDeliveryReportAllowed

TInt32 iDeliveryReportAllowed [private]

TInt32 iDeliveryReportWanted

TInt32 iDeliveryReportWanted [private]

TInt32 iExpiryInterval

TInt32 iExpiryInterval [private]

TInt iExpiryOvershoot

TInt iExpiryOvershoot [private]

TBool iFetchOverride

TBool iFetchOverride [private]

TInt32 iImageHeight

TInt32 iImageHeight [private]

TInt32 iImageWidth

TInt32 iImageWidth [private]

TBool iLocalMode

TBool iLocalMode [private]

HBufC * iLocalModeDir

HBufC * iLocalModeDir [private]

TBool iLogEmailRecipients

TBool iLogEmailRecipients [private]

TMsvId iMMBoxFolderId

TMsvId iMMBoxFolderId [private]

TInt32 iMaxReceiveSize

TInt32 iMaxReceiveSize [private]

TInt32 iMaxSendSize

TInt32 iMaxSendSize [private]

TInt32 iMessageClass

TInt32 iMessageClass [private]

TInt32 iMessagePriority

TInt32 iMessagePriority [private]

CRepository * iMmsRepository

CRepository * iMmsRepository [private]

TInt16 iMmsVersion

TInt16 iMmsVersion [private]

TBool iMoveToSent

TBool iMoveToSent [private]

TMsvId iNotificationFolderId

TMsvId iNotificationFolderId [private]

TBool iReadReplyReportAllowed

TBool iReadReplyReportAllowed [private]

TInt32 iReadReplyReportWanted

TInt32 iReadReplyReportWanted [private]

TInt32 iReceivingModeForeign

TInt32 iReceivingModeForeign [private]

TInt32 iReceivingModeHome

TInt32 iReceivingModeHome [private]

TInt32 iSenderVisibility

TInt32 iSenderVisibility [private]

TInt32 iSettingsVersion

TInt32 iSettingsVersion [private]

TBool iShowSentTime

TBool iShowSentTime [private]