eapol/eapol_framework/eapol_common/include/eap_automatic_variable.h
branchRCL_3
changeset 46 c74b3d9f6b9e
parent 45 bad0cc58d154
equal deleted inserted replaced
45:bad0cc58d154 46:c74b3d9f6b9e
    14 * Description:  EAP and WLAN authentication protocols.
    14 * Description:  EAP and WLAN authentication protocols.
    15 *
    15 *
    16 */
    16 */
    17 
    17 
    18 /*
    18 /*
    19 * %version: %
    19 * %version: 13.1.2 %
    20 */
    20 */
    21 
    21 
    22 #if !defined(_EAP_AUTOMATIC_VARIABLE_H_)
    22 #if !defined(_EAP_AUTOMATIC_VARIABLE_H_)
    23 #define _EAP_AUTOMATIC_VARIABLE_H_
    23 #define _EAP_AUTOMATIC_VARIABLE_H_
    24 
    24 
   242 	abs_eap_am_tools_c * const m_am_tools;
   242 	abs_eap_am_tools_c * const m_am_tools;
   243 
   243 
   244 	/// This is pointer to the string that will be traced on destructor.
   244 	/// This is pointer to the string that will be traced on destructor.
   245 	eap_format_string m_string;
   245 	eap_format_string m_string;
   246 
   246 
   247 	u32_t m_trace_flags;
       
   248 
       
   249 public:
   247 public:
   250 	
   248 	
   251 	/**
   249 	/**
   252 	 * The destructor traces the string.
   250 	 * The destructor traces the string.
   253 	 */	
   251 	 */	
   257 
   255 
   258 		if (m_string != 0)
   256 		if (m_string != 0)
   259 		{
   257 		{
   260 			EAP_TRACE_DEBUG(
   258 			EAP_TRACE_DEBUG(
   261 				m_am_tools, 
   259 				m_am_tools, 
   262 				m_trace_flags, 
   260 				TRACE_FLAGS_DEFAULT, 
   263 				(EAPL("<<< %s <<<\n"), m_string));
   261 				(EAPL("<<< %s <<<\n"), m_string));
   264 		}
   262 		}
   265 
   263 
   266 		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
   264 		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
   267 	}
   265 	}
   271 	 */	
   269 	 */	
   272 	eap_automatic_trace_string_c(
   270 	eap_automatic_trace_string_c(
   273 		abs_eap_am_tools_c * const tools,
   271 		abs_eap_am_tools_c * const tools,
   274 		eap_format_string string)
   272 		eap_format_string string)
   275 		: m_am_tools(tools)
   273 		: m_am_tools(tools)
   276 		, m_string(string)
       
   277 		, m_trace_flags(TRACE_FLAGS_DEFAULT)
       
   278 	{
       
   279 		EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
       
   280 		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
       
   281 	}
       
   282 	
       
   283 	/**
       
   284 	 * The constructor sets the values for the member variables
       
   285 	 */	
       
   286 	eap_automatic_trace_string_c(
       
   287 		abs_eap_am_tools_c * const tools,
       
   288 		const u32_t flags,
       
   289 		eap_format_string string)
       
   290 		: m_am_tools(tools)
       
   291 		, m_string(string)	
   274 		, m_string(string)	
   292 		, m_trace_flags(flags)
       
   293 	{
   275 	{
   294 		EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
   276 		EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
   295 		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
   277 		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
   296 	}
   278 	}
   297 };
   279 };