class CIMPSSAPSettingsStore : public CBase |
Interface to SAP settings store.
SAP settings store handles SAP Settings(CIMPSSAPSettings)
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
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
Public Member Functions | |
---|---|
~CIMPSSAPSettingsStore() | |
IMPORT_C void | AddObserverL(MIMPSSAPObserver *, TIMPSAccessGroup) |
IMPORT_C void | DeleteSAPL(TUint32) |
IMPORT_C void | GetDefaultL(TUint32 &, TIMPSAccessGroup) |
IMPORT_C void | GetDefaultL(CIMPSSAPSettings *, TIMPSAccessGroup) |
IMPORT_C void | GetSAPL(TUint32, CIMPSSAPSettings *) |
IMPORT_C CIMPSSAPSettingsStore * | NewL(TInt) |
IMPORT_C CIMPSSAPSettingsStore * | NewLC(TInt) |
IMPORT_C void | PopulateSAPSettingsListL(CIMPSSAPSettingsList &, TIMPSAccessGroup, TBool) |
IMPORT_C void | RemoveObserver(MIMPSSAPObserver *) |
IMPORT_C TInt | SAPCountL(TIMPSAccessGroup) |
IMPORT_C void | SetToDefaultL(TUint32, TIMPSAccessGroup) |
IMPORT_C TUint32 | StoreNewSAPL(CIMPSSAPSettings *, TIMPSAccessGroup) |
IMPORT_C void | UpdateOldSAPL(CIMPSSAPSettings *, TUint32) |
Private Attributes | |
---|---|
CIMPSSAPCenRep * | iImp |
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.
MIMPSSAPObserver * aObserver | Observer to be notified. |
TIMPSAccessGroup aGroup | Group of SAPs to be observed. |
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.
Insufficient memory
SAP with given uid isn't found
SAP's protection level doesn't allow deleting
TUint32 aUid | Uid of the SAP to delete. |
IMPORT_C void | GetDefaultL | ( | TUint32 & | aUid, |
TIMPSAccessGroup | aGroup | |||
) |
Gets the default SAP's uid.
Insufficient memory
Valid access groups for this method are EIMPSIMAccessGroup and EIMPSPECAccessGroup.
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 |
IMPORT_C void | GetDefaultL | ( | CIMPSSAPSettings * | aSAPSettings, |
TIMPSAccessGroup | aGroup | |||
) |
Gets the default SAP's data.
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.
CIMPSSAPSettings * aSAPSettings | On return will contain default SAP's settings. |
TIMPSAccessGroup aGroup | SAP access group |
IMPORT_C void | GetSAPL | ( | TUint32 | aUid, |
CIMPSSAPSettings * | aSAPSettings | |||
) |
Gets the specified SAPs data.
Insufficient memory
requested SAP isn't found from store
TUint32 aUid | Uid of the SAP to get. |
CIMPSSAPSettings * aSAPSettings | On return will contain requested SAP's settings. |
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.
TInt aPriority = CActive::EPriorityStandard | Priority for active object based store event notifier. This determines priority of notifying store event observers. |
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.
TInt aPriority = CActive::EPriorityStandard | Priority for active object based store event notifier. This determines priority of notifying store event observers. |
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.
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. |
IMPORT_C void | RemoveObserver | ( | MIMPSSAPObserver * | aObserver | ) |
Removes an observer from observer list.
MIMPSSAPObserver * aObserver | The observer to remove. |
IMPORT_C TInt | SAPCountL | ( | TIMPSAccessGroup | aGroup | ) |
Gets count of currently stored SAPs in store.
Insufficient memory
Valid access groups for this method are EIMPSIMAccessGroup, EIMPSPECAccessGroup and EIMPSAccessFilterAll.
TIMPSAccessGroup aGroup | Access group whose SAPs are counted. |
IMPORT_C void | SetToDefaultL | ( | TUint32 | aUid, |
TIMPSAccessGroup | aGroup | |||
) |
Sets the default SAP.
Insufficient memory
Insufficient disc space
SAP with given UID isn't found
Valid access groups for this method are EIMPSIMAccessGroup and EIMPSPECAccessGroup.
TUint32 aUid | The uid of the SAP, to be set as default. |
TIMPSAccessGroup aGroup | SAP access group |
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.
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.
CIMPSSAPSettings * aSAPSettings | The SAP settings to store. |
TIMPSAccessGroup aGroup | Access group of SAP to store |
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.
Insufficient memory
Insufficient disc space
SAP with given uid isn't found
SAP is protected and SAP name or address are being modified
CIMPSSAPSettings * aSAPSettings | The SAP settings to store. |
TUint32 aUid | Uid of the SAP settings to update. |
Copyright ©2010 Nokia Corporation and/or its subsidiary(-ies).
All rights
reserved. Unless otherwise stated, these materials are provided under the terms of the Eclipse Public License
v1.0.