|
1 // Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies). |
|
2 // All rights reserved. |
|
3 // This component and the accompanying materials are made available |
|
4 // under the terms of "Eclipse Public License v1.0" |
|
5 // which accompanies this distribution, and is available |
|
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
7 // |
|
8 // Initial Contributors: |
|
9 // Nokia Corporation - initial contribution. |
|
10 // |
|
11 // Contributors: |
|
12 // |
|
13 // Description: |
|
14 // |
|
15 |
|
16 #include <networking/panuiinterfaces.h> |
|
17 |
|
18 #include "napuplinkauthorisationhelper.h" |
|
19 |
|
20 |
|
21 CNapUplinkAuthorisationHelper::CNapUplinkAuthorisationHelper(MNapUplinkAuthorisationRequester& aNapUplinkAuthorisationRequester) |
|
22 : CActive(CActive::EPriorityStandard), |
|
23 iNapUplinkAuthorisationRequester(aNapUplinkAuthorisationRequester) |
|
24 { |
|
25 CActiveScheduler::Add(this); |
|
26 } |
|
27 |
|
28 CNapUplinkAuthorisationHelper::~CNapUplinkAuthorisationHelper() |
|
29 { |
|
30 Cancel(); |
|
31 iNotifier.Close(); |
|
32 } |
|
33 |
|
34 void CNapUplinkAuthorisationHelper::PerformNapUplinkAuthorisationL() |
|
35 { |
|
36 User::LeaveIfError(iNotifier.Connect()); |
|
37 |
|
38 iNotifier.StartNotifierAndGetResponse(iStatus, KBTPanNapUplinkAuthorisationNotifierUid, iConnectionListPckg, iResultBuf); |
|
39 SetActive(); |
|
40 } |
|
41 |
|
42 |
|
43 void CNapUplinkAuthorisationHelper::RunL() |
|
44 { |
|
45 iNapUplinkAuthorisationRequester.MnuarNapUplinkAuthorisationHelperComplete(iStatus.Int(), iResultBuf()); |
|
46 } |
|
47 |
|
48 |
|
49 void CNapUplinkAuthorisationHelper::DoCancel() |
|
50 { |
|
51 // Cancel the notifier. |
|
52 iNotifier.CancelNotifier(KBTPanNapUplinkAuthorisationNotifierUid); |
|
53 iNapUplinkAuthorisationRequester.MnuarNapUplinkAuthorisationHelperComplete(KErrCancel, EDisallowNewNapConnection); |
|
54 } |
|
55 |
|
56 TPanConnectionList& CNapUplinkAuthorisationHelper::PanConnectionList() |
|
57 { |
|
58 return iConnectionListPckg(); |
|
59 } |