26
|
1 |
/*
|
|
2 |
* Copyright (c) 2008 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 the License "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: EAP and WLAN authentication protocols.
|
|
15 |
*
|
|
16 |
*/
|
|
17 |
|
|
18 |
/*
|
|
19 |
* %version: %
|
|
20 |
*/
|
|
21 |
|
|
22 |
#ifndef EAPTTLSPAPNOTIFIERSTRUCT_H
|
|
23 |
#define EAPTTLSPAPNOTIFIERSTRUCT_H
|
|
24 |
|
|
25 |
/**
|
|
26 |
* UID of PAP notifier to display authentication query dialog.
|
|
27 |
*/
|
|
28 |
const TUid KPapNotifierUid = { 0x200159A9 };
|
|
29 |
|
|
30 |
/**
|
|
31 |
* Maximum PAP challenge length.
|
|
32 |
*/
|
|
33 |
const TUint KMaxPapChallengeLength = 4096;
|
|
34 |
|
|
35 |
/**
|
|
36 |
* Maximum PAP user name.
|
|
37 |
*/
|
|
38 |
const TUint KMaxPapUserNameLength = 253;
|
|
39 |
|
|
40 |
/**
|
|
41 |
* Maximum PAP password length.
|
|
42 |
*/
|
|
43 |
const TUint KMaxPapPasswordLength = 128;
|
|
44 |
|
|
45 |
/**
|
|
46 |
* Data structure defines user name, password and password prompt.
|
|
47 |
*/
|
|
48 |
struct TPapUserNamePasswordInfo
|
|
49 |
{
|
|
50 |
/**
|
|
51 |
* True if password prompt is enabled, False - otherwise.
|
|
52 |
*/
|
|
53 |
TBool iPasswordPromptEnabled;
|
|
54 |
|
|
55 |
/*
|
|
56 |
* Buffer for user name.
|
|
57 |
*/
|
|
58 |
TBuf16<KMaxPapUserNameLength> iUserName;
|
|
59 |
|
|
60 |
/**
|
|
61 |
* Buffer for password.
|
|
62 |
*/
|
|
63 |
TBuf16<KMaxPapPasswordLength> iPassword;
|
|
64 |
};
|
|
65 |
|
|
66 |
/**
|
|
67 |
* Data structure used in notifier communication.
|
|
68 |
*/
|
|
69 |
struct TPapUiNotifierInfo
|
|
70 |
{
|
|
71 |
enum TPapUiNotifierState
|
|
72 |
{
|
|
73 |
EPapUiNotifierAuthQueryDialog, /* 0 */
|
|
74 |
EPapUiNotifierPapChallengeSize, /* 1 */
|
|
75 |
EPapUiNotifierPapChallengeMsgDialog, /* 2 */
|
|
76 |
EPapUiNotifierPapChallengeReplyQueryDialog, /* 3 */
|
|
77 |
// ...
|
|
78 |
EPapUiNotifierStatesNumber /* 4 */ // keep always as last element
|
|
79 |
};
|
|
80 |
|
|
81 |
/**
|
|
82 |
* State defines UI notifier logic.
|
|
83 |
*/
|
|
84 |
TPapUiNotifierState iState;
|
|
85 |
|
|
86 |
/**
|
|
87 |
* Data structure defines user name, password and password prompt.
|
|
88 |
*/
|
|
89 |
TPapUserNamePasswordInfo iUsrPwdInfo;
|
|
90 |
|
|
91 |
/**
|
|
92 |
* PAP challenge message.
|
|
93 |
*/
|
|
94 |
TUint iSrvChallengeSize;
|
|
95 |
TBuf16<KMaxPapChallengeLength> iPapChallenge;
|
|
96 |
};
|
|
97 |
|
|
98 |
/**
|
|
99 |
* Defines user action: accepting or cancelling
|
|
100 |
* authentication query dialog.
|
|
101 |
*/
|
|
102 |
enum EPapNotifierUserAction
|
|
103 |
{
|
|
104 |
EPapNotifierUserActionOk,
|
|
105 |
EPapNotifierUserActionCancel
|
|
106 |
};
|
|
107 |
|
|
108 |
#endif // EAPTTLSPAPNOTIFIERSTRUCT_H
|
|
109 |
|
|
110 |
// End of File
|