1 /* |
|
2 * Copyright (c) 2009-2010 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: |
|
15 * |
|
16 */ |
|
17 |
|
18 // INCLUDE FILES |
|
19 #include <e32base.h> |
|
20 #include <ictscommon.h> |
|
21 |
|
22 #include "wlanqtutilsconntestwrapper.h" |
|
23 #include "wlanqtutilsconntestwrapper_s60_p.h" |
|
24 |
|
25 #include "OstTraceDefinitions.h" |
|
26 #ifdef OST_TRACE_COMPILER_IN_USE |
|
27 #include "wlanqtutilsconntestwrapper_s60Traces.h" |
|
28 #endif |
|
29 |
|
30 |
|
31 // =========== PRIVATE CLASS MEMBER FUNCTIONS =============== |
|
32 // |
|
33 ConnTestWrapperPrivate::ConnTestWrapperPrivate( |
|
34 ConnTestWrapper *aWrapper ) |
|
35 : q_ptr( aWrapper ), iIct( NULL ) |
|
36 { |
|
37 OstTraceFunctionEntry1( CONNTESTWRAPPERPRIVATE_CONNTESTWRAPPERPRIVATE_ENTRY, this ); |
|
38 OstTraceFunctionExit1( CONNTESTWRAPPERPRIVATE_CONNTESTWRAPPERPRIVATE_EXIT, this ); |
|
39 } |
|
40 |
|
41 ConnTestWrapperPrivate::~ConnTestWrapperPrivate() |
|
42 { |
|
43 OstTraceFunctionEntry1( CONNTESTWRAPPERPRIVATE_CONNTESTWRAPPERPRIVATEDESTR_ENTRY, this ); |
|
44 |
|
45 if ( !NULL ) |
|
46 { |
|
47 delete iIct; |
|
48 } |
|
49 |
|
50 OstTraceFunctionExit1( CONNTESTWRAPPERPRIVATE_CONNTESTWRAPPERPRIVATEDESTR_EXIT, this ); |
|
51 } |
|
52 |
|
53 void ConnTestWrapperPrivate::ConnectivityObserver( |
|
54 TIctsTestResult aResult, |
|
55 const TDesC& /*aString*/ ) |
|
56 { |
|
57 OstTraceFunctionEntry1( CONNTESTWRAPPERPRIVATE_CONNECTIVITYOBSERVER_ENTRY, this ); |
|
58 OstTrace1( |
|
59 TRACE_NORMAL, |
|
60 CONNTESTWRAPPERPRIVATE_CONNECTIVITYOBSERVER, |
|
61 "ConnTestWrapperPrivate::ConnectivityObserver;aResult=%u", aResult ); |
|
62 |
|
63 if ( aResult == EConnectionOk ) |
|
64 { |
|
65 q_ptr->connectivityTestDone( ETrue ); |
|
66 } |
|
67 else |
|
68 { |
|
69 q_ptr->connectivityTestDone( EFalse ); |
|
70 } |
|
71 |
|
72 delete iIct; |
|
73 iIct = NULL; |
|
74 |
|
75 OstTraceFunctionExit1( CONNTESTWRAPPERPRIVATE_CONNECTIVITYOBSERVER_EXIT, this ); |
|
76 } |
|
77 |
|
78 void ConnTestWrapperPrivate::startConnectivityTest( |
|
79 int aIapId, int aNetId ) |
|
80 { |
|
81 OstTraceFunctionEntry1( CONNTESTWRAPPERPRIVATE_STARTCONNECTIVITYTEST_ENTRY, this ); |
|
82 OstTraceExt2( |
|
83 TRACE_NORMAL, |
|
84 CONNTESTWRAPPERPRIVATE_STARTCONNECTIVITYTEST, |
|
85 "ConnTestWrapperPrivate::startConnectivityTest;aIapId=%d;aNetId=%d", aIapId, aNetId ); |
|
86 |
|
87 TRAPD( err, startConnectivityTestL( aIapId, aNetId ) ); |
|
88 |
|
89 // Check if startConnectivityTestL() leaved. |
|
90 if ( KErrNone != err ) |
|
91 { |
|
92 q_ptr->connectivityTestDone( EFalse ); |
|
93 } |
|
94 |
|
95 OstTraceFunctionExit1( CONNTESTWRAPPERPRIVATE_STARTCONNECTIVITYTEST_EXIT, this ); |
|
96 } |
|
97 |
|
98 void ConnTestWrapperPrivate::startConnectivityTestL( |
|
99 TInt aIapId, TInt aNetId ) |
|
100 { |
|
101 OstTraceFunctionEntry1( CONNTESTWRAPPERPRIVATE_STARTCONNECTIVITYTESTL_ENTRY, this ); |
|
102 |
|
103 iIct = CIctsClientInterface::NewL( aIapId, aNetId, *this ); |
|
104 iIct->StartL(); |
|
105 |
|
106 OstTraceFunctionExit1( CONNTESTWRAPPERPRIVATE_STARTCONNECTIVITYTESTL_EXIT, this ); |
|
107 } |
|
108 |
|
109 //end of file |
|