CIMPSSAPSettingsStore Class Reference

class CIMPSSAPSettingsStore : public CBase

Interface to SAP settings store.

SAP settings store handles SAP Settings(CIMPSSAPSettings)

Following services are offered:
  • Count of stored settings

  • Getting list of stored settings

  • Storing new settings

  • Retrieving settings

  • Removing settings

  • Set certain SAP as "default SAP" and retrieve default SAP

SAP Settings Store offers also
  • observer interface to listen store events

  • transaction mechanism for single client operations this means that store, update and delete operations are guaranteed not to corrupt any data in case or errors

WVSAPSettingsStore.dll
Since
3.0

Inherits from

Constructor & Destructor Documentation

~CIMPSSAPSettingsStore()

IMPORT_C ~CIMPSSAPSettingsStore ( ) [virtual]

Destructor.

Member Functions Documentation

AddObserverL(MIMPSSAPObserver *, TIMPSAccessGroup)

IMPORT_C void AddObserverL ( MIMPSSAPObserver * aObserver,
TIMPSAccessGroup aGroup
)

Adds an observer to the store observer list. Observers are notified from SAP settings store events.

Valid access groups for this method are EIMPSIMAccessGroup and EIMPSPECAccessGroup.

Doesn't take ownership of an observer.

MIMPSSAPObserver events.

Since
3.0

Parameters

MIMPSSAPObserver * aObserver Observer to be notified.
TIMPSAccessGroup aGroup Group of SAPs to be observed.

DeleteSAPL(TUint32)

IMPORT_C void DeleteSAPL ( TUint32 aUid )

Deletes the existing SAP. If the SAP to be deleted is defined as default SAP, the default SAP id set to KIMPSSettingsNullUid. If the SAP to be deleted is protected against deletion, leaves with KErrAccessDenied.

In case of error, leaves with system error codes or error codes coming from underlying central repository implementation. Error situations:
  • Insufficient memory

  • SAP with given uid isn't found

  • SAP's protection level doesn't allow deleting

Since
3.0

Parameters

TUint32 aUid Uid of the SAP to delete.

GetDefaultL(TUint32 &, TIMPSAccessGroup)

IMPORT_C void GetDefaultL ( TUint32 & aUid,
TIMPSAccessGroup aGroup
)

Gets the default SAP's uid.

In case of error, leaves with system error codes or error codes coming from underlying central repository implementation. Error situations:
  • Insufficient memory

Valid access groups for this method are EIMPSIMAccessGroup and EIMPSPECAccessGroup.

Since
3.0

Parameters

TUint32 & aUid On return will contain the uid of the default SAP. aUid is set to KIMPSSettingsNullUid if default SAP's uid isn't defined
TIMPSAccessGroup aGroup SAP access group

GetDefaultL(CIMPSSAPSettings *, TIMPSAccessGroup)

IMPORT_C void GetDefaultL ( CIMPSSAPSettings * aSAPSettings,
TIMPSAccessGroup aGroup
)

Gets the default SAP's data.

In case of error, leaves with system error codes or error codes coming from underlying central repository implementation. Error situations:
  • Insufficient memory

  • default SAP's uid isn't defined

  • requested (default) SAP isn't found from store

Valid access groups for this method are EIMPSIMAccessGroup and EIMPSPECAccessGroup.

Since
3.0

Parameters

CIMPSSAPSettings * aSAPSettings On return will contain default SAP's settings.
TIMPSAccessGroup aGroup SAP access group

GetSAPL(TUint32, CIMPSSAPSettings *)

IMPORT_C void GetSAPL ( TUint32 aUid,
CIMPSSAPSettings * aSAPSettings
)

Gets the specified SAPs data.

In case of error, leaves with system error codes or error codes coming from underlying central repository implementation. Error situations:
  • Insufficient memory

  • requested SAP isn't found from store

Since
3.0

Parameters

TUint32 aUid Uid of the SAP to get.
CIMPSSAPSettings * aSAPSettings On return will contain requested SAP's settings.

NewL(TInt)

IMPORT_C CIMPSSAPSettingsStore * NewL ( TInt aPriority = CActive::EPriorityStandard ) [static]

Two-phased constructor. Constructs concrete CIMPSSAPSettingsStore .

Constructs and initializes the new empty storage database, If requested storage database doesn't exist, creates and initializes new database. If old storage database exists, opens it.

If old database to open is corrupted such way that it can't be recovered, initializes a new database.

If initializing the new database runs out of disk, leaves with KErrDiskFull.

Since
3.0

Parameters

TInt aPriority = CActive::EPriorityStandard Priority for active object based store event notifier. This determines priority of notifying store event observers.

NewLC(TInt)

IMPORT_C CIMPSSAPSettingsStore * NewLC ( TInt aPriority = CActive::EPriorityStandard ) [static]

Two-phased constructor. Constructs concrete CIMPSSAPSettingsStore .

Similar as NewL() except puts created CIMPSSAPSettingsStore object to cleanupstack.

Since
3.0

Parameters

TInt aPriority = CActive::EPriorityStandard Priority for active object based store event notifier. This determines priority of notifying store event observers.

PopulateSAPSettingsListL(CIMPSSAPSettingsList &, TIMPSAccessGroup, TBool)

IMPORT_C void PopulateSAPSettingsListL ( CIMPSSAPSettingsList & aList,
TIMPSAccessGroup aGroup,
TBool aAscending = ETrue
)

Fills CIMPSSAPSettingsList with stored SAP settings.

Before filling, clears given array from existing list item (frees also their resource reservations). After filling compacts the array.

Clients requiring information from all stored SAPs can do it by requesting first settings list with this method and then iterating trough this list and loading individually required SAP settings with GetSAPL() calls.

Valid access groups for this method are EIMPSIMAccessGroup, EIMPSPECAccessGroup and EIMPSAccessFilterAll.

Since
3.0

Parameters

CIMPSSAPSettingsList & aList CIMPSSAPSettingsList to fill with SAPs.
TIMPSAccessGroup aGroup The access group of SAPs that are populated.
TBool aAscending = ETrue Sorting order for the list. List items are sorted according their names in desired order. List can contain duplicate names.

RemoveObserver(MIMPSSAPObserver *)

IMPORT_C void RemoveObserver ( MIMPSSAPObserver * aObserver )

Removes an observer from observer list.

If given observer isn't found, silently ignores the error.
Since
3.0

Parameters

MIMPSSAPObserver * aObserver The observer to remove.

SAPCountL(TIMPSAccessGroup)

IMPORT_C TInt SAPCountL ( TIMPSAccessGroup aGroup )

Gets count of currently stored SAPs in store.

In case of error, leaves with system error codes or error codes coming from underlying central repository implementation. Error situations:
  • Insufficient memory

Valid access groups for this method are EIMPSIMAccessGroup, EIMPSPECAccessGroup and EIMPSAccessFilterAll.

Since
3.0

Parameters

TIMPSAccessGroup aGroup Access group whose SAPs are counted.

SetToDefaultL(TUint32, TIMPSAccessGroup)

IMPORT_C void SetToDefaultL ( TUint32 aUid,
TIMPSAccessGroup aGroup
)

Sets the default SAP.

In case of error, leaves with system error codes or error codes coming from underlying central repository implementation. Error situations:
  • Insufficient memory

  • Insufficient disc space

  • SAP with given UID isn't found

Valid access groups for this method are EIMPSIMAccessGroup and EIMPSPECAccessGroup.

Since
3.0

Parameters

TUint32 aUid The uid of the SAP, to be set as default.
TIMPSAccessGroup aGroup SAP access group

StoreNewSAPL(CIMPSSAPSettings *, TIMPSAccessGroup)

IMPORT_C TUint32 StoreNewSAPL ( CIMPSSAPSettings * aSAPSettings,
TIMPSAccessGroup aGroup
)

Stores the new SAP's data.

In succesful storing returns a unique uid for stored SAP and sets also same uid inside of given aSAPSettings. If there isn't any previous SAP's stored to store, sets this currently stored SAP as default SAP. If SAP's name is not defined, leaves with KErrArgument. If there exists already a SAP with same SAP name in the store, leaves with KErrAlreadyExists.

In case of error, leaves with system error codes or error codes coming from underlying central repository implementation. Error situations:
  • Insufficient memory

  • Insufficient disc space

  • SAP name is not defined (KErrArgument)

  • SAP with same SAP name exists (KErrAlreadyExists)

Valid access groups for this method are EIMPSIMAccessGroup and EIMPSPECAccessGroup.

Since
3.0

Parameters

CIMPSSAPSettings * aSAPSettings The SAP settings to store.
TIMPSAccessGroup aGroup Access group of SAP to store

UpdateOldSAPL(CIMPSSAPSettings *, TUint32)

IMPORT_C void UpdateOldSAPL ( CIMPSSAPSettings * aSAPSettings,
TUint32 aUid
)

Updates the existing SAP's data.

Stores given data to given uid. Given aUid can be different than one stored inside of aSAPSettings. In this case updates aSAPSettings uid to aUid. If there exists already a SAP with same SAP name in the store, leaves with KErrAlreadyExists. If the old SAP is protected against updating, leaves with KErrAccessDenied if SAP's name or address are being modified.

In case of error, leaves with system error codes or error codes coming from underlying central repository implementation. Error situations:
  • Insufficient memory

  • Insufficient disc space

  • SAP with given uid isn't found

  • SAP with same SAP name exists (KErrAlreadyExists)
    • SAP is protected and SAP name or address are being modified

Since
3.0

Parameters

CIMPSSAPSettings * aSAPSettings The SAP settings to store.
TUint32 aUid Uid of the SAP settings to update.

Member Data Documentation

CIMPSSAPCenRep * iImp

CIMPSSAPCenRep * iImp [private]