|
1 // Copyright (c) 2010 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 // Interface between the PDP and the connection agent dialog server. |
|
15 // |
|
16 |
|
17 /** |
|
18 @file |
|
19 @internalComponent |
|
20 */ |
|
21 |
|
22 #ifndef SYMBIAN_AUTHENTICATION_DIALOG_H |
|
23 #define SYMBIAN_AUTHENTICATION_DIALOG_H |
|
24 |
|
25 #include <e32base.h> |
|
26 #include <agentdialog.h> |
|
27 |
|
28 class MAuthenticationDialogObserver |
|
29 /** |
|
30 MAuthenticationDialogObserver |
|
31 |
|
32 Mixin observer class to be derived from by classes wishing to use CAuthenticationDialog. |
|
33 When the Authenticate function call completes the AuthenticationComplete function will |
|
34 be called on the observer. |
|
35 @internalTechnology |
|
36 */ |
|
37 { |
|
38 public: |
|
39 virtual void AuthenticationCompleteL(TInt aError) = 0; |
|
40 }; |
|
41 |
|
42 class CAuthenticationDialog : public CActive |
|
43 /** |
|
44 CAuthenticationDialog |
|
45 |
|
46 Has an RGenConAgentDialogServer class which provides the interface |
|
47 to the dialog server. |
|
48 |
|
49 @internalTechnology |
|
50 */ |
|
51 { |
|
52 public: |
|
53 static CAuthenticationDialog* NewL(TInt aPriority = CActive::EPriorityStandard); |
|
54 ~CAuthenticationDialog(); |
|
55 |
|
56 /** |
|
57 * The aIsReconnect parameter indicates to the dialog server if it is a reconnection attempt. |
|
58 * The reasoning behind providing this information is that the dialog server implementation may choose to |
|
59 * suppress the dialog if this is a reconnection and just silently return the values entered by the user |
|
60 * at the first connection attempt. Here the dafault value is False, so dialog server will prompt for |
|
61 * authentication information all the time. |
|
62 */ |
|
63 void Authenticate(MAuthenticationDialogObserver& aObserver, TDes& aUsername, TDes& aPassword, TBool aIsReconnect = EFalse); |
|
64 |
|
65 private: |
|
66 CAuthenticationDialog(TInt aPriority); |
|
67 void ConstructL(); |
|
68 |
|
69 /** From CActive */ |
|
70 virtual void DoCancel(); |
|
71 virtual void RunL(); |
|
72 |
|
73 private: |
|
74 MAuthenticationDialogObserver* iObserver; |
|
75 RGenConAgentDialogServer iDlgServ; |
|
76 }; |
|
77 |
|
78 #endif |