|
1 /* |
|
2 * Copyright (c) 2009 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 #ifndef STUB_WLANQTUTILS_H |
|
18 #define STUB_WLANQTUTILS_H |
|
19 |
|
20 #include <QObject> |
|
21 #include <QSharedPointer> |
|
22 #include <QStringList> |
|
23 #include <QTest> |
|
24 |
|
25 #include "wlanqtutilscommon.h" |
|
26 #include "wlanqtutilsap.h" |
|
27 |
|
28 class WlanQtUtilsIap; |
|
29 class WlanQtUtilsWlanIap; |
|
30 |
|
31 class WLANQTUTILITIESDLL_EXPORT WlanQtUtils : public QObject |
|
32 { |
|
33 Q_OBJECT |
|
34 friend class WlanQtUtilsContext; |
|
35 public: |
|
36 //! "None" IAP ID value (e.g. for "not found" cases) |
|
37 static const int IapIdNone = -1; |
|
38 |
|
39 public: |
|
40 WlanQtUtils(); |
|
41 |
|
42 ~WlanQtUtils(); |
|
43 |
|
44 void availableWlanAps( QList<QSharedPointer<WlanQtUtilsAp> > &wlanApList); |
|
45 |
|
46 int createIap(const WlanQtUtilsAp *wlanAp); |
|
47 |
|
48 bool updateIap(int iapId, const WlanQtUtilsAp *wlanAp); |
|
49 |
|
50 void deleteIap(int iapId); |
|
51 |
|
52 void connectIap(int iapId, bool runIct = false); |
|
53 |
|
54 int connectedWlanId(); |
|
55 |
|
56 void disconnectIap(int iapId); |
|
57 |
|
58 int activeIap(); |
|
59 |
|
60 void scanWlanAps(); |
|
61 |
|
62 void scanWlanDirect(const QString &ssid); |
|
63 |
|
64 void stopWlanScan(); |
|
65 |
|
66 signals: |
|
67 |
|
68 void wlanScanApReady(); |
|
69 |
|
70 void wlanScanDirectReady(); |
|
71 |
|
72 void wlanNetworkOpened(int iapId); |
|
73 |
|
74 void wlanNetworkClosed(int iapId, int reason); |
|
75 |
|
76 #ifdef ICT_RESULT_ENUM |
|
77 void ictResult(int iapId, WlanLoginIctsResultType result); |
|
78 #else |
|
79 void ictResult(int iapId, bool result); |
|
80 #endif |
|
81 |
|
82 private: // Return values for all methods. |
|
83 QList<QSharedPointer<WlanQtUtilsAp> > mScanWlanAps; |
|
84 QList<QSharedPointer<WlanQtUtilsAp> > mScanWlanDirect; |
|
85 QList<QSharedPointer<WlanQtUtilsAp> > *mScanResult; |
|
86 QString mScanWlanDirectSsid; |
|
87 int mCreateWlanIapReturn; |
|
88 bool mUpdateWlanIapReturn; |
|
89 |
|
90 int mWlanNetworkOpenedIapId; |
|
91 int mWlanNetworkActiveIapId; |
|
92 int mWlanNetworkClosedIapId; |
|
93 bool mWlanNetworkClosedReason; |
|
94 |
|
95 int mIctResultIapId; |
|
96 #ifdef ICT_RESULT_ENUM |
|
97 WlanLoginIctsResultType mIctResultResults; |
|
98 #else |
|
99 bool mIctResultResults; |
|
100 #endif |
|
101 bool mConnectionSuccess; |
|
102 |
|
103 QStringList mCalledMethods; |
|
104 |
|
105 WlanQtUtilsAp *mWlanAp; |
|
106 }; |
|
107 |
|
108 #endif /* WLANQTUTILS_H */ |
|
109 |
|
110 // End of File |