TExtendedConnPref Class Reference

#include <mw/extendedconnpref.h>

Link against: extendedconnpref.lib

class TExtendedConnPref : public Meta::SMetaDataECom

Inherits from

  • TExtendedConnPref
    Public Attributes
    const TUint32ENoteBehaviourConnSilent
    Public Member Enumerations
    enumanonymous { EUid, ETypeId }
    enumTExtendedConnBearer { EExtendedConnBearerUnknown, EExtendedConnBearerCellular, EExtendedConnBearerWLAN }
    enumTNoteBehaviour { ENoteBehaviourDefault, ENoteBehaviourConnDisableNotes, ENoteBehaviourConnDisableQueries }
    Public Member Functions
    TExtendedConnPref()
    IMPORT_C TUint32BearerSet()
    IMPORT_C TBoolConnSelectionDialog()
    IMPORT_C TBoolDisconnectDialog()
    IMPORT_C TBoolForcedRoaming()
    IMPORT_C TUint32IapId()
    IMPORT_C TUint32NoteBehaviour()
    IMPORT_C voidSetBearerSet(TUint32)
    IMPORT_C voidSetConnSelectionDialog(TBool)
    IMPORT_C voidSetDisconnectDialog(TBool)
    IMPORT_C voidSetForcedRoaming(TBool)
    IMPORT_C voidSetIapId(TUint32)
    IMPORT_C voidSetNoteBehaviour(TUint32)
    IMPORT_C voidSetSnapId(TUint32)
    IMPORT_C voidSetSnapPurpose(CMManager::TSnapPurpose)
    IMPORT_C TUint32SnapId()
    IMPORT_C CMManager::TSnapPurposeSnapPurpose()
    Inherited Functions
    Meta::MMetaData::GetAttribPtr(const TInt)const
    Meta::MMetaData::GetVDataTable()const
    Meta::SMetaData::Check(TPtrC8 &)const
    Meta::SMetaData::CheckTypeOf(TPtrC8 &)const
    Meta::SMetaData::Copy(const SMetaData &)
    Meta::SMetaData::GetTypeId()const
    Meta::SMetaData::IsTypeOf(const STypeId &)const
    Meta::SMetaData::Length()const
    Meta::SMetaData::Load(TPtrC8 &)
    Meta::SMetaData::SMetaData()
    Meta::SMetaData::Store(TDes8 &)const
    Meta::SMetaData::~SMetaData()
    Meta::SMetaDataECom::LoadL(TPtrC8 &)
    Meta::SMetaDataECom::NewInstanceL(const STypeId &)
    Meta::SMetaDataECom::SMetaDataECom()
    Meta::SMetaDataECom::~SMetaDataECom()

    Detailed Description

    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

    Member Attribute Documentation

    ENoteBehaviourConnSilent

    const TUint32ENoteBehaviourConnSilent[static]

    Starts connection and roams between different bearers without any queries, dialogs or notes, i.e., nothing about connection is shown to the user.

    Member Enumeration Documentation

    Enum anonymous

    EnumeratorValueDescription
    EUid0x20016A82

    UID for Extended Connection Preference API implementation.

    ETypeId1

    Subidentifier.

    Enum TExtendedConnBearer

    ExtendedConnBearer enables application to request a specific bearer for a connection.

    EnumeratorValueDescription
    EExtendedConnBearerUnknown0x00000000

    Bearer support unknown.

    EExtendedConnBearerCellular0x00000001

    Support GPRS, 3G and Cdma2000 bearers. CSD not supported.

    EExtendedConnBearerWLAN0x00000002

    WLAN bearer support.

    Enum TNoteBehaviour

    TNoteBehaviour enables application to request a specific behaviour from the middleware regarding displaying of dialogs, notes and queries.

    EnumeratorValueDescription
    ENoteBehaviourDefault0x00000000

    Displays notes and queries according to default settings.

    ENoteBehaviourConnDisableNotes0x00000001

    Starts connection and roams between different bearers without any notes, i.e., notes about connection state are not shown to the user.

    ENoteBehaviourConnDisableQueries0x00000002

    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.

    Constructor & Destructor Documentation

    TExtendedConnPref ( )

    IMPORT_CTExtendedConnPref()

    Constructor.

    Member Function Documentation

    BearerSet ( )

    IMPORT_C TUint32BearerSet()const

    Gets set of requested bearers.

    Returns: Set of requested bearers. Type is TUint32 due to bifield character.

    ConnSelectionDialog ( )

    IMPORT_C TBoolConnSelectionDialog()const

    Indicates whether Connection selection dialog is enabled.

    Returns: Indicates whether Connection selection dialog is enabled.

    DisconnectDialog ( )

    IMPORT_C TBoolDisconnectDialog()const

    Indicates whether Disconnect dialog is enabled.

    Returns: Indicates whether Disconnect dialog is enabled.

    ForcedRoaming ( )

    IMPORT_C TBoolForcedRoaming()const

    Indicates whether forced roaming is enabled.

    Returns: Indicates whether forced roaming is enabled.

    IapId ( )

    IMPORT_C TUint32IapId()const

    Gets IAP id.

    Returns: IAP id.

    NoteBehaviour ( )

    IMPORT_C TUint32NoteBehaviour()const

    Gets note behaviour.

    Returns: Note behaviour as a combination of TNoteBehaviour values. Type is TUint32 due to bitfield character.

    SetBearerSet ( TUint32 )

    IMPORT_C voidSetBearerSet(TUint32aBearerSet)

    Sets bearer, use combination of TExtendedConnBearer values. Default value is KExtendedConnBearerUnknown.

    ParameterDescription
    aBearerSetA set of bearers as a combination of TExtendedConnBearer values. Type is TUint32 due to bitfield character.

    SetConnSelectionDialog ( TBool )

    IMPORT_C voidSetConnSelectionDialog(TBoolaConnSelectionDialog)

    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.

    ParameterDescription
    aConnSelectionDialogIndicates whether Connection selection dialog is enabled or disabled.

    SetDisconnectDialog ( TBool )

    IMPORT_C voidSetDisconnectDialog(TBoolaEnableDisconnectDialog)

    Enables or disables Disconnect dialog. By default, Disconnect dialog is enabled.

    ParameterDescription
    aEnableDisconnectDialogIndicates whether Disconnect dialog is enabled or disabled.

    SetForcedRoaming ( TBool )

    IMPORT_C voidSetForcedRoaming(TBoolaForcedRoaming)

    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.

    ParameterDescription
    aForcedRoamingIndicates whether forced roaming is enabled or disabled.

    SetIapId ( TUint32 )

    IMPORT_C voidSetIapId(TUint32aIapId)

    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.

    SetNoteBehaviour ( TUint32 )

    IMPORT_C voidSetNoteBehaviour(TUint32aNoteBehaviour)

    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.

    ParameterDescription
    aNoteBehaviourNote behaviour as a combination of TNoteBehaviour values. Type is TUint32 due to bitfield character.

    SetSnapId ( TUint32 )

    IMPORT_C voidSetSnapId(TUint32aSnapId)

    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.

    SetSnapPurpose ( CMManager::TSnapPurpose )

    IMPORT_C voidSetSnapPurpose(CMManager::TSnapPurposeaSnapPurpose)

    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.

    ParameterDescription
    aSnapPurposeSNAP Purpose.

    SnapId ( )

    IMPORT_C TUint32SnapId()const

    Gets SNAP id.

    Returns: SNAP id.

    SnapPurpose ( )

    IMPORT_C CMManager::TSnapPurposeSnapPurpose()const

    Gets SNAP purpose.

    Returns: SNAP purpose.