eapol/eapol_framework/eapol_symbian/eap_if/include/EapCoreInterfaceImplementation.h
branchRCL_3
changeset 18 bad0cc58d154
equal deleted inserted replaced
17:30e048a7b597 18:bad0cc58d154
       
     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: 11 %
       
    20 */
       
    21 
       
    22 #ifndef EAP_CORE_INTERFACE_IMPLEMENTATION_H_
       
    23 #define EAP_CORE_INTERFACE_IMPLEMENTATION_H_
       
    24 
       
    25 // INCLUDES
       
    26 #include <e32std.h>
       
    27 #include "EapProcessInterface.h"
       
    28 #include "REapSession.h"
       
    29 #include "SendPacketHandler.h"
       
    30 #include "EapSendInterface.h"
       
    31 #include "abs_eap_am_tools.h"
       
    32 #include "EapClientIf.h"
       
    33 
       
    34 class MEapSendInterface;
       
    35 class EapMessageBuffer;
       
    36 
       
    37 
       
    38 /**
       
    39  * Implementation for MWlanEapolInterface interface.
       
    40  *
       
    41  * @lib wlaneapolif.dll
       
    42  * @since S60 v3.2
       
    43  */
       
    44 class CEapCoreInterfaceImplementation
       
    45 : public CEapProcessInterface
       
    46 , public MSendPacketHandler
       
    47 , public EapClientIf
       
    48 {
       
    49 
       
    50 public:
       
    51 
       
    52 	// - - - - - - - - - - - - - - - - - - - - - - - - - - - -
       
    53 	// Functions from CWlanEapolClient.
       
    54 
       
    55 	/**
       
    56 	 * Static constructor.
       
    57 	 * @param aPartner Pointer to callback instance.
       
    58 	 * @return Pointer to the constructed instance.
       
    59 	 */
       
    60 	static CEapProcessInterface* NewL(MEapSendInterface * aPartner);
       
    61 
       
    62 
       
    63 	/**
       
    64 	 * Destructor.
       
    65 	 */
       
    66 	virtual ~CEapCoreInterfaceImplementation();
       
    67 
       
    68 	/**
       
    69 	 * Configure plugin implementation.
       
    70 	 *
       
    71 	 * @since S60 v3.2
       
    72 	 * @param aHeaderOffset Offset of EAP-header in packet_send.
       
    73 	 * @param aMTU Maximum transfer unit (MTU).
       
    74 	 * @param aTrailerLength Length of trailer needed by lower levels..
       
    75 	 * @return Return value is specified in interface specification.
       
    76 	 */
       
    77 	TInt Configure(
       
    78 		const TInt aHeaderOffset,
       
    79 		const TInt aMTU,
       
    80 		const TInt aTrailerLength,
       
    81 		const void * const aConfigurationData,
       
    82 		const TInt aConfigurationDataLength);
       
    83 
       
    84 	TInt SetEnv(abs_eap_am_tools_c * const tools, const u32_t MTU);
       
    85 	 
       
    86 	/**
       
    87 	 * Shutdown plugin implementation.
       
    88 	 *
       
    89 	 * @since S60 v3.2
       
    90 	 * @return Return value is specified in interface specification.
       
    91 	 */        
       
    92 	TInt Shutdown();
       
    93 
       
    94 	/**
       
    95 	 * Send data to EAPOL.
       
    96 	 *
       
    97 	 * @since S60 v3.2
       
    98 	 * @param aData Pointer to the data to be sent.
       
    99 	 * @param aLength Length of the data to be sent.
       
   100 	 * @return Return value is specified in interface specification.
       
   101 	 */
       
   102 	TInt ProcessData(
       
   103 		const void * const aData, 
       
   104 		const TInt aLength );
       
   105 
       
   106 	// - - - - - - - - - - - - - - - - - - - - - - - - - - - -
       
   107 	// Functions from MSendPacketHandler.
       
   108 
       
   109 	/// Function sends the data message to lower layer.
       
   110 	/// Data is formatted to Attribute-Value Pairs.
       
   111 	/// Look at eap_tlv_header_c and eap_tlv_message_data_c.
       
   112 	eap_status_e send_data(const TDesC8& message);
       
   113 
       
   114 
       
   115 private:
       
   116 
       
   117     /**
       
   118      * C++ default constructor.
       
   119      */
       
   120     CEapCoreInterfaceImplementation();
       
   121 
       
   122     /**
       
   123      * Symbian 2nd phase constructor.
       
   124      */
       
   125     void ConstructL(MEapSendInterface * aPartner);
       
   126 
       
   127 	/**
       
   128 	 * The get_is_valid() function returns the status of the CEapCoreInterfaceImplementation object.
       
   129 	 * @return True indicates the object is initialized.
       
   130 	 */
       
   131 	bool get_is_valid();
       
   132 	
       
   133 //	eap_status_e SendData(const void * const data, const u32_t length);
       
   134 	
       
   135 //	static TInt GetServerNameAndExe(TBuf<KMaxServerExe> * const ServerName, TBuf<KMaxServerExe> * const ServerExe);
       
   136 
       
   137 	// - - - - - - - - - - - - - - - - - - - - - - - - - - - -
       
   138 
       
   139 	MEapSendInterface * m_partner;
       
   140 
       
   141 	REapSession iSession;
       
   142 
       
   143 	bool m_is_valid;
       
   144 	
       
   145 	TUint32 iMTU;
       
   146 	
       
   147 	abs_eap_am_tools_c * iTools;
       
   148 };
       
   149 
       
   150 
       
   151 #endif // EAP_CORE_INTERFACE_IMPLEMENTATION_H_
       
   152 
       
   153 // End of file.