CWiFiProtActiveRunner Class Reference

class CWiFiProtActiveRunner : public CActive
CWiFiProtActiveRunner State machine like object that manages Wi-Fi Protected setup ui process
Since
S60 v3.2

Inherits from

Public Member Functions
~CWiFiProtActiveRunner()
voidCancelByClient()
CWiFiProtActiveRunner *NewL(CWiFiProtDlgsPlugin *, TInt)
voidStartProtectedSetupAsyncL(const TWlanSsid &, RArray< TUint32 > &, RCmManagerExt &)
voidStartProtectedSetupConnL(const TWlanSsid &, TWlanProtectedSetupCredentialAttribute &, RCmManagerExt &)
WiFiProt::TWiFiReturn StartProtectedSetupL(const TWlanSsid &, RArray< TUint32 > &, RCmManagerExt &)
TInt UsePinCodeLinkSelectedL(TAny *)
Private Member Functions
CWiFiProtActiveRunner(CWiFiProtDlgsPlugin *, TInt)
voidCancelOngoingRequest()
voidCheckNetworkAvailabilityL()
voidCleanupTempIapL()
TInt ComputeChecksum(TInt)
voidConfigureL()
voidConstructL()
voidCreateAllIapsL()
TUint32 CreateIapL(const TInt)
TUint32 CreateTempIapL(TUint32 &)
voidDeleteTempIapL()
voidDestroyWaitDialog()
voidDialogDismissedL(TInt)
voidDoCancel()
voidDoUsePinCodeLinkSelectedL()
voidEvaluateResult()
TBool HandleErrorL(TInt)
voidHandleNoErrorL()
TBool IsWepFormatHexL(TInt)
voidPinQueryExitL(TInt)
voidRunL()
voidRunProtectedSetup(const TInt32)
voidSaveWepSecuritySettingsL(TWlanProtectedSetupCredentialAttribute, TUint32, CommsDat::CMDBSession &)
voidSelectConnectionL()
TUint32 SetIapDataL(const TInt, RCmConnectionMethodExt &)
voidSetNextStateAndComplete(TWiFiProtStates, TInt)
voidSetWepKeyL(CWEPSecuritySettings &, TWlanWepKey &, TInt)
voidShowEnterPinOnStationDialogL()
voidShowFinalNoteL()
voidShowInitialDialogL()
voidShowInitiateEasySetupDialogL()
voidShowNoWlanNetworksNoteL()
voidShowOfflineQuery()
voidShowWaitingDialogAndProceedL()
voidShowWaitingDialogL()
voidStartWlanScan()
Inherited Functions
CActive::CActive(TInt)
CActive::Cancel()
CActive::Deque()
CActive::Extension_(TUint,TAny *&,TAny *)
CActive::IsActive()const
CActive::IsAdded()const
CActive::Priority()const
CActive::RunError(TInt)
CActive::SetActive()
CActive::SetPriority(TInt)
CActive::~CActive()
CBase::CBase()
CBase::Delete(CBase *)
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 Member Enumerations
enumTWiFiProtOutstandingRequest { EWiFiProtReqNone = 0, EWiFiProtReqConfirmDialog, EWiFiProtReqInitDialog, EWiFiProtReqWPS, EWiFiProtReqWlanScan }
enumTWiFiProtStates {
EWiFiProtAskConfigureAutomatically = 1, EWiFiProtInitiateEasySetup, EWifiProtOfflineQuery, EWiFiProtUsePinCode, EWiFiProtStartingWaitDlg, EWiFiProtConfiguring, EWiFiProtWlanMgmtEngineReturned, EWiFiProtCreateAllIaps, EWiFiProtConfFinished, EWiFiProtDestroyWaitNote, EWiFiProtWaitForPINQuery, EWiFiProtWlanScan, EWiFiProtSelectConnection, EWiFiProtSettingsConfNote, EWiFiProtFinished, EWiFiProtCancelled
}
Inherited Enumerations
CActive:TPriority
Private Attributes
RArray< TInt >iAvailableNetworks
TBool iClientCancelled
RPointerArray< RCmConnectionMethodExt >iCmArray
RCmManagerExt *iCmManagerExt
CWiFiProtConfirmationNoteDlg *iConfirmationDialog
TBool iDestroyInitDialogLater
TInt iError
CArrayFixSeg< TWlanProtectedSetupCredentialAttribute > *iIapParametersArray
TBool iInOfflineMode
CWiFiProtInitiateEasySetupDlg *iInitDialog
TBool iIsConnectionNeeded
TWlanProtectedSetupCredentialAttribute *iNetworkSettings
TWiFiProtStates iNextWiFiProtState
RNotifier iNotifier
TWiFiProtOutstandingRequest iORequest
TPckgBuf< TBool >iOfflineReply
TBuf< KMaxPINLength >iPIN
CWiFiProtDlgsPlugin *iParent
CWiFiProtEnterPinDlg *iPinDlg
TBool iPinQueryActive
WiFiProt::TWiFiReturn iReturn
CWlanScanInfo *iScanInfo
TInt iSelectedNetworkIndex
TWlanSsid iSsid
TBool iSyncMode
TUint32 iTempIapId
TUint32 iTempServId
RArray< TUint32 > *iUids
TBool iUsePin
TBool iUserCancelled
CActiveSchedulerWait iWait
CAknWaitDialog *iWaitDlg
TBool iWaitDlgCancelled
TBool iWaitNoteNeeded
CWlanMgmtClient *iWlanMgmtEngine
Inherited Attributes
CActive::iStatus

Constructor & Destructor Documentation

CWiFiProtActiveRunner(CWiFiProtDlgsPlugin *, TInt)

CWiFiProtActiveRunner(CWiFiProtDlgsPlugin *aParent,
TIntaPriority
)[private]

Constructor

Parameters

CWiFiProtDlgsPlugin * aParentParent object
TInt aPriorityActive object priority

~CWiFiProtActiveRunner()

~CWiFiProtActiveRunner()

Destructor

Member Functions Documentation

CancelByClient()

voidCancelByClient()

When the process is cancelled by the client rather than cancelled by the user, some things are taken care of a bit differently.

CancelOngoingRequest()

voidCancelOngoingRequest()[private]

CheckNetworkAvailabilityL()

voidCheckNetworkAvailabilityL()[private]

Compares the fresh wlan networks list with the items returned by WPS. Puts the available network indexes into iAvailableNetworks

CleanupTempIapL()

voidCleanupTempIapL()[private]

ComputeChecksum(TInt)

TInt ComputeChecksum(TIntaPin)[private]

Parameters

TInt aPin

ConfigureL()

voidConfigureL()[private]

Called from RunL in EWiFiProtConfiguring state Starts configuring the connection methods

ConstructL()

voidConstructL()[private]

Second phase constructor

CreateAllIapsL()

voidCreateAllIapsL()[private]

CreateIapL(const TInt)

TUint32 CreateIapL(const TIntaIndex)[private]

Creates Connection Method using RCmManagerExt The iap parameters at the given index (in iIapParametersArray) will be used to create an iap. Then the parameters entry will be deleted from iIapParametersArray and the new iap's id will be added to iCmArray.

Parameters

const TInt aIndex

CreateTempIapL(TUint32 &)

TUint32 CreateTempIapL(TUint32 &aTempServId)[private]

Creates Temporary iap (cm) which contains parameters to be passed to wlan engine

Parameters

TUint32 & aTempServIdTemporary iap service id

DeleteTempIapL()

voidDeleteTempIapL()[private]

Deletes temporary iap

DestroyWaitDialog()

voidDestroyWaitDialog()[private]

Called from RunL in EWiFiProtConfFinished state Destroys the wait dialog as configuring is complete

DialogDismissedL(TInt)

voidDialogDismissedL(TIntaButtonId)[private]

wait note callback

Parameters

TInt aButtonId

DoCancel()

voidDoCancel()[private, virtual]

DoUsePinCodeLinkSelectedL()

voidDoUsePinCodeLinkSelectedL()[private]

Called by UsePinCodeLinkSelectedL when pin code mechanism is selected. Sets iUsePin flag and completes Active Runner (this) object

EvaluateResult()

voidEvaluateResult()[private]

Proceeds after DestroyWaitDialog or after PinQueryExitL and checks error state and continues with Wlan availability scan if needed

HandleErrorL(TInt)

TBool HandleErrorL(TIntaErrorCode)[private]

Handles the given error code by dispaying an error note

Parameters

TInt aErrorCodeerror code to handle

HandleNoErrorL()

voidHandleNoErrorL()[private]

Steps into the next state of Wi-Fi Protected Setup sequence called from RunL()

IsWepFormatHexL(TInt)

TBool IsWepFormatHexL(TIntaLength)[private]

Returns wep format, ETrue if it is in hex

Parameters

TInt aLengthWep key length

NewL(CWiFiProtDlgsPlugin *, TInt)

CWiFiProtActiveRunner *NewL(CWiFiProtDlgsPlugin *aParent,
TIntaPriority = CActive::EPriorityStandard
)[static]

Two phased constructor

Parameters

CWiFiProtDlgsPlugin * aParent
TInt aPriority = CActive::EPriorityStandardActive object priority

PinQueryExitL(TInt)

voidPinQueryExitL(TIntaResponse)[private]

From MActiveRunnerCallback called when CWifiProtEnterPinDlg is finished

Parameters

TInt aResponse

RunL()

voidRunL()[private, virtual]

RunProtectedSetup(const TInt32)

voidRunProtectedSetup(const TInt32aIap)[private]

Calls the active object that calls wlan engine's RunProtectedSetup

Parameters

const TInt32 aIap

SaveWepSecuritySettingsL(TWlanProtectedSetupCredentialAttribute, TUint32, CommsDat::CMDBSession &)

voidSaveWepSecuritySettingsL(TWlanProtectedSetupCredentialAttributeaCredentialAttribute,
TUint32aWlanServiceId,
CommsDat::CMDBSession &aDb
)[private]

Saves wep security settings from the given credential parameters

Parameters

TWlanProtectedSetupCredentialAttribute aCredentialAttributecredential parameters including wep security settings data
TUint32 aWlanServiceIdWlan service id
CommsDat::CMDBSession & aDbDatabase session needed for saving wep security settings

SelectConnectionL()

voidSelectConnectionL()[private]

SetIapDataL(const TInt, RCmConnectionMethodExt &)

TUint32 SetIapDataL(const TIntaIndex,
RCmConnectionMethodExt &aCmToSet
)[private]

Sets iap settings to a given connection method object and saves it

Parameters

const TInt aIndex
RCmConnectionMethodExt & aCmToSettarget connection method object

SetNextStateAndComplete(TWiFiProtStates, TInt)

voidSetNextStateAndComplete(TWiFiProtStatesaNextState,
TIntaError =  KErrNone
)[private]

Sets iNextWiFiProtState and completes the pending request used to step forward in the 'state machine'

Parameters

TWiFiProtStates aNextState- the state to step to
TInt aError =  KErrNone

SetWepKeyL(CWEPSecuritySettings &, TWlanWepKey &, TInt)

voidSetWepKeyL(CWEPSecuritySettings &aWepSecSettings,
TWlanWepKey &aWepKey,
TIntaKeyNumber
)[private]

Sets wep key

Parameters

CWEPSecuritySettings & aWepSecSettingsWep security settings object
TWlanWepKey & aWepKeyWep key to set
TInt aKeyNumbernumber of wep key to set

ShowEnterPinOnStationDialogL()

voidShowEnterPinOnStationDialogL()[private]

Shows the 'Enter PIN on Wireless Station' dialog

ShowFinalNoteL()

voidShowFinalNoteL()[private]

Shows 'settings configured' dialog

ShowInitialDialogL()

voidShowInitialDialogL()[private]

Shows the first dialog in the sequence

ShowInitiateEasySetupDialogL()

voidShowInitiateEasySetupDialogL()[private]

Shows the Initiate Easy Setup dialog

ShowNoWlanNetworksNoteL()

voidShowNoWlanNetworksNoteL()[private]

ShowOfflineQuery()

voidShowOfflineQuery()[private]

Shows connect in offline -notification.

ShowWaitingDialogAndProceedL()

voidShowWaitingDialogAndProceedL()[private]

Shows waiting dialog and proceeds with the process

ShowWaitingDialogL()

voidShowWaitingDialogL()[private]

Shows waiting dialog

StartProtectedSetupAsyncL(const TWlanSsid &, RArray< TUint32 > &, RCmManagerExt &)

voidStartProtectedSetupAsyncL(const TWlanSsid &aSSid,
RArray< TUint32 > &aUids,
RCmManagerExt &aCmManagerToUse
)

Starts Wi-Fi Protected Setup

Parameters

const TWlanSsid & aSSidcontains SSid of the network we want to configure
RArray< TUint32 > & aUids
RCmManagerExt & aCmManagerToUse- RCmManagerExt to use. Must pass this to avoid CmManager database locking problems

StartProtectedSetupConnL(const TWlanSsid &, TWlanProtectedSetupCredentialAttribute &, RCmManagerExt &)

voidStartProtectedSetupConnL(const TWlanSsid &aSSid,
TWlanProtectedSetupCredentialAttribute &aNetworkSettings,
RCmManagerExt &aCmManagerToUse
)

Starts Wi-Fi Protected Setup in Connection creation mode

Parameters

const TWlanSsid & aSSidcontains SSid of the network we want to configure
TWlanProtectedSetupCredentialAttribute & aNetworkSettingsthe configured network's settings to be returned
RCmManagerExt & aCmManagerToUse- RCmManagerExt to use. Must pass this to avoid CmManager database locking problems

StartProtectedSetupL(const TWlanSsid &, RArray< TUint32 > &, RCmManagerExt &)

WiFiProt::TWiFiReturn StartProtectedSetupL(const TWlanSsid &aSSid,
RArray< TUint32 > &aUids,
RCmManagerExt &aCmManagerToUse
)

Starts Wi-Fi Protected Setup using CActiveSchedulerWait block

Parameters

const TWlanSsid & aSSidcontains SSid of the network we want to configure
RArray< TUint32 > & aUids
RCmManagerExt & aCmManagerToUse- RCmManagerExt to use. Must pass this to avoid CmManager database locking problems

StartWlanScan()

voidStartWlanScan()[private]

Starts wlan scan

UsePinCodeLinkSelectedL(TAny *)

TInt UsePinCodeLinkSelectedL(TAny *aObject)[static]

Callback to handle pin code pin code mechanism link selection

Parameters

TAny * aObject

Member Enumerations Documentation

Enum TWiFiProtOutstandingRequest

Enumerators

EWiFiProtReqNone = 0
EWiFiProtReqConfirmDialog
EWiFiProtReqInitDialog
EWiFiProtReqWPS
EWiFiProtReqWlanScan

Enum TWiFiProtStates

Enumerators

EWiFiProtAskConfigureAutomatically = 1
EWiFiProtInitiateEasySetup
EWifiProtOfflineQuery
EWiFiProtUsePinCode
EWiFiProtStartingWaitDlg
EWiFiProtConfiguring
EWiFiProtWlanMgmtEngineReturned
EWiFiProtCreateAllIaps
EWiFiProtConfFinished
EWiFiProtDestroyWaitNote
EWiFiProtWaitForPINQuery
EWiFiProtWlanScan
EWiFiProtSelectConnection
EWiFiProtSettingsConfNote
EWiFiProtFinished
EWiFiProtCancelled

Member Data Documentation

RArray< TInt > iAvailableNetworks

RArray< TInt >iAvailableNetworks[private]

TBool iClientCancelled

TBool iClientCancelled[private]

RPointerArray< RCmConnectionMethodExt > iCmArray

RPointerArray< RCmConnectionMethodExt >iCmArray[private]

RCmManagerExt * iCmManagerExt

RCmManagerExt *iCmManagerExt[private]

CWiFiProtConfirmationNoteDlg * iConfirmationDialog

CWiFiProtConfirmationNoteDlg *iConfirmationDialog[private]

TBool iDestroyInitDialogLater

TBool iDestroyInitDialogLater[private]

TInt iError

TInt iError[private]

CArrayFixSeg< TWlanProtectedSetupCredentialAttribute > * iIapParametersArray

CArrayFixSeg< TWlanProtectedSetupCredentialAttribute > *iIapParametersArray[private]

TBool iInOfflineMode

TBool iInOfflineMode[private]

CWiFiProtInitiateEasySetupDlg * iInitDialog

CWiFiProtInitiateEasySetupDlg *iInitDialog[private]

TBool iIsConnectionNeeded

TBool iIsConnectionNeeded[private]

TWlanProtectedSetupCredentialAttribute * iNetworkSettings

TWlanProtectedSetupCredentialAttribute *iNetworkSettings[private]

TWiFiProtStates iNextWiFiProtState

TWiFiProtStates iNextWiFiProtState[private]

RNotifier iNotifier

RNotifier iNotifier[private]

TWiFiProtOutstandingRequest iORequest

TWiFiProtOutstandingRequest iORequest[private]

TPckgBuf< TBool > iOfflineReply

TPckgBuf< TBool >iOfflineReply[private]

TBuf< KMaxPINLength > iPIN

TBuf< KMaxPINLength >iPIN[private]

CWiFiProtDlgsPlugin * iParent

CWiFiProtDlgsPlugin *iParent[private]

CWiFiProtEnterPinDlg * iPinDlg

CWiFiProtEnterPinDlg *iPinDlg[private]

TBool iPinQueryActive

TBool iPinQueryActive[private]

WiFiProt::TWiFiReturn iReturn

WiFiProt::TWiFiReturn iReturn[private]

CWlanScanInfo * iScanInfo

CWlanScanInfo *iScanInfo[private]

TInt iSelectedNetworkIndex

TInt iSelectedNetworkIndex[private]

TWlanSsid iSsid

TWlanSsid iSsid[private]

TBool iSyncMode

TBool iSyncMode[private]

TUint32 iTempIapId

TUint32 iTempIapId[private]

TUint32 iTempServId

TUint32 iTempServId[private]

RArray< TUint32 > * iUids

RArray< TUint32 > *iUids[private]

TBool iUsePin

TBool iUsePin[private]

TBool iUserCancelled

TBool iUserCancelled[private]

CActiveSchedulerWait iWait

CActiveSchedulerWait iWait[private]

CAknWaitDialog * iWaitDlg

CAknWaitDialog *iWaitDlg[private]

TBool iWaitDlgCancelled

TBool iWaitDlgCancelled[private]

TBool iWaitNoteNeeded

TBool iWaitNoteNeeded[private]

CWlanMgmtClient * iWlanMgmtEngine

CWlanMgmtClient *iWlanMgmtEngine[private]