|
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 // This is enumeration of EAPOL source code. |
|
20 #if defined(USE_EAP_MINIMUM_RELEASE_TRACES) |
|
21 #undef EAP_FILE_NUMBER_ENUM |
|
22 #define EAP_FILE_NUMBER_ENUM 20 |
|
23 #undef EAP_FILE_NUMBER_DATE |
|
24 #define EAP_FILE_NUMBER_DATE 1127594498 |
|
25 #endif //#if defined(USE_EAP_MINIMUM_RELEASE_TRACES) |
|
26 |
|
27 |
|
28 |
|
29 #include "eap_base_type.h" |
|
30 |
|
31 |
|
32 EAP_FUNC_EXPORT eap_base_type_c::~eap_base_type_c() |
|
33 { |
|
34 EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT); |
|
35 EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT); |
|
36 } |
|
37 |
|
38 EAP_FUNC_EXPORT eap_base_type_c::eap_base_type_c( |
|
39 abs_eap_am_tools_c * const tools, |
|
40 abs_eap_base_type_c * const partner) |
|
41 : m_type_partner(partner) |
|
42 , m_am_tools(tools) |
|
43 , m_reference_count(0u) |
|
44 { |
|
45 EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT); |
|
46 EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT); |
|
47 } |
|
48 |
|
49 EAP_FUNC_EXPORT void eap_base_type_c::object_increase_reference_count() |
|
50 { |
|
51 EAP_TRACE_DEBUG(m_am_tools, TRACE_FLAGS_DEFAULT, (EAPL("REF: eap_base_type_c::object_increase_reference_count(): this 0x%08x, counter %d.\n"), |
|
52 this, m_reference_count+1)); |
|
53 ++m_reference_count; |
|
54 } |
|
55 |
|
56 EAP_FUNC_EXPORT u32_t eap_base_type_c::object_decrease_reference_count() |
|
57 { |
|
58 EAP_TRACE_DEBUG(m_am_tools, TRACE_FLAGS_DEFAULT, (EAPL("REF: eap_base_type_c::object_decrease_reference_count(): this 0x%08x, counter %d.\n"), |
|
59 this, m_reference_count)); |
|
60 if (m_reference_count > 0u) |
|
61 { |
|
62 --m_reference_count; |
|
63 } |
|
64 else if (m_reference_count == 0u) |
|
65 { |
|
66 EAP_TRACE_DEBUG(m_am_tools, TRACE_FLAGS_DEFAULT, (EAPL("ERROR: eap_base_type_c::object_decrease_reference_count(): reference count already zero (0).\n"))); |
|
67 } |
|
68 return m_reference_count; |
|
69 } |
|
70 |
|
71 EAP_FUNC_EXPORT abs_eap_base_type_c * eap_base_type_c::get_type_partner() |
|
72 { |
|
73 EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT); |
|
74 EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT); |
|
75 return m_type_partner; |
|
76 } |
|
77 |
|
78 |
|
79 //-------------------------------------------------- |
|
80 |
|
81 |
|
82 |
|
83 // End. |