TXdmSettingsApi Class Reference

class TXdmSettingsApi
Public Member Functions
IMPORT_C CDesCArray * CollectionNamesLC ( RArray < TInt > &)
IMPORT_C TInt CreateCollectionL (const CXdmSettingsCollection &)
IMPORT_C void CreatePropertyL ( TInt , const TDesC &, TXdmSettingsProperty )
IMPORT_C HBufC * PropertyL ( TInt , TXdmSettingsProperty )
IMPORT_C void RemoveCollectionL ( TInt )
IMPORT_C void RemovePropertyL ( TInt , TXdmSettingsProperty )
IMPORT_C CXdmSettingsCollection * SettingsCollectionL ( TInt )
IMPORT_C void UpdatePropertyL ( TInt , const TDesC &, TXdmSettingsProperty )
Private Member Functions
TInt CreateUniqueIdL ( CRepository *, TInt )
RArray < TUint32 > FindByIdL ( TInt , CRepository *)
RArray < TUint32 > FindByTypeL ( CRepository *, TXdmSettingsProperty )
TInt FindRowL ( TInt , CRepository *)
TInt LastRow ( CRepository *)
void WriteToLog ( TRefByValue < const TDesC8 >, ...)

Member Functions Documentation

CollectionNamesLC(RArray< TInt > &)

IMPORT_C CDesCArray * CollectionNamesLC ( RArray < TInt > & aSettingIds ) [static]

Return the name of each settings collection stored in the repository

Parameters

RArray < TInt > & aSettingIds

CreateCollectionL(const CXdmSettingsCollection &)

IMPORT_C TInt CreateCollectionL ( const CXdmSettingsCollection & aCollection ) [static]

Set the XDM properties as a collection of settings

Parameters

const CXdmSettingsCollection & aCollection

CreatePropertyL(TInt, const TDesC &, TXdmSettingsProperty)

IMPORT_C void CreatePropertyL ( TInt aSettingsId,
const TDesC & aPropertyValue,
TXdmSettingsProperty aPropertyName
) [static]

Create an individual property to the specified collection of properties.

NOTE:

  • Leaves with KErrAlreadyExists, if the property to be created already exists in the specified collection.

  • Leaves with KErrNotFound, if a property set by the specified ID cannot be found from the repository

Parameters

TInt aSettingsId
const TDesC & aPropertyValue
TXdmSettingsProperty aPropertyName

CreateUniqueIdL(CRepository *, TInt)

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

Create a unique ID for a collection of settings

Parameters

CRepository * aRepository
TInt aRow

FindByIdL(TInt, CRepository *)

RArray < TUint32 > FindByIdL ( TInt aSettingsId,
CRepository * aRepository
) [private, static]

Find keys by their ID

Parameters

TInt aSettingsId
CRepository * aRepository

FindByTypeL(CRepository *, TXdmSettingsProperty)

RArray < TUint32 > FindByTypeL ( CRepository * aRepository,
TXdmSettingsProperty aSingleProp
) [private, static]

Find keys by their type

Parameters

CRepository * aRepository
TXdmSettingsProperty aSingleProp

FindRowL(TInt, CRepository *)

TInt FindRowL ( TInt aSettingsId,
CRepository * aRepository
) [private, static]

Find the row for the specified collection of settings

Parameters

TInt aSettingsId
CRepository * aRepository

LastRow(CRepository *)

TInt LastRow ( CRepository * aRepository ) [private, static]

Return the last row from the repository

Parameters

CRepository * aRepository

PropertyL(TInt, TXdmSettingsProperty)

IMPORT_C HBufC * PropertyL ( TInt aSettingsId,
TXdmSettingsProperty aSingleProp
) [static]

Return an individual XDM settings property

NOTE:

  • Leaves with KErrNotFound, if a property set by the specified ID cannot be found from the repository.

Parameters

TInt aSettingsId
TXdmSettingsProperty aSingleProp

RemoveCollectionL(TInt)

IMPORT_C void RemoveCollectionL ( TInt aSettingsId ) [static]

Remove a collection from the Central Repository

NOTE:

  • Leaves with KErrNotFound if a collection of properties by the specified ID does not exist in the repository.

Parameters

TInt aSettingsId

RemovePropertyL(TInt, TXdmSettingsProperty)

IMPORT_C void RemovePropertyL ( TInt aSettingsId,
TXdmSettingsProperty aPropertyName
) [static]

Remove an individual property from the specified collection of properties.

NOTE:

  • Leaves with KErrNotFound, if a property set by the specified ID cannot be found from the repository

Parameters

TInt aSettingsId
TXdmSettingsProperty aPropertyName

SettingsCollectionL(TInt)

IMPORT_C CXdmSettingsCollection * SettingsCollectionL ( TInt aSettingsId ) [static]

Return an XDM property set/collection

NOTE:

  • Leaves with KErrNotFound, if a property set by the specified ID cannot be found from the repository.

Parameters

TInt aSettingsId

UpdatePropertyL(TInt, const TDesC &, TXdmSettingsProperty)

IMPORT_C void UpdatePropertyL ( TInt aSettingsId,
const TDesC & aPropertyValue,
TXdmSettingsProperty aPropertyName
) [static]

Update an individual property in a named property set

NOTE:

  • Leaves with KErrNotFound, if a property set by the specified ID cannot be found

  • Also note that an attempt to update a non-existent property effectively creates a new one.

Parameters

TInt aSettingsId
const TDesC & aPropertyValue
TXdmSettingsProperty aPropertyName

WriteToLog(TRefByValue< const TDesC8 >, ...)

void WriteToLog ( TRefByValue < const TDesC8 > aFmt,
...
) [private, static]

Write to the log file

Parameters

TRefByValue < const TDesC8 > aFmt
...