|
1 /* |
|
2 * Copyright (c) 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 * Wlan Login QtHighway Service. |
|
16 */ |
|
17 |
|
18 // System includes |
|
19 #include <QUrl> |
|
20 |
|
21 // User includes |
|
22 #include "wlanloginservice.h" |
|
23 |
|
24 #include "OstTraceDefinitions.h" |
|
25 #ifdef OST_TRACE_COMPILER_IN_USE |
|
26 #include "wlanloginserviceTraces.h" |
|
27 #endif |
|
28 |
|
29 /*! |
|
30 \class WlanLoginService |
|
31 \brief Wlan Login QtHighway service implementation. |
|
32 |
|
33 This class implements a QtHighway service that is used to launch |
|
34 Wlan login application. |
|
35 */ |
|
36 |
|
37 /*! |
|
38 Constructor. |
|
39 |
|
40 @param[in] parent Object parent. |
|
41 */ |
|
42 WlanLoginService::WlanLoginService(QObject* parent) |
|
43 : XQServiceProvider(QLatin1String("wlanlogin.com.nokia.symbian.IWlanLogin"), parent), |
|
44 mReturnValue(WlanLoginStatusNone) |
|
45 { |
|
46 OstTraceFunctionEntry0(WLANLOGINSERVICE_WLANLOGINSERVICE_ENTRY); |
|
47 |
|
48 publishAll(); |
|
49 |
|
50 OstTraceFunctionExit0(WLANLOGINSERVICE_WLANLOGINSERVICE_EXIT); |
|
51 } |
|
52 |
|
53 /*! |
|
54 Destructor. |
|
55 */ |
|
56 WlanLoginService::~WlanLoginService() |
|
57 { |
|
58 OstTraceFunctionEntry0(WLANLOGINSERVICE_DESTRUCTOR_ENTRY); |
|
59 |
|
60 OstTraceFunctionExit0(WLANLOGINSERVICE_DESTRUCTOR_EXIT); |
|
61 } |
|
62 |
|
63 /*! |
|
64 Completes the current service. |
|
65 |
|
66 @param [in] status completeing status of the service request |
|
67 */ |
|
68 void WlanLoginService::completeServiceRequest(int status) |
|
69 { |
|
70 OstTraceFunctionEntry0(WLANLOGINSERVICE_COMPLETESERVICEREQUEST_ENTRY); |
|
71 |
|
72 mReturnValue.setValue(status); |
|
73 bool ret = completeRequest(mAsyncRequestIndex, mReturnValue); |
|
74 Q_ASSERT(ret); |
|
75 |
|
76 OstTraceFunctionExit0(WLANLOGINSERVICE_COMPLETESERVICEREQUEST_EXIT); |
|
77 } |
|
78 |
|
79 /*! |
|
80 Launches Wlan Login application giving needed information. |
|
81 |
|
82 @param [in] iapId of the connection that we need to attach to |
|
83 @param [in] netId of the connection that we need to attach to |
|
84 @param [in] url redirection URL of the login page to be loaded |
|
85 |
|
86 */ |
|
87 void WlanLoginService::start(int iapId, int netId, QUrl url) |
|
88 { |
|
89 OstTraceFunctionEntry0( WLANLOGINSERVICE_START_ENTRY ); |
|
90 |
|
91 mAsyncRequestIndex = setCurrentRequestAsync(); |
|
92 emit startLogin(iapId, netId, url); |
|
93 |
|
94 OstTraceFunctionExit0(WLANLOGINSERVICE_START_EXIT); |
|
95 } |
|
96 |
|
97 /*! |
|
98 Stop launched Wlan Login application. |
|
99 */ |
|
100 void WlanLoginService::stop() |
|
101 { |
|
102 OstTraceFunctionEntry0(WLANLOGINSERVICE_STOP_ENTRY); |
|
103 |
|
104 mAsyncRequestIndex = setCurrentRequestAsync(); |
|
105 emit stopLogin(); |
|
106 |
|
107 OstTraceFunctionExit0(WLANLOGINSERVICE_STOP_EXIT); |
|
108 } |