PresSettingsApi Class Reference

class PresSettingsApi

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

Public Member Functions
IMPORT_C TInt CreateSetL ( TPresSettingsSet )
IMPORT_C TPresPropStatus DecodePropertyStatus ( TInt , TPresSettingsProperty )
IMPORT_C void EncodePropertyStatus ( TInt &, TPresPropStatus , TPresSettingsProperty )
IMPORT_C CDesCArray * GetAllSetsNamesLC ( RArray < TInt > &)
IMPORT_C TBool IsStr ( TPresSettingsProperty )
IMPORT_C TInt RemoveSetL ( TInt )
IMPORT_C TInt SettingsSetL ( TInt , TPresSettingsSet &)
IMPORT_C TInt UpdatePropertyL ( TInt , TPresSettingsProperty , TInt )
IMPORT_C TInt UpdatePropertyL ( TInt , TPresSettingsProperty , const TDesC &)
IMPORT_C TInt UpdateSetL ( TPresSettingsSet , TInt )
Private Member Functions
TInt CreateUniqueIdL ( CRepository *, TUint32 )
TUint32 GetFreshRawInHex ( CRepository *)
TUint32 GetRawInHexL ( CRepository *, TInt )

Member Functions Documentation

CreateSetL(TPresSettingsSet)

IMPORT_C TInt CreateSetL ( TPresSettingsSet aSet ) [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,
TUint32 aRowInHex
) [private, static]

Create a unique ID for a set

Parameters

CRepository * aRepository
TUint32 aRowInHex

DecodePropertyStatus(TInt, TPresSettingsProperty)

IMPORT_C TPresPropStatus DecodePropertyStatus ( TInt aStatusOfProps,
TPresSettingsProperty aPropertyName
) [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 void EncodePropertyStatus ( TInt & aStatusOfProps,
TPresPropStatus aPropertyStatus,
TPresSettingsProperty aPropertyName
) [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,
TInt aSetID
) [private, static]

Find the row having given set ID

Parameters

CRepository * aRepository
TInt aSetID

IsStr(TPresSettingsProperty)

IMPORT_C TBool IsStr ( TPresSettingsProperty aProperty ) [static]

Find whether the given property is descriptor or not

Parameters

TPresSettingsProperty aProperty

RemoveSetL(TInt)

IMPORT_C TInt RemoveSetL ( TInt aSetId ) [static]

Removes a settings Set from the Repository

Parameters

TInt aSetId

SettingsSetL(TInt, TPresSettingsSet &)

IMPORT_C TInt SettingsSetL ( TInt aSetID,
TPresSettingsSet & aSet
) [static]

Returns a Pres settings set

Parameters

TInt aSetID
TPresSettingsSet & aSet

UpdatePropertyL(TInt, TPresSettingsProperty, TInt)

IMPORT_C TInt UpdatePropertyL ( TInt aSetId,
TPresSettingsProperty aPropertyName,
TInt aPropValueInt
) [static]

Updates a single integer property in a settings set.

Parameters

TInt aSetId
TPresSettingsProperty aPropertyName
TInt aPropValueInt

UpdatePropertyL(TInt, TPresSettingsProperty, const TDesC &)

IMPORT_C TInt UpdatePropertyL ( TInt aSetId,
TPresSettingsProperty aPropertyName,
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 TInt UpdateSetL ( TPresSettingsSet aSet,
TInt aSetId
) [static]

Updats a set in the repository

Parameters

TPresSettingsSet aSet
TInt aSetId