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

  • CIMPSSAPSettingsStore

Constructor & Destructor Documentation

~CIMPSSAPSettingsStore()

IMPORT_C~CIMPSSAPSettingsStore()[virtual]

Destructor.

Member Functions Documentation

AddObserverL(MIMPSSAPObserver *, TIMPSAccessGroup)

IMPORT_C voidAddObserverL(MIMPSSAPObserver *aObserver,
TIMPSAccessGroupaGroup
)

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 * aObserverObserver to be notified.
TIMPSAccessGroup aGroupGroup of SAPs to be observed.

DeleteSAPL(TUint32)

IMPORT_C voidDeleteSAPL(TUint32aUid)

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 aUidUid of the SAP to delete.

GetDefaultL(TUint32 &, TIMPSAccessGroup)

IMPORT_C voidGetDefaultL(TUint32 &aUid,
TIMPSAccessGroupaGroup
)

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 & aUidOn return will contain the uid of the default SAP. aUid is set to KIMPSSettingsNullUid if default SAP's uid isn't defined
TIMPSAccessGroup aGroupSAP access group

GetDefaultL(CIMPSSAPSettings *, TIMPSAccessGroup)

IMPORT_C voidGetDefaultL(CIMPSSAPSettings *aSAPSettings,
TIMPSAccessGroupaGroup
)

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 * aSAPSettingsOn return will contain default SAP's settings.
TIMPSAccessGroup aGroupSAP access group

GetSAPL(TUint32, CIMPSSAPSettings *)

IMPORT_C voidGetSAPL(TUint32aUid,
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 aUidUid of the SAP to get.
CIMPSSAPSettings * aSAPSettingsOn return will contain requested SAP's settings.

NewL(TInt)

IMPORT_C CIMPSSAPSettingsStore *NewL(TIntaPriority = 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::EPriorityStandardPriority for active object based store event notifier. This determines priority of notifying store event observers.

NewLC(TInt)

IMPORT_C CIMPSSAPSettingsStore *NewLC(TIntaPriority = 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::EPriorityStandardPriority for active object based store event notifier. This determines priority of notifying store event observers.

PopulateSAPSettingsListL(CIMPSSAPSettingsList &, TIMPSAccessGroup, TBool)

IMPORT_C voidPopulateSAPSettingsListL(CIMPSSAPSettingsList &aList,
TIMPSAccessGroupaGroup,
TBoolaAscending = 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 & aListCIMPSSAPSettingsList to fill with SAPs.
TIMPSAccessGroup aGroupThe access group of SAPs that are populated.
TBool aAscending = ETrueSorting order for the list. List items are sorted according their names in desired order. List can contain duplicate names.

RemoveObserver(MIMPSSAPObserver *)

IMPORT_C voidRemoveObserver(MIMPSSAPObserver *aObserver)

Removes an observer from observer list.

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

Parameters

MIMPSSAPObserver * aObserverThe observer to remove.

SAPCountL(TIMPSAccessGroup)

IMPORT_C TIntSAPCountL(TIMPSAccessGroupaGroup)

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 aGroupAccess group whose SAPs are counted.

SetToDefaultL(TUint32, TIMPSAccessGroup)

IMPORT_C voidSetToDefaultL(TUint32aUid,
TIMPSAccessGroupaGroup
)

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 aUidThe uid of the SAP, to be set as default.
TIMPSAccessGroup aGroupSAP access group

StoreNewSAPL(CIMPSSAPSettings *, TIMPSAccessGroup)

IMPORT_C TUint32StoreNewSAPL(CIMPSSAPSettings *aSAPSettings,
TIMPSAccessGroupaGroup
)

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 * aSAPSettingsThe SAP settings to store.
TIMPSAccessGroup aGroupAccess group of SAP to store

UpdateOldSAPL(CIMPSSAPSettings *, TUint32)

IMPORT_C voidUpdateOldSAPL(CIMPSSAPSettings *aSAPSettings,
TUint32aUid
)

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 * aSAPSettingsThe SAP settings to store.
TUint32 aUidUid of the SAP settings to update.

Member Data Documentation

CIMPSSAPCenRep * iImp

CIMPSSAPCenRep *iImp[private]