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.
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.
Private Member Functions | |
---|---|
CIMPSSAPSettings() |
Private Attributes | |
---|---|
CIMPSSAPSettingsBody * | iBody |
CIMPSSAPKeyValuePairs * | iKeyValuePairs |
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.
const CIMPSSAPSettings & aSource | The source container copy from. |
IMPORT_C TInt | DeleteOpaque | ( | const TDesC & | aKey | ) |
Key-value pair cleanup.
Deletes previously stored key-value pair.
const TDesC & aKey | Keyword to identify the key-value pair. |
IMPORT_C TBool | EqualConnectionSettings | ( | const CIMPSSAPSettings & | aOther | ) | const |
Checks if SAP's connection settings are equal or not.
SAP address
SAP port
Proxy address
Proxy port
const CIMPSSAPSettings & aOther | CIMPSSAPSettings to compare. |
IMPORT_C TBool | EqualUserSettings | ( | const CIMPSSAPSettings & | aOther | ) | const |
Checks if SAP's user settings are equal or not.
SAP user id,
SAP user password,
Proxy user id,
Proxy user password
const CIMPSSAPSettings & aOther | CIMPSSAPSettings to compare. |
IMPORT_C void | ExternalizeL | ( | RWriteStream & | aStream | ) | const |
RWriteStream & aStream | stream to write to. |
IMPORT_C TInt | GetOpaqueDesC16 | ( | const TDesC & | aKey, |
TPtrC16 & | aValue | |||
) | const |
IMPORT_C TInt | GetOpaqueDesC8 | ( | const TDesC & | aKey, |
TPtrC8 & | aValue | |||
) | const |
IMPORT_C TInt | GetOpaqueInt | ( | const TDesC & | aKey, |
TInt & | aValue | |||
) | const |
Key-value pair getters.
Gets data previously stored for given keyword.
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. |
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.)
IMPORT_C void | InternalizeL | ( | RReadStream & | aStream | ) |
RReadStream & aStream | stream to read from. |
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.)
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.
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).
TIMPSSAPProtection aProtection | The protection level. If given protection level isn't proper one, leaves with KErrArgument. |
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.
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.
IMPORT_C void | SetAccessGroup | ( | TIMPSAccessGroup | aGroup | ) |
Sets SAPs access group.
TIMPSAccessGroup aGroup | SAPs access group |
IMPORT_C TInt | SetAuthorizationMode | ( | TUint32 | aMode | ) |
TUint32 aMode |
IMPORT_C void | SetClientIdL | ( | const TDesC & | aClientId | ) |
const TDesC & aClientId |
IMPORT_C void | SetHTTPProxyAddressL | ( | const TDesC & | aAddress | ) |
const TDesC & aAddress |
IMPORT_C void | SetHTTPProxyUserIdL | ( | const TDesC & | UserId | ) |
const TDesC & UserId |
IMPORT_C void | SetHTTPProxyUserPasswordL | ( | const TDesC & | aPassword | ) |
const TDesC & aPassword |
IMPORT_C TInt | SetHighLevelServices | ( | TUint32 | aServices | ) |
TUint32 aServices |
IMPORT_C TInt | SetOpaqueDesC16 | ( | const TDesC & | aKey, |
const TDesC16 & | aValue | |||
) |
IMPORT_C TInt | SetOpaqueDesC8 | ( | const TDesC & | aKey, |
const TDesC8 & | aValue | |||
) |
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
IMPORT_C void | SetSAPAddressL | ( | const TDesC & | aAddress | ) |
const TDesC & aAddress |
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.
const TDesC & aName |
IMPORT_C void | SetSAPUserIdL | ( | const TDesC & | aUserId | ) |
const TDesC & aUserId |
IMPORT_C void | SetSAPUserPasswordL | ( | const TDesC & | aPassword | ) |
const TDesC & aPassword |
IMPORT_C void | SetServerAcceptedContentTypeL | ( | const TDesC & | aAcceptedContentType | ) |
const TDesC & aAcceptedContentType |
IMPORT_C void | SetServerAuthenticationNameL | ( | const TDesC & | aAuthenticationName | ) |
const TDesC & aAuthenticationName |
IMPORT_C void | SetServerAuthenticationPasswordL | ( | const TDesC & | aAuthenticationPassword | ) |
const TDesC & aAuthenticationPassword |
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.
IMPORT_C void | UnPackL | ( | const TDesC8 & | aPackage | ) |
Initializes SAP container object from a package previously created with PackLC().
const TDesC8 & aPackage | SAP container package where to read from. |
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.