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 ()
void CancelByClient ()
CWiFiProtActiveRunner * NewL ( CWiFiProtDlgsPlugin *, TInt )
void StartProtectedSetupAsyncL (const TWlanSsid &, RArray < TUint32 > &, RCmManagerExt &)
void StartProtectedSetupConnL (const TWlanSsid &, TWlanProtectedSetupCredentialAttribute &, RCmManagerExt &)
WiFiProt::TWiFiReturn StartProtectedSetupL (const TWlanSsid &, RArray < TUint32 > &, RCmManagerExt &)
TInt UsePinCodeLinkSelectedL ( TAny *)
Private Member Functions
CWiFiProtActiveRunner ( CWiFiProtDlgsPlugin *, TInt )
void CancelOngoingRequest ()
void CheckNetworkAvailabilityL ()
void CleanupTempIapL ()
TInt ComputeChecksum ( TInt )
void ConfigureL ()
void ConstructL ()
void CreateAllIapsL ()
TUint32 CreateIapL (const TInt )
TUint32 CreateTempIapL ( TUint32 &)
void DeleteTempIapL ()
void DestroyWaitDialog ()
void DialogDismissedL ( TInt )
void DoCancel ()
void DoUsePinCodeLinkSelectedL ()
void EvaluateResult ()
TBool HandleErrorL ( TInt )
void HandleNoErrorL ()
TBool IsWepFormatHexL ( TInt )
void PinQueryExitL ( TInt )
void RunL ()
void RunProtectedSetup (const TInt32 )
void SaveWepSecuritySettingsL ( TWlanProtectedSetupCredentialAttribute , TUint32 , CommsDat::CMDBSession &)
void SelectConnectionL ()
TUint32 SetIapDataL (const TInt , RCmConnectionMethodExt &)
void SetNextStateAndComplete ( TWiFiProtStates , TInt )
void SetWepKeyL (CWEPSecuritySettings &, TWlanWepKey &, TInt )
void ShowEnterPinOnStationDialogL ()
void ShowFinalNoteL ()
void ShowInitialDialogL ()
void ShowInitiateEasySetupDialogL ()
void ShowNoWlanNetworksNoteL ()
void ShowOfflineQuery ()
void ShowWaitingDialogAndProceedL ()
void ShowWaitingDialogL ()
void StartWlanScan ()
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
enum TWiFiProtOutstandingRequest { EWiFiProtReqNone  = 0, EWiFiProtReqConfirmDialog , EWiFiProtReqInitDialog , EWiFiProtReqWPS , EWiFiProtReqWlanScan }
enum TWiFiProtStates {
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,
TInt aPriority
) [private]

Constructor

Parameters

CWiFiProtDlgsPlugin * aParent Parent object
TInt aPriority Active object priority

~CWiFiProtActiveRunner()

~CWiFiProtActiveRunner ( )

Destructor

Member Functions Documentation

CancelByClient()

void CancelByClient ( )

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

CancelOngoingRequest()

void CancelOngoingRequest ( ) [private]

CheckNetworkAvailabilityL()

void CheckNetworkAvailabilityL ( ) [private]

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

CleanupTempIapL()

void CleanupTempIapL ( ) [private]

ComputeChecksum(TInt)

TInt ComputeChecksum ( TInt aPin ) [private]

Parameters

TInt aPin

ConfigureL()

void ConfigureL ( ) [private]

Called from RunL in EWiFiProtConfiguring state Starts configuring the connection methods

ConstructL()

void ConstructL ( ) [private]

Second phase constructor

CreateAllIapsL()

void CreateAllIapsL ( ) [private]

CreateIapL(const TInt)

TUint32 CreateIapL ( const TInt aIndex ) [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 & aTempServId Temporary iap service id

DeleteTempIapL()

void DeleteTempIapL ( ) [private]

Deletes temporary iap

DestroyWaitDialog()

void DestroyWaitDialog ( ) [private]

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

DialogDismissedL(TInt)

void DialogDismissedL ( TInt aButtonId ) [private]

wait note callback

Parameters

TInt aButtonId

DoCancel()

void DoCancel ( ) [private, virtual]

DoUsePinCodeLinkSelectedL()

void DoUsePinCodeLinkSelectedL ( ) [private]

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

EvaluateResult()

void EvaluateResult ( ) [private]

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

HandleErrorL(TInt)

TBool HandleErrorL ( TInt aErrorCode ) [private]

Handles the given error code by dispaying an error note

Parameters

TInt aErrorCode error code to handle

HandleNoErrorL()

void HandleNoErrorL ( ) [private]

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

IsWepFormatHexL(TInt)

TBool IsWepFormatHexL ( TInt aLength ) [private]

Returns wep format, ETrue if it is in hex

Parameters

TInt aLength Wep key length

NewL(CWiFiProtDlgsPlugin *, TInt)

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

Two phased constructor

Parameters

CWiFiProtDlgsPlugin * aParent
TInt aPriority = CActive::EPriorityStandard Active object priority

PinQueryExitL(TInt)

void PinQueryExitL ( TInt aResponse ) [private]

From MActiveRunnerCallback called when CWifiProtEnterPinDlg is finished

Parameters

TInt aResponse

RunL()

void RunL ( ) [private, virtual]

RunProtectedSetup(const TInt32)

void RunProtectedSetup ( const TInt32 aIap ) [private]

Calls the active object that calls wlan engine's RunProtectedSetup

Parameters

const TInt32 aIap

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

void SaveWepSecuritySettingsL ( TWlanProtectedSetupCredentialAttribute aCredentialAttribute,
TUint32 aWlanServiceId,
CommsDat::CMDBSession & aDb
) [private]

Saves wep security settings from the given credential parameters

Parameters

TWlanProtectedSetupCredentialAttribute aCredentialAttribute credential parameters including wep security settings data
TUint32 aWlanServiceId Wlan service id
CommsDat::CMDBSession & aDb Database session needed for saving wep security settings

SelectConnectionL()

void SelectConnectionL ( ) [private]

SetIapDataL(const TInt, RCmConnectionMethodExt &)

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

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

Parameters

const TInt aIndex
RCmConnectionMethodExt & aCmToSet target connection method object

SetNextStateAndComplete(TWiFiProtStates, TInt)

void SetNextStateAndComplete ( TWiFiProtStates aNextState,
TInt aError =  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)

void SetWepKeyL ( CWEPSecuritySettings & aWepSecSettings,
TWlanWepKey & aWepKey,
TInt aKeyNumber
) [private]

Sets wep key

Parameters

CWEPSecuritySettings & aWepSecSettings Wep security settings object
TWlanWepKey & aWepKey Wep key to set
TInt aKeyNumber number of wep key to set

ShowEnterPinOnStationDialogL()

void ShowEnterPinOnStationDialogL ( ) [private]

Shows the 'Enter PIN on Wireless Station' dialog

ShowFinalNoteL()

void ShowFinalNoteL ( ) [private]

Shows 'settings configured' dialog

ShowInitialDialogL()

void ShowInitialDialogL ( ) [private]

Shows the first dialog in the sequence

ShowInitiateEasySetupDialogL()

void ShowInitiateEasySetupDialogL ( ) [private]

Shows the Initiate Easy Setup dialog

ShowNoWlanNetworksNoteL()

void ShowNoWlanNetworksNoteL ( ) [private]

ShowOfflineQuery()

void ShowOfflineQuery ( ) [private]

Shows connect in offline -notification.

ShowWaitingDialogAndProceedL()

void ShowWaitingDialogAndProceedL ( ) [private]

Shows waiting dialog and proceeds with the process

ShowWaitingDialogL()

void ShowWaitingDialogL ( ) [private]

Shows waiting dialog

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

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

Starts Wi-Fi Protected Setup

Parameters

const TWlanSsid & aSSid contains 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 &)

void StartProtectedSetupConnL ( const TWlanSsid & aSSid,
TWlanProtectedSetupCredentialAttribute & aNetworkSettings,
RCmManagerExt & aCmManagerToUse
)

Starts Wi-Fi Protected Setup in Connection creation mode

Parameters

const TWlanSsid & aSSid contains SSid of the network we want to configure
TWlanProtectedSetupCredentialAttribute & aNetworkSettings the 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 & aSSid contains 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()

void StartWlanScan ( ) [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]