CSPSettings Class Reference

class CSPSettings : public CBase

Service provider settings API class

Main class of managing service provider settings

        example code of how to add a new service entry to service table
  CSPEntry* entry = CSPEntry::NewL();
  TInt err = entry->SetServiceName( _L("somename" ) );
  CSPProperty* property = CSPProperty::NewL();
  err = property->SetName( EPropertyServiceAttributeMask );
  property->SetValue( 100 );
  err = entry->AddProperty( property );
  // iSettings is instance of CSPSettings
  TInt err = iSettings->AddEntryL( *entry );
       
serviceprovidersettings.lib
Since
S60 v3.2

Inherits from

Public Member Functions
~CSPSettings ()
IMPORT_C TInt AddEntryL ( CSPEntry &)
IMPORT_C TInt AddOrUpdatePropertiesL ( TServiceId , const RPropertyArray &)
IMPORT_C TInt AddOrUpdatePropertyL ( TServiceId , const CSPProperty &)
IMPORT_C TInt DeleteEntryL ( TServiceId )
IMPORT_C TInt DeleteServicePropertiesL ( TServiceId , const RPropertyNameArray &)
IMPORT_C TInt FindEntryL ( TServiceId , CSPEntry &)
IMPORT_C TInt FindPropertyL ( TServiceId , TServicePropertyName , CSPProperty &)
IMPORT_C TInt FindServiceIdsFromPropertiesL (const RPropertyArray &, RIdArray &)
IMPORT_C TInt FindServiceIdsL ( RIdArray &)
IMPORT_C TInt FindServiceNamesL ( RIdArray &, CDesCArray &)
IMPORT_C TInt FindSubServicePropertiesL ( TServiceId , TSPItemType , RPropertyArray &)
IMPORT_C const TDesC & GetSIPVoIPSWVersion ()
IMPORT_C TBool IsFeatureSupported ( TSPServiceFeature )
IMPORT_C CSPSettings * NewL ()
IMPORT_C CSPSettings * NewLC ()
IMPORT_C TInt SettingsCountL ()
IMPORT_C TInt UpdateEntryL (const CSPEntry &)
Private Member Functions
CSPSettings ()
TInt CheckSupportedL ( TServiceId , const RPropertyNameArray &)
TInt CheckSupportedL ( TServiceId )
TInt CheckSupportedL ( TSPItemType )
TInt CheckSupportedL (const RPropertyArray &)
TInt CommitOrRollbackL ( TInt , TServiceId )
void ConstructL ()
Inherited Functions
CBase::CBase()
CBase::Delete(CBase *)
CBase::Extension_(TUint,TAny *&,TAny *)
CBase::operator new(TUint)
CBase::operator new(TUint,TAny *)
CBase::operator new(TUint,TLeave)
CBase::operator new(TUint,TLeave,TUint)
CBase::operator new(TUint,TUint)
CBase::~CBase()
Private Attributes
TBool iFeatureManagerSupportVoIP
CSPSettingsEngine * iSettingsEngine
TBool iSettingsWriteAllowed

Constructor & Destructor Documentation

CSPSettings()

CSPSettings ( ) [private]

C++ default constructor.

~CSPSettings()

IMPORT_C ~CSPSettings ( ) [virtual]

Destructors.

Member Functions Documentation

AddEntryL(CSPEntry &)

IMPORT_C TInt AddEntryL ( CSPEntry & aEntry )

Stores new service provider settings entry, service Id is returned inside aEntry object

Since
S60 v3.2

Parameters

CSPEntry & aEntry New service provider settings entry, on return service Id is filled in

AddOrUpdatePropertiesL(TServiceId, const RPropertyArray &)

IMPORT_C TInt AddOrUpdatePropertiesL ( TServiceId aServiceId,
const RPropertyArray & aPropertyArray
)

Add or update properties of service provider settings entry to storage. If property name exists, update property. If property doesn't exist, add property

Since
S60 v3.2

Parameters

TServiceId aServiceId The ID of updated service entry
const RPropertyArray & aPropertyArray new properties to be added or updated

AddOrUpdatePropertyL(TServiceId, const CSPProperty &)

IMPORT_C TInt AddOrUpdatePropertyL ( TServiceId aServiceId,
const CSPProperty & aProperty
)

Add or update one property of service provider settings entry to storage. If property name exists, update property. If property doesn't exist, add property

Since
S60 v3.2

Parameters

TServiceId aServiceId The ID of updated service entry
const CSPProperty & aProperty new property to be added or updated

CheckSupportedL(TServiceId, const RPropertyNameArray &)

TInt CheckSupportedL ( TServiceId aServiceId,
const RPropertyNameArray & aNameArray
) [private]

Check is VoIP Service Id and then are Properties VoIP related

Since
S60 v3.2.3

Parameters

TServiceId aServiceId
const RPropertyNameArray & aNameArray

CheckSupportedL(TServiceId)

TInt CheckSupportedL ( TServiceId aServiceId ) [private]

Check is VoIP Service Id

Since
S60 v3.2.3

Parameters

TServiceId aServiceId

CheckSupportedL(TSPItemType)

TInt CheckSupportedL ( TSPItemType aPropertyType ) [private]

Check is SP item type VoIP related

Since
S60 v3.2.3

Parameters

TSPItemType aPropertyType

CheckSupportedL(const RPropertyArray &)

TInt CheckSupportedL ( const RPropertyArray & aPropertyArray ) [private]

Check does an array have Properties VoIP related

Since
S60 v3.2.3

Parameters

const RPropertyArray & aPropertyArray

CommitOrRollbackL(TInt, TServiceId)

TInt CommitOrRollbackL ( TInt aError,
TServiceId aServiceId
) [private]
Commit or rollback transaction
Since
S60 v3.2

Parameters

TInt aError error code of CenRep operation
TServiceId aServiceId changed service Id

ConstructL()

void ConstructL ( ) [private]

By default Symbian 2nd phase constructor is private.

DeleteEntryL(TServiceId)

IMPORT_C TInt DeleteEntryL ( TServiceId aServiceId )

Deletes service provider settings entry from storage by service ID.

Since
S60 v3.2

Parameters

TServiceId aServiceId

DeleteServicePropertiesL(TServiceId, const RPropertyNameArray &)

IMPORT_C TInt DeleteServicePropertiesL ( TServiceId aServiceId,
const RPropertyNameArray & aNameArray
)

Deletes service properties by service ID and property name.

Since
S60 v3.2

Parameters

TServiceId aServiceId The service ID of requested service entry
const RPropertyNameArray & aNameArray name of properties to be deleted

FindEntryL(TServiceId, CSPEntry &)

IMPORT_C TInt FindEntryL ( TServiceId aServiceId,
CSPEntry & aEntry
)

Search service provider settings entry by service ID.

Since
S60 v3.2

Parameters

TServiceId aServiceId Id of requested xSP settings entry
CSPEntry & aEntry on return, SP settings entry corresponding to aServiceId.

FindPropertyL(TServiceId, TServicePropertyName, CSPProperty &)

IMPORT_C TInt FindPropertyL ( TServiceId aServiceId,
TServicePropertyName aPropertyName,
CSPProperty & aProperty
)

Search property of service provider settings entry from storage.

Since
S60 v3.2

Parameters

TServiceId aServiceId The service ID of requested service entry
TServicePropertyName aPropertyName property name to be found
CSPProperty & aProperty on return, requested property

FindServiceIdsFromPropertiesL(const RPropertyArray &, RIdArray &)

IMPORT_C TInt FindServiceIdsFromPropertiesL ( const RPropertyArray & aPropertyArray,
RIdArray & aServiceIds
)

Find service IDs with same properties

Since
S60 v3.2

Parameters

const RPropertyArray & aPropertyArray property array
RIdArray & aServiceIds

FindServiceIdsL(RIdArray &)

IMPORT_C TInt FindServiceIdsL ( RIdArray & aServiceIds )

Search all service provider IDs from storage

Since
S60 v3.2

Parameters

RIdArray & aServiceIds An array containing returned service IDs

FindServiceNamesL(RIdArray &, CDesCArray &)

IMPORT_C TInt FindServiceNamesL ( RIdArray & aServiceIds,
CDesCArray & aServiceNames
)

Search all service names from settings storage by given service IDs. Removes ID from array if it is not found from settings storage.

Since
S60 v3.2

Parameters

RIdArray & aServiceIds An array of service IDs
CDesCArray & aServiceNames on return, array which saves found service names

FindSubServicePropertiesL(TServiceId, TSPItemType, RPropertyArray &)

IMPORT_C TInt FindSubServicePropertiesL ( TServiceId aServiceId,
TSPItemType aPropertyType,
RPropertyArray & aPropertyArray
)

Search subservice properties of requested service provider settings entry by ID and subservice type

Since
S60 v3.2

Parameters

TServiceId aServiceId The ID of requested service entry
TSPItemType aPropertyType property type of sub service
RPropertyArray & aPropertyArray on return, array which saves found subservice properties

GetSIPVoIPSWVersion()

IMPORT_C const TDesC & GetSIPVoIPSWVersion ( ) [static]

Get SIP VoIP software version.

Since
S60 v3.2

IsFeatureSupported(TSPServiceFeature)

IMPORT_C TBool IsFeatureSupported ( TSPServiceFeature aFeature )

Check feature is supported or not

Since
S60 v3.2

Parameters

TSPServiceFeature aFeature

NewL()

IMPORT_C CSPSettings * NewL ( ) [static]

Two-phased constructor.

NewLC()

IMPORT_C CSPSettings * NewLC ( ) [static]

Two-phased constructor.

SettingsCountL()

IMPORT_C TInt SettingsCountL ( )

Return count of service provider settings entries in storage.

Since
S60 v3.2

UpdateEntryL(const CSPEntry &)

IMPORT_C TInt UpdateEntryL ( const CSPEntry & aEntry )

Updates service provider settings entry to settings storage. Service ID must be set to entry before update.

Since
S60 v3.2

Parameters

const CSPEntry & aEntry Updated service provider settings entry

Member Data Documentation

TBool iFeatureManagerSupportVoIP

TBool iFeatureManagerSupportVoIP [private]

Feature manager support VoIP Own.

CSPSettingsEngine * iSettingsEngine

CSPSettingsEngine * iSettingsEngine [private]

Settings engine Own.

TBool iSettingsWriteAllowed

TBool iSettingsWriteAllowed [private]

Writing settings allowed