#include <mw/extendedconnpref.h>
class TExtendedConnPref : public Meta::SMetaDataECom |
Public Attributes | |
---|---|
const TUint32 | ENoteBehaviourConnSilent |
Public Member Enumerations | |
---|---|
enum | anonymous { EUid, ETypeId } |
enum | TExtendedConnBearer { EExtendedConnBearerUnknown, EExtendedConnBearerCellular, EExtendedConnBearerWLAN } |
enum | TNoteBehaviour { ENoteBehaviourDefault, ENoteBehaviourConnDisableNotes, ENoteBehaviourConnDisableQueries } |
Public Member Functions | |
---|---|
TExtendedConnPref() | |
IMPORT_C TUint32 | BearerSet() |
IMPORT_C TBool | ConnSelectionDialog() |
IMPORT_C TBool | DisconnectDialog() |
IMPORT_C TBool | ForcedRoaming() |
IMPORT_C TUint32 | IapId() |
IMPORT_C TUint32 | NoteBehaviour() |
IMPORT_C void | SetBearerSet(TUint32) |
IMPORT_C void | SetConnSelectionDialog(TBool) |
IMPORT_C void | SetDisconnectDialog(TBool) |
IMPORT_C void | SetForcedRoaming(TBool) |
IMPORT_C void | SetIapId(TUint32) |
IMPORT_C void | SetNoteBehaviour(TUint32) |
IMPORT_C void | SetSnapId(TUint32) |
IMPORT_C void | SetSnapPurpose(CMManager::TSnapPurpose) |
IMPORT_C TUint32 | SnapId() |
IMPORT_C CMManager::TSnapPurpose | SnapPurpose() |
User of this API must remember to link against extendedconnpref.lib and netmeta.lib and add include <extendedconnpref.h>.
Set methods for the extended connection preference. This preference cannot be used with RConnection::Start as a TConnPref. It must be part of a TConnPrefList. The extented connection preference can be appeded to connection setup parameters before RConnection::Start() dispatch. Appending is carried out as follows.
See connpref.h for more details.
RSocketServ sockSvr; RConnection conn; sockSvr.Connect(); User::LeaveIfError(conn.Open(sockSvr)); CleanupClosePushL(conn); TConnPrefList prefList; TExtendedConnPref extPrefs; extPrefs.SetSnapPurpose( CMManager::ESnapPurposeInternet ); extPrefs.SetNoteBehaviour( ENoteBehaviourConnSilent ); prefList.AppendL(&extPrefs); TInt error = conn.Start(prefList); CleanupStack::PopAndDestroy(&conn);
See also: TConnPrefList RConnection::Start
since S60 5.2
const TUint32 | ENoteBehaviourConnSilent | [static] |
Starts connection and roams between different bearers without any queries, dialogs or notes, i.e., nothing about connection is shown to the user.
ExtendedConnBearer enables application to request a specific bearer for a connection.
TNoteBehaviour enables application to request a specific behaviour from the middleware regarding displaying of dialogs, notes and queries.
Enumerator | Value | Description |
---|---|---|
ENoteBehaviourDefault | 0x00000000 |
Displays notes and queries according to default settings. |
ENoteBehaviourConnDisableNotes | 0x00000001 |
Starts connection and roams between different bearers without any notes, i.e., notes about connection state are not shown to the user. |
ENoteBehaviourConnDisableQueries | 0x00000002 |
Roams between different bearers without displaying any queries to the user but informs the user on the events with dialogs or notes. User is able to see only notes about connection state but not any queries which would need user's confirmation. |
IMPORT_C TUint32 | BearerSet | ( | ) | const |
Gets set of requested bearers.
Returns: Set of requested bearers. Type is TUint32 due to bifield character.
IMPORT_C TBool | ConnSelectionDialog | ( | ) | const |
Indicates whether Connection selection dialog is enabled.
Returns: Indicates whether Connection selection dialog is enabled.
IMPORT_C TBool | DisconnectDialog | ( | ) | const |
Indicates whether Disconnect dialog is enabled.
Returns: Indicates whether Disconnect dialog is enabled.
IMPORT_C TBool | ForcedRoaming | ( | ) | const |
Indicates whether forced roaming is enabled.
Returns: Indicates whether forced roaming is enabled.
IMPORT_C TUint32 | NoteBehaviour | ( | ) | const |
Gets note behaviour.
Returns: Note behaviour as a combination of TNoteBehaviour values. Type is TUint32 due to bitfield character.
IMPORT_C void | SetBearerSet | ( | TUint32 | aBearerSet | ) |
Sets bearer, use combination of TExtendedConnBearer values. Default value is KExtendedConnBearerUnknown.
Parameter | Description |
---|---|
aBearerSet | A set of bearers as a combination of TExtendedConnBearer values. Type is TUint32 due to bitfield character. |
IMPORT_C void | SetConnSelectionDialog | ( | TBool | aConnSelectionDialog | ) |
Enables or disables Connection selection dialog. Only the SNAPs/IAPs matching with BearerSet are shown in the dialog. By default, Connection selection dialog is disabled.
If Connection selection dialog is enabled, SNAP id shall be zero. If Connection selection dialog is enabled, IAP id shall be zero. If Connection selection dialog is enabled, SNAP purpose shall be CMManager::ESnapPurposeUnknown. Either SNAP purpose, SNAP id, or IAP id shall be given, or Connection selection dialog shall be enabled.
Parameter | Description |
---|---|
aConnSelectionDialog | Indicates whether Connection selection dialog is enabled or disabled. |
IMPORT_C void | SetDisconnectDialog | ( | TBool | aEnableDisconnectDialog | ) |
Enables or disables Disconnect dialog. By default, Disconnect dialog is enabled.
Parameter | Description |
---|---|
aEnableDisconnectDialog | Indicates whether Disconnect dialog is enabled or disabled. |
IMPORT_C void | SetForcedRoaming | ( | TBool | aForcedRoaming | ) |
Enables or disables forced roaming. By default, forced roaming is enabled. Forced roaming only applies on connections made to Internet SNAP.
Forced roaming means that the connection can be torn down by the middleware when better one is available. E.g., when known WLAN IAP becomes available, 3G connection is disconnected.
Parameter | Description |
---|---|
aForcedRoaming | Indicates whether forced roaming is enabled or disabled. |
IMPORT_C void | SetIapId | ( | TUint32 | aIapId | ) |
Sets IAP id.
Setting IAP id means that the connection will be made utilizing given IAP id no matter what existing connections are available.
If IAP id is zero, it is interpreted as client's request for not requesting any specific IAP. Default value is 0.
If IAP id is set, SNAP id shall be zero. If IAP id is set, SNAP purpose shall be CMManager::ESnapPurposeUnknown. If IAP id is set, Connection selection dialog shall be disabled. If IAP id is set, bearer set shall be EExtendedConnBearerUnknown. If IAP id is set, forced roaming is disabled automatically. Either SNAP purpose, SNAP id, or IAP id shall be given, or Connection selection dialog shall be enabled.
IMPORT_C void | SetNoteBehaviour | ( | TUint32 | aNoteBehaviour | ) |
Sets note behaviour, use combination of TNoteBehaviour values. Default value is ENoteBehaviourDefault. This method does not control connection selection dialog or disconnect dialog. There are own methods for these purposes in this API.
Parameter | Description |
---|---|
aNoteBehaviour | Note behaviour as a combination of TNoteBehaviour values. Type is TUint32 due to bitfield character. |
IMPORT_C void | SetSnapId | ( | TUint32 | aSnapId | ) |
Sets SNAP id. If SNAP id is zero, it is interpreted as client's request for not requesting any specific SNAP. Default value is 0.
If SNAP id is set, IAP id shall be zero. If SNAP id is set, SNAP purpose shall be CMManager::ESnapPurposeUnknown. If SNAP id is set, Connection selection dialog shall be disabled. Either SNAP purpose, SNAP id, or IAP id shall be given, or Connection selection dialog shall be enabled.
IMPORT_C void | SetSnapPurpose | ( | CMManager::TSnapPurpose | aSnapPurpose | ) |
Sets the purpose of the SNAP identifying where the connection is requested to. This function enables applications to start a connection to, e.g., Internet SNAP or intranet SNAP without iterating through all SNAPs to find the ID of the right one. Default value is ESnapPurposeUnknown meaning that any SNAP is fine.
If SNAP purpose is set, IAP id shall be zero. If SNAP purpose is set, SNAP id shall be zero. If SNAP purpose is set, Connection selection dialog shall be disabled. Either SNAP purpose, SNAP id, or IAP id shall be given, or Connection selection dialog shall be enabled.
Parameter | Description |
---|---|
aSnapPurpose | SNAP Purpose. |