eapol/eapol_framework/eapol_symbian/am/include/EapConversion.h
branchRCL_3
changeset 46 c74b3d9f6b9e
parent 45 bad0cc58d154
child 55 9c2aa05919d9
equal deleted inserted replaced
45:bad0cc58d154 46:c74b3d9f6b9e
     1 /*
       
     2 * Copyright (c) 2001-2006 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 _EAP_CONVERSION_H_
       
    23 #define _EAP_CONVERSION_H_
       
    24 
       
    25 // INCLUDES
       
    26 #include <e32base.h>
       
    27 #include "eap_array.h"
       
    28 #include "eap_expanded_type.h"
       
    29 #include "eap_method_settings.h"
       
    30 #include "EapExpandedType.h"
       
    31 #include "EapSettings.h"
       
    32 
       
    33 // FORWARD DECLARATIONS
       
    34 
       
    35 
       
    36 // CLASS DECLARATION
       
    37 /**
       
    38 * Class that implements the conversion functions for EAP type interface.
       
    39 */
       
    40 class EAP_EXPORT CEapConversion
       
    41 {
       
    42 
       
    43 public:
       
    44 
       
    45 	EAP_FUNC_IMPORT static TInt ConvertFromTDesCToInternal(
       
    46 		abs_eap_am_tools_c * const tools,
       
    47 		const TDesC & input16,
       
    48 		eap_variable_data_c * const target8);
       
    49 
       
    50 
       
    51 	EAP_FUNC_IMPORT static TInt ConvertFromInternalToBuf16(
       
    52 		abs_eap_am_tools_c * const tools,
       
    53 		const eap_variable_data_c * const input8,
       
    54 		TDes * const target16);
       
    55 
       
    56 	EAP_FUNC_IMPORT static TInt ConvertFromBuf16ToInternal(
       
    57 		abs_eap_am_tools_c * const tools,
       
    58 		const TDes * const input16,
       
    59 		eap_variable_data_c * const target8);
       
    60 
       
    61 
       
    62 	EAP_FUNC_IMPORT static TInt ConvertEAPTypesToInternalTypes(
       
    63 		abs_eap_am_tools_c * const tools,
       
    64 		const RArray<TUint> * const EncapsulatedEAPTypes,
       
    65 		eap_array_c<eap_type_value_e> * const target);
       
    66 
       
    67 	EAP_FUNC_IMPORT static TInt ConvertInternalTypesToEAPTypes(
       
    68 		abs_eap_am_tools_c * const tools,
       
    69 		const eap_array_c<eap_type_value_e> * const source,
       
    70 		RArray<TUint> * const EncapsulatedEAPTypes);
       
    71 
       
    72 
       
    73 	EAP_FUNC_IMPORT static TInt ConvertExpandedEAPTypeToInternalType(
       
    74 		const TEapExpandedType * const EncapsulatedExpandedEAPType,
       
    75 		eap_type_value_e * const target);
       
    76 
       
    77 	EAP_FUNC_IMPORT static TInt ConvertInternalTypeToExpandedEAPType(
       
    78 		const eap_type_value_e * const source,
       
    79 		TEapExpandedType * const EncapsulatedExpandedEAPType);
       
    80 
       
    81 
       
    82 	EAP_FUNC_IMPORT static TInt ConvertExpandedEAPTypesToInternalTypes(
       
    83 		abs_eap_am_tools_c * const tools,
       
    84 		const RArray<TEapExpandedType> * const EncapsulatedExpandedEAPTypes,
       
    85 		eap_array_c<eap_type_value_e> * const target);
       
    86 
       
    87 	EAP_FUNC_IMPORT static TInt ConvertInternalTypesToExpandedEAPTypes(
       
    88 		abs_eap_am_tools_c * const tools,
       
    89 		const eap_array_c<eap_type_value_e> * const source,
       
    90 		RArray<TEapExpandedType> * const EncapsulatedExpandedEAPTypes);
       
    91 
       
    92 
       
    93 	EAP_FUNC_IMPORT static TInt ConvertInternalTypesToHBufC8(
       
    94 		abs_eap_am_tools_c * const tools,
       
    95 		const eap_array_c<eap_type_value_e> * const source,
       
    96 		HBufC8 ** const EncapsulatedExpandedEAPTypesData);
       
    97 
       
    98 	EAP_FUNC_IMPORT static TInt ConvertHBufC8ToInternalTypes(
       
    99 		abs_eap_am_tools_c * const tools,
       
   100 		const HBufC8 * const EncapsulatedExpandedEAPTypesData,
       
   101 		eap_array_c<eap_type_value_e> * const target);
       
   102 
       
   103 
       
   104 	EAP_FUNC_IMPORT static TInt ConvertCipherSuitesToInternalType(
       
   105 		abs_eap_am_tools_c * const tools,
       
   106 		const RArray<TUint> * const aCipherSuites,
       
   107 		eap_array_c<u16_t> * const internal_cipher_suites);
       
   108 
       
   109 	EAP_FUNC_IMPORT static TInt ConvertInternalTypeToCipherSuites(
       
   110 		abs_eap_am_tools_c * const tools,
       
   111 		const eap_array_c<u16_t> * const internal_cipher_suites,
       
   112 		RArray<TUint> * const aCipherSuites);
       
   113 
       
   114 
       
   115 	EAP_FUNC_IMPORT static TInt ConvertCertificatesToInternalType(
       
   116 		abs_eap_am_tools_c * const tools,
       
   117 		const RPointerArray<EapCertificateEntry> * const aCertificates,
       
   118 		eap_array_c<eap_certificate_entry_c> * const internal_certificates);
       
   119 
       
   120 	EAP_FUNC_IMPORT static TInt ConvertInternalTypeToCertificates(
       
   121 		abs_eap_am_tools_c * const tools,
       
   122 		const eap_certificate_entry_c::eap_certificate_type_e select_certificate_type,
       
   123 		const eap_array_c<eap_certificate_entry_c> * const internal_certificates,
       
   124 		RPointerArray<EapCertificateEntry> * const aCertificates);
       
   125 
       
   126 
       
   127 	EAP_FUNC_IMPORT static TInt ConvertEAPSettingsToInternalType(
       
   128 		abs_eap_am_tools_c * const tools,
       
   129 		const EAPSettings * const aSettings,
       
   130 		eap_method_settings_c * const internal_settings);
       
   131 
       
   132 	EAP_FUNC_IMPORT static TInt ConvertInternalTypeToEAPSettings(
       
   133 		abs_eap_am_tools_c * const tools,
       
   134 		const eap_method_settings_c * const internal_settings,
       
   135 		EAPSettings * const aSettings);
       
   136 
       
   137 };
       
   138 
       
   139 #endif // _EAP_CONVERSION_H_
       
   140 
       
   141 // End of file