|
1 /* |
|
2 * Copyright (c) 2002-2006 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: Implementation of Active Object |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 // INCLUDE FILES |
|
21 #include <hssscan.h> |
|
22 #include <hotspotsession.h> |
|
23 |
|
24 // ============================ MEMBER FUNCTIONS =============================== |
|
25 |
|
26 // ----------------------------------------------------------------------------- |
|
27 // CHssScan |
|
28 // ----------------------------------------------------------------------------- |
|
29 CHssScan::CHssScan( CWlanMgmtClient* aWlanMgmtClient, CHotSpotSession& aCallback) : |
|
30 CActive( CActive::EPriorityStandard ), |
|
31 iCallback( aCallback ), |
|
32 iMgmtClient( aWlanMgmtClient ), |
|
33 iScanInfo( NULL ) |
|
34 { |
|
35 TRAP_IGNORE( iScanInfo = CWlanScanInfo::NewL() ); |
|
36 // Possible leave error neglected!? |
|
37 CActiveScheduler::Add( this ); |
|
38 } |
|
39 |
|
40 // ----------------------------------------------------------------------------- |
|
41 // ~CHssScan |
|
42 // ----------------------------------------------------------------------------- |
|
43 CHssScan::~CHssScan() |
|
44 { |
|
45 Cancel(); |
|
46 delete iScanInfo; |
|
47 } |
|
48 |
|
49 // ----------------------------------------------------------------------------- |
|
50 // RunL |
|
51 // ----------------------------------------------------------------------------- |
|
52 void CHssScan::RunL() |
|
53 { |
|
54 iCallback.ScanCompleteL( iStatus , *iScanInfo ); |
|
55 } |
|
56 |
|
57 // ----------------------------------------------------------------------------- |
|
58 // RunError |
|
59 // ----------------------------------------------------------------------------- |
|
60 TInt CHssScan::RunError( TInt /* aError */ ) |
|
61 { |
|
62 |
|
63 return KErrNone; |
|
64 } |
|
65 |
|
66 // ----------------------------------------------------------------------------- |
|
67 // DoCancel |
|
68 // ----------------------------------------------------------------------------- |
|
69 void CHssScan::DoCancel() |
|
70 { |
|
71 |
|
72 } |
|
73 |
|
74 // ----------------------------------------------------------------------------- |
|
75 // IssueRequest |
|
76 // ----------------------------------------------------------------------------- |
|
77 void CHssScan::IssueRequest() |
|
78 { |
|
79 iMgmtClient->GetScanResults( iStatus, *iScanInfo ); |
|
80 SetActive(); |
|
81 } |
|
82 |
|
83 |
|
84 // end of file |