|
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 |
|
20 |
|
21 #if !defined( _EAP_AM_MUTEX_SYMBIAN_H_ ) |
|
22 #define _EAP_AM_MUTEX_SYMBIAN_H_ |
|
23 |
|
24 // INCLUDES |
|
25 #include "eap_am_types.h" |
|
26 #include "eap_variable_data.h" |
|
27 #include "eap_am_export.h" |
|
28 #include "abs_eap_am_mutex.h" |
|
29 |
|
30 // CLASS DECLARATION |
|
31 class EAP_EXPORT eap_am_mutex_symbian_c |
|
32 : public abs_eap_am_mutex_c |
|
33 , public eap_am_mutex_base_c |
|
34 { |
|
35 private: |
|
36 |
|
37 /// Object is Symbian implementation of the mutex. |
|
38 RMutex m_mutex; |
|
39 |
|
40 /// Object is Symbian implementation of the thread which is owner of the mutex. |
|
41 RThread m_owner_thread; |
|
42 |
|
43 bool m_is_valid; |
|
44 |
|
45 // On purpose unimplemented constructors. |
|
46 eap_am_mutex_symbian_c(eap_am_mutex_symbian_c &source); |
|
47 const eap_am_mutex_symbian_c & operator=(const eap_am_mutex_symbian_c& source); |
|
48 |
|
49 public: |
|
50 |
|
51 EAP_FUNC_IMPORT virtual ~eap_am_mutex_symbian_c(); |
|
52 |
|
53 EAP_FUNC_IMPORT eap_am_mutex_symbian_c(); |
|
54 |
|
55 EAP_FUNC_IMPORT eap_am_mutex_symbian_c(const eap_am_mutex_symbian_c * const owner); |
|
56 |
|
57 /// Function returns pointer to Symbian mutex. |
|
58 EAP_FUNC_IMPORT const RMutex * get_mutex() const; |
|
59 |
|
60 /// Function returns pointer to owner thread of the mutex. |
|
61 EAP_FUNC_IMPORT const RThread * get_owner_thread() const; |
|
62 |
|
63 // See comments on abs_eap_am_mutex_c. |
|
64 EAP_FUNC_IMPORT eap_status_e mutex_enter(); |
|
65 |
|
66 // See comments on abs_eap_am_mutex_c. |
|
67 EAP_FUNC_IMPORT eap_status_e mutex_leave(abs_eap_am_tools_c * const m_am_tools); |
|
68 |
|
69 // The mutex handle must be dublicated in Symbian operating system for each thread. |
|
70 // See comments on abs_eap_am_mutex_c. |
|
71 EAP_FUNC_IMPORT abs_eap_am_mutex_c * dublicate_mutex(); |
|
72 |
|
73 // This is used in debug asserts. Those will check the mutex is really reserved when critical code is entered. |
|
74 // See comments on abs_eap_am_mutex_c. |
|
75 EAP_FUNC_IMPORT bool get_is_reserved() const; |
|
76 |
|
77 // See comments on abs_eap_am_mutex_c. |
|
78 EAP_FUNC_IMPORT bool get_is_valid() const; |
|
79 |
|
80 // - - - - - - - - - - - - - - - - - - - - - - - - |
|
81 |
|
82 }; |
|
83 |
|
84 #endif //#if !defined( _EAP_AM_MUTEX_SYMBIAN_H_ ) |
|
85 |
|
86 |
|
87 |
|
88 // End of file |