eapol/eapol_framework/wapi_common/include/ec_cs_tlv_message.h
changeset 18 7aac0b9e8906
parent 17 8840d3e38314
child 20 8b3129ac4c0f
equal deleted inserted replaced
17:8840d3e38314 18:7aac0b9e8906
     1 /*
       
     2 * ============================================================================
       
     3 *  Name        : ./accesssec/eapol/eapol_framework/wapi_common/include/ec_cs_tlv_message.h
       
     4 *  Part of     : WAPI / WAPI       *** Info from the SWAD
       
     5 *  Description : WAPI authentication
       
     6 *  Version     : %version: 6 % << Don't touch! Updated by Synergy at check-out.
       
     7 *
       
     8 *  Copyright © 2001-2009 Nokia.  All rights reserved.
       
     9 *  This material, including documentation and any related computer
       
    10 *  programs, is protected by copyright controlled by Nokia.  All
       
    11 *  rights are reserved.  Copying, including reproducing, storing,
       
    12 *  adapting or translating, any or all of this material requires the
       
    13 *  prior written consent of Nokia.  This material also contains
       
    14 *  confidential information which may not be disclosed to others
       
    15 *  without the prior written consent of Nokia.
       
    16 * ============================================================================
       
    17 * Template version: 4.2
       
    18 */
       
    19 
       
    20 
       
    21 
       
    22 #if !defined(_EC_CS_TLV_MESSAGE_H_)
       
    23 #define _EC_CS_TLV_MESSAGE_H_
       
    24 
       
    25 #if defined(USE_WAPI_CORE)
       
    26 
       
    27 #include "eap_tools.h"
       
    28 #include "eap_array.h"
       
    29 
       
    30 /** @file */
       
    31 
       
    32 
       
    33 //----------------------------------------------------------------------------
       
    34 
       
    35 
       
    36 /// This class defines one EC-CS-message. One EC-CS message could include many EC-CS TLV attributes.
       
    37 /**
       
    38  * This class defined one EC-CS-message.
       
    39  * Parse and analyse of EC-CS-message is asyncronous.
       
    40  * m_analyse_index tells the index of message where asyncronous
       
    41  * analyse of EC-CS-message must continue.
       
    42  * Analysed messages are skipped during the asyncronous
       
    43  * analyse of messages. Asyncronous analyse is needed
       
    44  * because of the PKI functions are asyncronous in
       
    45  * Symbian.
       
    46  */
       
    47 class EAP_EXPORT ec_cs_tlv_message_c
       
    48 {
       
    49 private:
       
    50 	//--------------------------------------------------
       
    51 
       
    52 	/// This is pointer to the tools class. @see abs_eap_am_tools_c.
       
    53 	abs_eap_am_tools_c * const m_am_tools;
       
    54 
       
    55 	/// This buffer includes copy of the whole received EC-CS-message data.
       
    56 	eap_variable_data_c m_message_data;
       
    57 
       
    58 	/// This indicates whether this object is client (true) or server (false). This is mostly for traces.
       
    59 	const bool m_is_client;
       
    60 
       
    61 	//--------------------------------------------------
       
    62 protected:
       
    63 	//--------------------------------------------------
       
    64 
       
    65 	//--------------------------------------------------
       
    66 public:
       
    67 	//--------------------------------------------------
       
    68 
       
    69 	/**
       
    70 	 * The destructor of the ec_cs_tlv_message_c class does nothing special.
       
    71 	 */
       
    72 	EAP_FUNC_IMPORT virtual ~ec_cs_tlv_message_c();
       
    73 
       
    74 	/**
       
    75 	 * The constructor of the ec_cs_tlv_message_c class simply initializes the attributes.
       
    76 	 */
       
    77 	EAP_FUNC_IMPORT ec_cs_tlv_message_c(
       
    78 		abs_eap_am_tools_c * const tools,
       
    79 		const bool is_client);
       
    80 
       
    81 	/**
       
    82 	 * This function resets this object.
       
    83 	 */
       
    84 	EAP_FUNC_IMPORT eap_status_e reset();
       
    85 
       
    86 	/**
       
    87 	 * This function copies the received EC-CS-message data.
       
    88 	 */
       
    89 	EAP_FUNC_IMPORT eap_status_e set_ec_cs_message_data(
       
    90 		eap_variable_data_c * const ec_cs_message_data);
       
    91 
       
    92 	/**
       
    93 	 * This function returns the EC-CS-message data.
       
    94 	 */
       
    95 	EAP_FUNC_IMPORT eap_variable_data_c * get_ec_cs_message_data();
       
    96 
       
    97 	/**
       
    98 	 * Function adds padding for block size if it is needed.
       
    99 	 */
       
   100 	EAP_FUNC_IMPORT eap_status_e add_padding(const u32_t block_size);
       
   101 
       
   102 	/**
       
   103 	 * Object must indicate it's validity.
       
   104 	 * If object initialization fails this function must return false.
       
   105 	 * @return This function returns the validity of this object.
       
   106 	 */
       
   107 	EAP_FUNC_IMPORT bool get_is_valid();
       
   108 	// 
       
   109 	//--------------------------------------------------
       
   110 }; // class ec_cs_tlv_message_c
       
   111 
       
   112 
       
   113 //--------------------------------------------------
       
   114 
       
   115 #endif //#if defined(USE_WAPI_CORE)
       
   116 
       
   117 #endif //#if !defined(_EC_CS_TLV_MESSAGE_H_)
       
   118 
       
   119 // End.