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