PresSettingsApi Class Reference

class PresSettingsApi

This is the class which clients need to use for manipulating presence settings.

Member Functions Documentation

CreateSetL(TPresSettingsSet)

IMPORT_C TIntCreateSetL(TPresSettingsSetaSet)[static]

Creates a new set in the repository. This method may leave if some system error occur while creating new set.

Parameters

TPresSettingsSet aSet

CreateUniqueIdL(CRepository *, TUint32)

TInt CreateUniqueIdL(CRepository *aRepository,
TUint32aRowInHex
)[private, static]

Create a unique ID for a set

Parameters

CRepository * aRepository
TUint32 aRowInHex

DecodePropertyStatus(TInt, TPresSettingsProperty)

IMPORT_C TPresPropStatusDecodePropertyStatus(TIntaStatusOfProps,
TPresSettingsPropertyaPropertyName
)[static]

Returns TPresPropStatus for a given property from the given integer. Use aPropertyName=EPresStatusOfProps to get the status of a set as a whole

Parameters

TInt aStatusOfProps
TPresSettingsProperty aPropertyName

EncodePropertyStatus(TInt &, TPresPropStatus, TPresSettingsProperty)

IMPORT_C voidEncodePropertyStatus(TInt &aStatusOfProps,
TPresPropStatusaPropertyStatus,
TPresSettingsPropertyaPropertyName
)[static]

Encodes the given TPresPropStatus to the given integer. Use aPropertyName=EPresStatusOfProps to set the status of a set as a whole

Parameters

TInt & aStatusOfProps
TPresPropStatus aPropertyStatus
TPresSettingsProperty aPropertyName

GetAllSetsNamesLC(RArray< TInt > &)

IMPORT_C CDesCArray *GetAllSetsNamesLC(RArray< TInt > &aSetIds)[static]

Returns the name of all setting sets stored in the repository. This function is useful for displaying a list of available sets, elements of RArray can be used to access each set seperately. Make sure that CDesCArray* didnt allocated any memory before this method. Caller may also want to reset aSetIds before calling this method.

Parameters

RArray< TInt > & aSetIds

GetFreshRawInHex(CRepository *)

TUint32 GetFreshRawInHex(CRepository *aRepository)[private, static]

Get a fresh (empty) row, which is used for creating a new set

Parameters

CRepository * aRepository

GetRawInHexL(CRepository *, TInt)

TUint32 GetRawInHexL(CRepository *aRepository,
TIntaSetID
)[private, static]

Find the row having given set ID

Parameters

CRepository * aRepository
TInt aSetID

IsStr(TPresSettingsProperty)

IMPORT_C TBoolIsStr(TPresSettingsPropertyaProperty)[static]

Find whether the given property is descriptor or not

Parameters

TPresSettingsProperty aProperty

RemoveSetL(TInt)

IMPORT_C TIntRemoveSetL(TIntaSetId)[static]

Removes a settings Set from the Repository

Parameters

TInt aSetId

SettingsSetL(TInt, TPresSettingsSet &)

IMPORT_C TIntSettingsSetL(TIntaSetID,
TPresSettingsSet &aSet
)[static]

Returns a Pres settings set

Parameters

TInt aSetID
TPresSettingsSet & aSet

UpdatePropertyL(TInt, TPresSettingsProperty, TInt)

IMPORT_C TIntUpdatePropertyL(TIntaSetId,
TPresSettingsPropertyaPropertyName,
TIntaPropValueInt
)[static]

Updates a single integer property in a settings set.

Parameters

TInt aSetId
TPresSettingsProperty aPropertyName
TInt aPropValueInt

UpdatePropertyL(TInt, TPresSettingsProperty, const TDesC &)

IMPORT_C TIntUpdatePropertyL(TIntaSetId,
TPresSettingsPropertyaPropertyName,
const TDesC &aPropValueDes
)[static]

Updates a single descriptor property in a settings set.

Parameters

TInt aSetId
TPresSettingsProperty aPropertyName
const TDesC & aPropValueDes

UpdateSetL(TPresSettingsSet, TInt)

IMPORT_C TIntUpdateSetL(TPresSettingsSetaSet,
TIntaSetId
)[static]

Updats a set in the repository

Parameters

TPresSettingsSet aSet
TInt aSetId