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 TIntAddEntryL(CSPEntry &)
IMPORT_C TIntAddOrUpdatePropertiesL(TServiceId, const RPropertyArray &)
IMPORT_C TIntAddOrUpdatePropertyL(TServiceId, const CSPProperty &)
IMPORT_C TIntDeleteEntryL(TServiceId)
IMPORT_C TIntDeleteServicePropertiesL(TServiceId, const RPropertyNameArray &)
IMPORT_C TIntFindEntryL(TServiceId, CSPEntry &)
IMPORT_C TIntFindPropertyL(TServiceId, TServicePropertyName, CSPProperty &)
IMPORT_C TIntFindServiceIdsFromPropertiesL(const RPropertyArray &, RIdArray &)
IMPORT_C TIntFindServiceIdsL(RIdArray &)
IMPORT_C TIntFindServiceNamesL(RIdArray &, CDesCArray &)
IMPORT_C TIntFindSubServicePropertiesL(TServiceId, TSPItemType, RPropertyArray &)
IMPORT_C const TDesC &GetSIPVoIPSWVersion()
IMPORT_C TBoolIsFeatureSupported(TSPServiceFeature)
IMPORT_C CSPSettings *NewL()
IMPORT_C CSPSettings *NewLC()
IMPORT_C TIntSettingsCountL()
IMPORT_C TIntUpdateEntryL(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)
voidConstructL()
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 TIntAddEntryL(CSPEntry &aEntry)

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

Since
S60 v3.2

Parameters

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

AddOrUpdatePropertiesL(TServiceId, const RPropertyArray &)

IMPORT_C TIntAddOrUpdatePropertiesL(TServiceIdaServiceId,
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 aServiceIdThe ID of updated service entry
const RPropertyArray & aPropertyArraynew properties to be added or updated

AddOrUpdatePropertyL(TServiceId, const CSPProperty &)

IMPORT_C TIntAddOrUpdatePropertyL(TServiceIdaServiceId,
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 aServiceIdThe ID of updated service entry
const CSPProperty & aPropertynew property to be added or updated

CheckSupportedL(TServiceId, const RPropertyNameArray &)

TInt CheckSupportedL(TServiceIdaServiceId,
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(TServiceIdaServiceId)[private]

Check is VoIP Service Id

Since
S60 v3.2.3

Parameters

TServiceId aServiceId

CheckSupportedL(TSPItemType)

TInt CheckSupportedL(TSPItemTypeaPropertyType)[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(TIntaError,
TServiceIdaServiceId
)[private]
Commit or rollback transaction
Since
S60 v3.2

Parameters

TInt aErrorerror code of CenRep operation
TServiceId aServiceIdchanged service Id

ConstructL()

voidConstructL()[private]

By default Symbian 2nd phase constructor is private.

DeleteEntryL(TServiceId)

IMPORT_C TIntDeleteEntryL(TServiceIdaServiceId)

Deletes service provider settings entry from storage by service ID.

Since
S60 v3.2

Parameters

TServiceId aServiceId

DeleteServicePropertiesL(TServiceId, const RPropertyNameArray &)

IMPORT_C TIntDeleteServicePropertiesL(TServiceIdaServiceId,
const RPropertyNameArray &aNameArray
)

Deletes service properties by service ID and property name.

Since
S60 v3.2

Parameters

TServiceId aServiceIdThe service ID of requested service entry
const RPropertyNameArray & aNameArrayname of properties to be deleted

FindEntryL(TServiceId, CSPEntry &)

IMPORT_C TIntFindEntryL(TServiceIdaServiceId,
CSPEntry &aEntry
)

Search service provider settings entry by service ID.

Since
S60 v3.2

Parameters

TServiceId aServiceIdId of requested xSP settings entry
CSPEntry & aEntryon return, SP settings entry corresponding to aServiceId.

FindPropertyL(TServiceId, TServicePropertyName, CSPProperty &)

IMPORT_C TIntFindPropertyL(TServiceIdaServiceId,
TServicePropertyNameaPropertyName,
CSPProperty &aProperty
)

Search property of service provider settings entry from storage.

Since
S60 v3.2

Parameters

TServiceId aServiceIdThe service ID of requested service entry
TServicePropertyName aPropertyNameproperty name to be found
CSPProperty & aPropertyon return, requested property

FindServiceIdsFromPropertiesL(const RPropertyArray &, RIdArray &)

IMPORT_C TIntFindServiceIdsFromPropertiesL(const RPropertyArray &aPropertyArray,
RIdArray &aServiceIds
)

Find service IDs with same properties

Since
S60 v3.2

Parameters

const RPropertyArray & aPropertyArrayproperty array
RIdArray & aServiceIds

FindServiceIdsL(RIdArray &)

IMPORT_C TIntFindServiceIdsL(RIdArray &aServiceIds)

Search all service provider IDs from storage

Since
S60 v3.2

Parameters

RIdArray & aServiceIdsAn array containing returned service IDs

FindServiceNamesL(RIdArray &, CDesCArray &)

IMPORT_C TIntFindServiceNamesL(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 & aServiceIdsAn array of service IDs
CDesCArray & aServiceNameson return, array which saves found service names

FindSubServicePropertiesL(TServiceId, TSPItemType, RPropertyArray &)

IMPORT_C TIntFindSubServicePropertiesL(TServiceIdaServiceId,
TSPItemTypeaPropertyType,
RPropertyArray &aPropertyArray
)

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

Since
S60 v3.2

Parameters

TServiceId aServiceIdThe ID of requested service entry
TSPItemType aPropertyTypeproperty type of sub service
RPropertyArray & aPropertyArrayon 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 TBoolIsFeatureSupported(TSPServiceFeatureaFeature)

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 TIntSettingsCountL()

Return count of service provider settings entries in storage.

Since
S60 v3.2

UpdateEntryL(const CSPEntry &)

IMPORT_C TIntUpdateEntryL(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 & aEntryUpdated 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