eapol/eapol_framework/wapi_common/include/ec_cs_completion.h
changeset 17 8840d3e38314
equal deleted inserted replaced
2:1c7bc153c08e 17:8840d3e38314
       
     1 /*
       
     2 * ============================================================================
       
     3 *  Name        : ./accesssec/eapol/eapol_framework/wapi_common/include/ec_cs_completion.h
       
     4 *  Part of     : WAPI / WAPI       *** Info from the SWAD
       
     5 *  Description : WAPI authentication
       
     6 *  Version     : %version: 14 % << 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_COMPLETION_H_)
       
    23 #define _EC_CS_COMPLETION_H_
       
    24 
       
    25 #include "eap_am_export.h"
       
    26 #include "eap_am_types.h"
       
    27 #include "eap_variable_data.h"
       
    28 #include "eap_array_algorithms.h"
       
    29 #include "ec_cs_tlv_header.h"
       
    30 #include "ec_cs_types.h"
       
    31 
       
    32 
       
    33 /** @file */
       
    34 
       
    35 //----------------------------------------------------------------------------
       
    36 
       
    37 /**
       
    38  * This is enumeration of EC certificate store competion actions.
       
    39  */
       
    40 enum ec_cs_completion_e
       
    41 {
       
    42 	ec_cs_completion_none,                           ///< Initialization value means no action.
       
    43 	ec_cs_completion_internal_select_certificate,
       
    44 	ec_cs_completion_internal_select_certificate_with_identity,
       
    45 	ec_cs_completion_internal_complete_add_imported_certificate_file,
       
    46 	ec_cs_completion_complete_add_imported_certificate_file,
       
    47 	ec_cs_completion_query_PAC_store_password,
       
    48 	ec_cs_completion_add_imported_ca_certificate,
       
    49 	ec_cs_completion_add_imported_client_certificate,
       
    50 	ec_cs_completion_internal_create_signature_with_private_key,
       
    51 	ec_cs_completion_complete_query_certificate_list,
       
    52 	ec_cs_completion_internal_verify_signature_with_public_key,
       
    53 };
       
    54 
       
    55 //----------------------------------------------------------------------------
       
    56 
       
    57 
       
    58 /// This class defines one EC certificate store completion action.
       
    59 class EAP_EXPORT ec_cs_completion_c
       
    60 {
       
    61 private:
       
    62 	//--------------------------------------------------
       
    63 
       
    64 	/// This is pointer to the tools class. @see abs_eap_am_tools_c.
       
    65 	abs_eap_am_tools_c * const m_am_tools;
       
    66 
       
    67 	/// This variable stores the completion action.
       
    68 	ec_cs_completion_e m_completion_action;
       
    69 
       
    70 	/// This indicates whether this object was generated successfully.
       
    71 	bool m_is_valid;
       
    72 
       
    73 	/**
       
    74 	 * The set_is_valid() function sets the state of the object valid.
       
    75 	 * The creator of this object calls this function after it is initialized. 
       
    76 	 */
       
    77 	EAP_FUNC_IMPORT void set_is_valid();
       
    78 
       
    79 	//--------------------------------------------------
       
    80 protected:
       
    81 	//--------------------------------------------------
       
    82 
       
    83 	//--------------------------------------------------
       
    84 public:
       
    85 	//--------------------------------------------------
       
    86 
       
    87 	/**
       
    88 	 * Destructor does nothing special.
       
    89 	 */
       
    90 	EAP_FUNC_IMPORT virtual ~ec_cs_completion_c();
       
    91 
       
    92 	/**
       
    93 	 * Constructor initializes object.
       
    94 	 */
       
    95 	EAP_FUNC_IMPORT ec_cs_completion_c(
       
    96 		abs_eap_am_tools_c * const tools,
       
    97 		ec_cs_completion_e completion_action);
       
    98 
       
    99 	/**
       
   100 	 * Object must indicate it's validity.
       
   101 	 * If object initialization fails this function must return false.
       
   102 	 * @return This function returns the validity of this object.
       
   103 	 */
       
   104 	EAP_FUNC_IMPORT bool get_is_valid();
       
   105 
       
   106 	/**
       
   107 	 * This function sets the completion action type.
       
   108 	 */
       
   109 	EAP_FUNC_IMPORT void set_completion_action(ec_cs_completion_e completion_action);
       
   110 
       
   111 	/**
       
   112 	 * This function gets the completion action type.
       
   113 	 */
       
   114 	EAP_FUNC_IMPORT ec_cs_completion_e get_completion_action() const;
       
   115 
       
   116 	/**
       
   117 	 * This function gets the debug string of the completion action type.
       
   118 	 */
       
   119 	EAP_FUNC_IMPORT static eap_const_string get_completion_action_string(ec_cs_completion_e completion_action);
       
   120 
       
   121 	// 
       
   122 	//--------------------------------------------------
       
   123 }; // class ec_cs_completion_c
       
   124 
       
   125 
       
   126 //----------------------------------------------------------------------------
       
   127 
       
   128 #endif //#if !defined(_EC_CS_COMPLETION_H_)
       
   129 
       
   130 
       
   131 // End.