CIMPSSAPSettings Class Reference

class CIMPSSAPSettings : public CBase

SAP Settings container.

SAP settings identify the network SAP to access to NW services and has various settings needed in session establish. SAP settings has key-value pair support to extend SAP settings data.

SAP settings: -------------
  • Uid: SAP UID. UID's are maintained by the SAP Settings Store. Each SAP stored in certain SAP Settings Store has solitary UID.

  • SAPName: Free form string that can is used to identify the SAP. Usually names are given by user. SAP Settings Store enforces SAP Nameto be unique among stored SAPs.

  • SAPAddress: Network address for SAP. Usually URL or similar.

  • SAPPort: Port to use when accessing the SAP.

  • SAPUserId: User ID to identify the user with the SAP.

  • SAPUserPassword: User password to identify the user with the SAP.

  • HTTPProxyAddress: Proxy to use when accessing the SAP.

  • HTTPProxyPort: Proxy port to use when accessing the SAP.

  • HTTPProxyUserId Proxy user id to use when accessing the SAP.

  • HTTPProxyUserPassword: Proxy user password to use when accessing the SAP.

  • AccessPoint: Accesspoint to use when accessing the SAP. Accesspoint ID is a link to CommsDB IAP settings.

  • ClientId: Client ID string to use identofy the client SW to SAP.

  • HighLevelServices: Bitfield that identifies which high level services are supported.

  • ServerAuthenticationName Name for network server authentication

  • ServerAuthenticationPassword Password for network server authentication

  • ServerAcceptedContentType MIME content type string that tells what content types are accepted by network server

  • AuthorizationMode Authorization mode

  • Key-value pairs. Key-value pair mechanism for generic SAP Settings extensions.

WVSAPSettingsStore.dll
Since
3.0

Inherits from

Public Member Functions
~CIMPSSAPSettings()
IMPORT_C TIMPSAccessGroupAccessGroup()
IMPORT_C TUint32AccessPoint()
IMPORT_C TUint32AuthorizationMode()
CIMPSSAPSettingsBody &Body()
const CIMPSSAPSettingsBody &Body()
IMPORT_C const TDesC &ClientId()
IMPORT_C voidCopyL(const CIMPSSAPSettings &)
IMPORT_C TIntDataSize()
IMPORT_C TIntDeleteOpaque(const TDesC &)
IMPORT_C TBoolEqualConnectionSettings(const CIMPSSAPSettings &)
IMPORT_C TBoolEqualUserSettings(const CIMPSSAPSettings &)
IMPORT_C voidExternalizeL(RWriteStream &)
IMPORT_C TIntGetOpaqueDesC16(const TDesC &, TPtrC16 &)
IMPORT_C TIntGetOpaqueDesC8(const TDesC &, TPtrC8 &)
IMPORT_C TIntGetOpaqueInt(const TDesC &, TInt &)
IMPORT_C const TDesC &HTTPProxyAddress()
IMPORT_C TInt32HTTPProxyPort()
IMPORT_C const TDesC &HTTPProxyUserId()
IMPORT_C const TDesC &HTTPProxyUserPassword()
IMPORT_C TUint32HighLevelServices()
IMPORT_C voidIncreaseLoginCount()
IMPORT_C voidInternalizeL(RReadStream &)
CIMPSSAPKeyValuePairs &KeyValuePairs()
const CIMPSSAPKeyValuePairs &KeyValuePairs()
IMPORT_C TUint32LoginCount()
IMPORT_C CIMPSSAPSettings *NewL()
IMPORT_C CIMPSSAPSettings *NewLC()
IMPORT_C HBufC8 *PackLC()
IMPORT_C voidProtectL(TIMPSSAPProtection)
IMPORT_C TIMPSSAPProtectionProtection()
IMPORT_C voidReset()
IMPORT_C const TDesC &SAPAddress()
IMPORT_C const TDesC &SAPName()
IMPORT_C TInt32SAPPort()
IMPORT_C const TDesC &SAPUserId()
IMPORT_C const TDesC &SAPUserPassword()
IMPORT_C const TDesC &ServerAcceptedContentType()
IMPORT_C const TDesC &ServerAuthenticationName()
IMPORT_C const TDesC &ServerAuthenticationPassword()
IMPORT_C voidSetAccessGroup(TIMPSAccessGroup)
IMPORT_C TIntSetAccessPoint(TUint32)
IMPORT_C TIntSetAuthorizationMode(TUint32)
IMPORT_C voidSetClientIdL(const TDesC &)
IMPORT_C voidSetHTTPProxyAddressL(const TDesC &)
IMPORT_C TIntSetHTTPProxyPort(TInt32)
IMPORT_C voidSetHTTPProxyUserIdL(const TDesC &)
IMPORT_C voidSetHTTPProxyUserPasswordL(const TDesC &)
IMPORT_C TIntSetHighLevelServices(TUint32)
IMPORT_C TIntSetOpaqueDesC16(const TDesC &, const TDesC16 &)
IMPORT_C TIntSetOpaqueDesC8(const TDesC &, const TDesC8 &)
IMPORT_C TIntSetOpaqueInt(const TDesC &, TInt)
IMPORT_C voidSetSAPAddressL(const TDesC &)
IMPORT_C voidSetSAPNameL(const TDesC &)
IMPORT_C TIntSetSAPPort(TInt32)
IMPORT_C voidSetSAPUserIdL(const TDesC &)
IMPORT_C voidSetSAPUserPasswordL(const TDesC &)
IMPORT_C voidSetServerAcceptedContentTypeL(const TDesC &)
IMPORT_C voidSetServerAuthenticationNameL(const TDesC &)
IMPORT_C voidSetServerAuthenticationPasswordL(const TDesC &)
IMPORT_C TUint32Uid()
IMPORT_C voidUnPackL(const TDesC8 &)
Private Member Functions
CIMPSSAPSettings()
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
CIMPSSAPSettingsBody *iBody
CIMPSSAPKeyValuePairs *iKeyValuePairs

Constructor & Destructor Documentation

CIMPSSAPSettings()

CIMPSSAPSettings()[private]

C++ default constructor.

~CIMPSSAPSettings()

IMPORT_C~CIMPSSAPSettings()[virtual]

Destructor.

Member Functions Documentation

AccessGroup()

IMPORT_C TIMPSAccessGroupAccessGroup()const

Gets SAPs access group.

Since
3.0

AccessPoint()

IMPORT_C TUint32AccessPoint()const

AuthorizationMode()

IMPORT_C TUint32AuthorizationMode()const

Body()

CIMPSSAPSettingsBody &Body()
Gets the SAP settings body.
Since
3.0

Body()

const CIMPSSAPSettingsBody &Body()const

ClientId()

IMPORT_C const TDesC &ClientId()const

CopyL(const CIMPSSAPSettings &)

IMPORT_C voidCopyL(const CIMPSSAPSettings &aSource)

Copies all SAP settings details from given source container to self. If copying failes due OOM, target container state is undetermined.

Since
3.0

Parameters

const CIMPSSAPSettings & aSourceThe source container copy from.

DataSize()

IMPORT_C TIntDataSize()const

Approximates the SAP data size.

Since
3.0

DeleteOpaque(const TDesC &)

IMPORT_C TIntDeleteOpaque(const TDesC &aKey)

Key-value pair cleanup.

Deletes previously stored key-value pair.

Since
3.0

Parameters

const TDesC & aKeyKeyword to identify the key-value pair.

EqualConnectionSettings(const CIMPSSAPSettings &)

IMPORT_C TBoolEqualConnectionSettings(const CIMPSSAPSettings &aOther)const

Checks if SAP's connection settings are equal or not.

These compared settings are:
  • SAP address

  • SAP port

  • Proxy address

  • Proxy port

Since
3.0

Parameters

const CIMPSSAPSettings & aOtherCIMPSSAPSettings to compare.

EqualUserSettings(const CIMPSSAPSettings &)

IMPORT_C TBoolEqualUserSettings(const CIMPSSAPSettings &aOther)const

Checks if SAP's user settings are equal or not.

These compared settings are:
  • SAP user id,

  • SAP user password,

  • Proxy user id,

  • Proxy user password

Since
3.0

Parameters

const CIMPSSAPSettings & aOtherCIMPSSAPSettings to compare.

ExternalizeL(RWriteStream &)

IMPORT_C voidExternalizeL(RWriteStream &aStream)const
Externalises the SAP container object to given stream.
Since
3.0

Parameters

RWriteStream & aStreamstream to write to.

GetOpaqueDesC16(const TDesC &, TPtrC16 &)

IMPORT_C TIntGetOpaqueDesC16(const TDesC &aKey,
TPtrC16 &aValue
)const

Parameters

const TDesC & aKey
TPtrC16 & aValue

GetOpaqueDesC8(const TDesC &, TPtrC8 &)

IMPORT_C TIntGetOpaqueDesC8(const TDesC &aKey,
TPtrC8 &aValue
)const

Parameters

const TDesC & aKey
TPtrC8 & aValue

GetOpaqueInt(const TDesC &, TInt &)

IMPORT_C TIntGetOpaqueInt(const TDesC &aKey,
TInt &aValue
)const

Key-value pair getters.

Gets data previously stored for given keyword.

Since
3.0

Parameters

const TDesC & aKeyKeyword to identify the value.
TInt & aValuePointer descriptor / integer where the value is get. Pointer descriptor is put to point to requested data. Data is owned by the SAP container and stays valid untill the container object is destroyed or new value for key is assigned.

HTTPProxyAddress()

IMPORT_C const TDesC &HTTPProxyAddress()const

HTTPProxyPort()

IMPORT_C TInt32HTTPProxyPort()const

HTTPProxyUserId()

IMPORT_C const TDesC &HTTPProxyUserId()const

HTTPProxyUserPassword()

IMPORT_C const TDesC &HTTPProxyUserPassword()const

HighLevelServices()

IMPORT_C TUint32HighLevelServices()const

IncreaseLoginCount()

IMPORT_C voidIncreaseLoginCount()

Increases this SAP's login count by one.

SAP login count is used to keep track how many times to certain SAP has been logged in. (This information can be used for example to determine is certain SAP proper for automatic login etc.) Client using SAP information to perform login, must itself call this method to increase SAP login count after succesfull login and then use CIMPSSAPSettingsStore interace to store the changed SAP back to store.

Changing any of SAP data fields (except the SAP name), resets the login count to zero. (Setting the same data as previously to certain data field, doesn't reset the login count. Changing the SAP name doesn't affect to login count.)

Since
3.0

InternalizeL(RReadStream &)

IMPORT_C voidInternalizeL(RReadStream &aStream)
Internalises the SAP container object from given stream.
Since
3.0

Parameters

RReadStream & aStreamstream to read from.

KeyValuePairs()

CIMPSSAPKeyValuePairs &KeyValuePairs()
Gets the Key-Value pairs.
Since
3.0

KeyValuePairs()

const CIMPSSAPKeyValuePairs &KeyValuePairs()const

LoginCount()

IMPORT_C TUint32LoginCount()const

Gets this SAP's login count.

SAP login count is used to keep track how many times to certain SAP has been logged in. (This information can be used for example to determine is certain SAP proper for automatic login etc.)

IncreaseLoginCount()

NewL()

IMPORT_C CIMPSSAPSettings *NewL()[static]

Two-phased constructor.

Since
3.0

NewLC()

IMPORT_C CIMPSSAPSettings *NewLC()[static]

Two-phased constructor.

Since
3.0

PackLC()

IMPORT_C HBufC8 *PackLC()const

Packs SAP container object to buffer and returns buffer to caller. Caller is responsible of deleting the buffer. Leaves the created buffer to CleanupStack.

Since
3.0

ProtectL(TIMPSSAPProtection)

IMPORT_C voidProtectL(TIMPSSAPProtectionaProtection)

Protects this SAP with desired protection level.

SAP protection is used to restrict what SAP fields can be edited or what storage operations can be performed to it. See TIMPSSAPProtection enumeration (IMPSSAPSettings.h)for more information about available protection levels and operations allowed and restricted by them.

When trying to perform some restricted operation, a leave with KErrAccessDenied is raised or errocode KErrAccessDenied is returned from method.

NOTE!! If the SAP is allready protected, setting new protection level leaves also with KErrAccessDenied.

By default SAP has no protection (ESAPNoProtection).

Since
3.0

Parameters

TIMPSSAPProtection aProtectionThe protection level. If given protection level isn't proper one, leaves with KErrArgument.

Protection()

IMPORT_C TIMPSSAPProtectionProtection()const

Gets this SAP's protection level.

SAP protection is used to restrict what SAP fields can be edited or what storage operations can be performed to it. See TIMPSSAPProtection enumeration (IMPSSAPSettings.h) for more information about available protection levels and operations allowed by them.

Since
3.0

Reset()

IMPORT_C voidReset()

Resets SAPs settings.

After calling reset, SAP container is on same initial state as after construction. Getters return reference to empty string or zero, uid is zero and login count is zero. Also protection is reset to ESAPNoProtection and all key-value pairs removed.

Since
3.0

SAPAddress()

IMPORT_C const TDesC &SAPAddress()const

SAPName()

IMPORT_C const TDesC &SAPName()const

SAPPort()

IMPORT_C TInt32SAPPort()const

SAPUserId()

IMPORT_C const TDesC &SAPUserId()const

SAPUserPassword()

IMPORT_C const TDesC &SAPUserPassword()const

ServerAcceptedContentType()

IMPORT_C const TDesC &ServerAcceptedContentType()const

ServerAuthenticationName()

IMPORT_C const TDesC &ServerAuthenticationName()const

ServerAuthenticationPassword()

IMPORT_C const TDesC &ServerAuthenticationPassword()const

SetAccessGroup(TIMPSAccessGroup)

IMPORT_C voidSetAccessGroup(TIMPSAccessGroupaGroup)

Sets SAPs access group.

Since
3.0

Parameters

TIMPSAccessGroup aGroupSAPs access group

SetAccessPoint(TUint32)

IMPORT_C TIntSetAccessPoint(TUint32aAP)

Parameters

TUint32 aAP

SetAuthorizationMode(TUint32)

IMPORT_C TIntSetAuthorizationMode(TUint32aMode)

Parameters

TUint32 aMode

SetClientIdL(const TDesC &)

IMPORT_C voidSetClientIdL(const TDesC &aClientId)

Parameters

const TDesC & aClientId

SetHTTPProxyAddressL(const TDesC &)

IMPORT_C voidSetHTTPProxyAddressL(const TDesC &aAddress)

Parameters

const TDesC & aAddress

SetHTTPProxyPort(TInt32)

IMPORT_C TIntSetHTTPProxyPort(TInt32aPort)

Parameters

TInt32 aPort

SetHTTPProxyUserIdL(const TDesC &)

IMPORT_C voidSetHTTPProxyUserIdL(const TDesC &UserId)

Parameters

const TDesC & UserId

SetHTTPProxyUserPasswordL(const TDesC &)

IMPORT_C voidSetHTTPProxyUserPasswordL(const TDesC &aPassword)

Parameters

const TDesC & aPassword

SetHighLevelServices(TUint32)

IMPORT_C TIntSetHighLevelServices(TUint32aServices)

Parameters

TUint32 aServices

SetOpaqueDesC16(const TDesC &, const TDesC16 &)

IMPORT_C TIntSetOpaqueDesC16(const TDesC &aKey,
const TDesC16 &aValue
)

Parameters

const TDesC & aKey
const TDesC16 & aValue

SetOpaqueDesC8(const TDesC &, const TDesC8 &)

IMPORT_C TIntSetOpaqueDesC8(const TDesC &aKey,
const TDesC8 &aValue
)

Parameters

const TDesC & aKey
const TDesC8 & aValue

SetOpaqueInt(const TDesC &, TInt)

IMPORT_C TIntSetOpaqueInt(const TDesC &aKey,
TIntaValue
)

Key-value pair setters.

Stores arbitrary data for given keyword. Key-value pairs are stored to flat data structure in side the target SAP. Different data types may not share same key name. Keyword may not contain string "||". Also, the maximum length for key+value is NCentralRepositoryConstants::KMaxUnicodeStringLength-5

Since
3.0

Parameters

const TDesC & aKeyKeyword to use to identify the value.
TInt aValueDescriptor / integer value to store.

SetSAPAddressL(const TDesC &)

IMPORT_C voidSetSAPAddressL(const TDesC &aAddress)

Parameters

const TDesC & aAddress

SetSAPNameL(const TDesC &)

IMPORT_C voidSetSAPNameL(const TDesC &aName)

Setters to SAP Settings data.

They take const TDesC& reference or like and copy given data to internal buffer.

Note! SAP UID and store ID values can't be set by client. SAP UID and store ID value are set when the SAP's data is read from / written to store.

If editing protected data field, a leave with KErrAccessDenied is raised from leavable methods. Non leavable methods return KErrAccessDenied.

Since
3.0

Parameters

const TDesC & aName

SetSAPPort(TInt32)

IMPORT_C TIntSetSAPPort(TInt32aPort)

Parameters

TInt32 aPort

SetSAPUserIdL(const TDesC &)

IMPORT_C voidSetSAPUserIdL(const TDesC &aUserId)

Parameters

const TDesC & aUserId

SetSAPUserPasswordL(const TDesC &)

IMPORT_C voidSetSAPUserPasswordL(const TDesC &aPassword)

Parameters

const TDesC & aPassword

SetServerAcceptedContentTypeL(const TDesC &)

IMPORT_C voidSetServerAcceptedContentTypeL(const TDesC &aAcceptedContentType)

Parameters

const TDesC & aAcceptedContentType

SetServerAuthenticationNameL(const TDesC &)

IMPORT_C voidSetServerAuthenticationNameL(const TDesC &aAuthenticationName)

Parameters

const TDesC & aAuthenticationName

SetServerAuthenticationPasswordL(const TDesC &)

IMPORT_C voidSetServerAuthenticationPasswordL(const TDesC &aAuthenticationPassword)

Parameters

const TDesC & aAuthenticationPassword

Uid()

IMPORT_C TUint32Uid()const

Getters to SAP Settings data.

They return const TDesC& reference or like. If values aren't set, they return reference to empty string or zero.

Since
3.0

UnPackL(const TDesC8 &)

IMPORT_C voidUnPackL(const TDesC8 &aPackage)

Initializes SAP container object from a package previously created with PackLC().

Since
3.0

Parameters

const TDesC8 & aPackageSAP container package where to read from.

Member Data Documentation

CIMPSSAPSettingsBody * iBody

CIMPSSAPSettingsBody *iBody[private]

CIMPSSAPKeyValuePairs * iKeyValuePairs

CIMPSSAPKeyValuePairs *iKeyValuePairs[private]