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 TIMPSAccessGroup AccessGroup ()
IMPORT_C TUint32 AccessPoint ()
IMPORT_C TUint32 AuthorizationMode ()
CIMPSSAPSettingsBody & Body ()
const CIMPSSAPSettingsBody & Body ()
IMPORT_C const TDesC & ClientId ()
IMPORT_C void CopyL (const CIMPSSAPSettings &)
IMPORT_C TInt DataSize ()
IMPORT_C TInt DeleteOpaque (const TDesC &)
IMPORT_C TBool EqualConnectionSettings (const CIMPSSAPSettings &)
IMPORT_C TBool EqualUserSettings (const CIMPSSAPSettings &)
IMPORT_C void ExternalizeL ( RWriteStream &)
IMPORT_C TInt GetOpaqueDesC16 (const TDesC &, TPtrC16 &)
IMPORT_C TInt GetOpaqueDesC8 (const TDesC &, TPtrC8 &)
IMPORT_C TInt GetOpaqueInt (const TDesC &, TInt &)
IMPORT_C const TDesC & HTTPProxyAddress ()
IMPORT_C TInt32 HTTPProxyPort ()
IMPORT_C const TDesC & HTTPProxyUserId ()
IMPORT_C const TDesC & HTTPProxyUserPassword ()
IMPORT_C TUint32 HighLevelServices ()
IMPORT_C void IncreaseLoginCount ()
IMPORT_C void InternalizeL ( RReadStream &)
CIMPSSAPKeyValuePairs & KeyValuePairs ()
const CIMPSSAPKeyValuePairs & KeyValuePairs ()
IMPORT_C TUint32 LoginCount ()
IMPORT_C CIMPSSAPSettings * NewL ()
IMPORT_C CIMPSSAPSettings * NewLC ()
IMPORT_C HBufC8 * PackLC ()
IMPORT_C void ProtectL ( TIMPSSAPProtection )
IMPORT_C TIMPSSAPProtection Protection ()
IMPORT_C void Reset ()
IMPORT_C const TDesC & SAPAddress ()
IMPORT_C const TDesC & SAPName ()
IMPORT_C TInt32 SAPPort ()
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 void SetAccessGroup ( TIMPSAccessGroup )
IMPORT_C TInt SetAccessPoint ( TUint32 )
IMPORT_C TInt SetAuthorizationMode ( TUint32 )
IMPORT_C void SetClientIdL (const TDesC &)
IMPORT_C void SetHTTPProxyAddressL (const TDesC &)
IMPORT_C TInt SetHTTPProxyPort ( TInt32 )
IMPORT_C void SetHTTPProxyUserIdL (const TDesC &)
IMPORT_C void SetHTTPProxyUserPasswordL (const TDesC &)
IMPORT_C TInt SetHighLevelServices ( TUint32 )
IMPORT_C TInt SetOpaqueDesC16 (const TDesC &, const TDesC16 &)
IMPORT_C TInt SetOpaqueDesC8 (const TDesC &, const TDesC8 &)
IMPORT_C TInt SetOpaqueInt (const TDesC &, TInt )
IMPORT_C void SetSAPAddressL (const TDesC &)
IMPORT_C void SetSAPNameL (const TDesC &)
IMPORT_C TInt SetSAPPort ( TInt32 )
IMPORT_C void SetSAPUserIdL (const TDesC &)
IMPORT_C void SetSAPUserPasswordL (const TDesC &)
IMPORT_C void SetServerAcceptedContentTypeL (const TDesC &)
IMPORT_C void SetServerAuthenticationNameL (const TDesC &)
IMPORT_C void SetServerAuthenticationPasswordL (const TDesC &)
IMPORT_C TUint32 Uid ()
IMPORT_C void UnPackL (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 TIMPSAccessGroup AccessGroup ( ) const

Gets SAPs access group.

Since
3.0

AccessPoint()

IMPORT_C TUint32 AccessPoint ( ) const

AuthorizationMode()

IMPORT_C TUint32 AuthorizationMode ( ) 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 void CopyL ( 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 & aSource The source container copy from.

DataSize()

IMPORT_C TInt DataSize ( ) const

Approximates the SAP data size.

Since
3.0

DeleteOpaque(const TDesC &)

IMPORT_C TInt DeleteOpaque ( const TDesC & aKey )

Key-value pair cleanup.

Deletes previously stored key-value pair.

Since
3.0

Parameters

const TDesC & aKey Keyword to identify the key-value pair.

EqualConnectionSettings(const CIMPSSAPSettings &)

IMPORT_C TBool EqualConnectionSettings ( 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 & aOther CIMPSSAPSettings to compare.

EqualUserSettings(const CIMPSSAPSettings &)

IMPORT_C TBool EqualUserSettings ( 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 & aOther CIMPSSAPSettings to compare.

ExternalizeL(RWriteStream &)

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

Parameters

RWriteStream & aStream stream to write to.

GetOpaqueDesC16(const TDesC &, TPtrC16 &)

IMPORT_C TInt GetOpaqueDesC16 ( const TDesC & aKey,
TPtrC16 & aValue
) const

Parameters

const TDesC & aKey
TPtrC16 & aValue

GetOpaqueDesC8(const TDesC &, TPtrC8 &)

IMPORT_C TInt GetOpaqueDesC8 ( const TDesC & aKey,
TPtrC8 & aValue
) const

Parameters

const TDesC & aKey
TPtrC8 & aValue

GetOpaqueInt(const TDesC &, TInt &)

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

Key-value pair getters.

Gets data previously stored for given keyword.

Since
3.0

Parameters

const TDesC & aKey Keyword to identify the value.
TInt & aValue Pointer 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 TInt32 HTTPProxyPort ( ) const

HTTPProxyUserId()

IMPORT_C const TDesC & HTTPProxyUserId ( ) const

HTTPProxyUserPassword()

IMPORT_C const TDesC & HTTPProxyUserPassword ( ) const

HighLevelServices()

IMPORT_C TUint32 HighLevelServices ( ) const

IncreaseLoginCount()

IMPORT_C void IncreaseLoginCount ( )

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 void InternalizeL ( RReadStream & aStream )
Internalises the SAP container object from given stream.
Since
3.0

Parameters

RReadStream & aStream stream to read from.

KeyValuePairs()

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

KeyValuePairs()

const CIMPSSAPKeyValuePairs & KeyValuePairs ( ) const

LoginCount()

IMPORT_C TUint32 LoginCount ( ) 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 void ProtectL ( TIMPSSAPProtection aProtection )

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 aProtection The protection level. If given protection level isn't proper one, leaves with KErrArgument.

Protection()

IMPORT_C TIMPSSAPProtection Protection ( ) 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 void Reset ( )

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 TInt32 SAPPort ( ) 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 void SetAccessGroup ( TIMPSAccessGroup aGroup )

Sets SAPs access group.

Since
3.0

Parameters

TIMPSAccessGroup aGroup SAPs access group

SetAccessPoint(TUint32)

IMPORT_C TInt SetAccessPoint ( TUint32 aAP )

Parameters

TUint32 aAP

SetAuthorizationMode(TUint32)

IMPORT_C TInt SetAuthorizationMode ( TUint32 aMode )

Parameters

TUint32 aMode

SetClientIdL(const TDesC &)

IMPORT_C void SetClientIdL ( const TDesC & aClientId )

Parameters

const TDesC & aClientId

SetHTTPProxyAddressL(const TDesC &)

IMPORT_C void SetHTTPProxyAddressL ( const TDesC & aAddress )

Parameters

const TDesC & aAddress

SetHTTPProxyPort(TInt32)

IMPORT_C TInt SetHTTPProxyPort ( TInt32 aPort )

Parameters

TInt32 aPort

SetHTTPProxyUserIdL(const TDesC &)

IMPORT_C void SetHTTPProxyUserIdL ( const TDesC & UserId )

Parameters

const TDesC & UserId

SetHTTPProxyUserPasswordL(const TDesC &)

IMPORT_C void SetHTTPProxyUserPasswordL ( const TDesC & aPassword )

Parameters

const TDesC & aPassword

SetHighLevelServices(TUint32)

IMPORT_C TInt SetHighLevelServices ( TUint32 aServices )

Parameters

TUint32 aServices

SetOpaqueDesC16(const TDesC &, const TDesC16 &)

IMPORT_C TInt SetOpaqueDesC16 ( const TDesC & aKey,
const TDesC16 & aValue
)

Parameters

const TDesC & aKey
const TDesC16 & aValue

SetOpaqueDesC8(const TDesC &, const TDesC8 &)

IMPORT_C TInt SetOpaqueDesC8 ( const TDesC & aKey,
const TDesC8 & aValue
)

Parameters

const TDesC & aKey
const TDesC8 & aValue

SetOpaqueInt(const TDesC &, TInt)

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

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 & aKey Keyword to use to identify the value.
TInt aValue Descriptor / integer value to store.

SetSAPAddressL(const TDesC &)

IMPORT_C void SetSAPAddressL ( const TDesC & aAddress )

Parameters

const TDesC & aAddress

SetSAPNameL(const TDesC &)

IMPORT_C void SetSAPNameL ( 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 TInt SetSAPPort ( TInt32 aPort )

Parameters

TInt32 aPort

SetSAPUserIdL(const TDesC &)

IMPORT_C void SetSAPUserIdL ( const TDesC & aUserId )

Parameters

const TDesC & aUserId

SetSAPUserPasswordL(const TDesC &)

IMPORT_C void SetSAPUserPasswordL ( const TDesC & aPassword )

Parameters

const TDesC & aPassword

SetServerAcceptedContentTypeL(const TDesC &)

IMPORT_C void SetServerAcceptedContentTypeL ( const TDesC & aAcceptedContentType )

Parameters

const TDesC & aAcceptedContentType

SetServerAuthenticationNameL(const TDesC &)

IMPORT_C void SetServerAuthenticationNameL ( const TDesC & aAuthenticationName )

Parameters

const TDesC & aAuthenticationName

SetServerAuthenticationPasswordL(const TDesC &)

IMPORT_C void SetServerAuthenticationPasswordL ( const TDesC & aAuthenticationPassword )

Parameters

const TDesC & aAuthenticationPassword

Uid()

IMPORT_C TUint32 Uid ( ) 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 void UnPackL ( const TDesC8 & aPackage )

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

Since
3.0

Parameters

const TDesC8 & aPackage SAP container package where to read from.

Member Data Documentation

CIMPSSAPSettingsBody * iBody

CIMPSSAPSettingsBody * iBody [private]

CIMPSSAPKeyValuePairs * iKeyValuePairs

CIMPSSAPKeyValuePairs * iKeyValuePairs [private]