24 |
24 |
25 // INCLUDES |
25 // INCLUDES |
26 #include "eap_am_types.h" |
26 #include "eap_am_types.h" |
27 #include "eap_variable_data.h" |
27 #include "eap_variable_data.h" |
28 #include "eap_am_export.h" |
28 #include "eap_am_export.h" |
|
29 // Start: added by script change_export_macros.sh. |
|
30 #if defined(EAP_NO_EXPORT_EAP_AM_SEMAPHORE_SYMBIAN_H) |
|
31 #define EAP_CLASS_VISIBILITY_EAP_AM_SEMAPHORE_SYMBIAN_H EAP_NONSHARABLE |
|
32 #define EAP_FUNC_VISIBILITY_EAP_AM_SEMAPHORE_SYMBIAN_H |
|
33 #define EAP_C_FUNC_VISIBILITY_EAP_AM_SEMAPHORE_SYMBIAN_H |
|
34 #define EAP_FUNC_EXPORT_EAP_AM_SEMAPHORE_SYMBIAN_H |
|
35 #define EAP_C_FUNC_EXPORT_EAP_AM_SEMAPHORE_SYMBIAN_H |
|
36 #elif defined(EAP_EXPORT_EAP_AM_SEMAPHORE_SYMBIAN_H) |
|
37 #define EAP_CLASS_VISIBILITY_EAP_AM_SEMAPHORE_SYMBIAN_H EAP_EXPORT |
|
38 #define EAP_FUNC_VISIBILITY_EAP_AM_SEMAPHORE_SYMBIAN_H EAP_FUNC_EXPORT |
|
39 #define EAP_C_FUNC_VISIBILITY_EAP_AM_SEMAPHORE_SYMBIAN_H EAP_C_FUNC_EXPORT |
|
40 #define EAP_FUNC_EXPORT_EAP_AM_SEMAPHORE_SYMBIAN_H EAP_FUNC_EXPORT |
|
41 #define EAP_C_FUNC_EXPORT_EAP_AM_SEMAPHORE_SYMBIAN_H EAP_C_FUNC_EXPORT |
|
42 #else |
|
43 #define EAP_CLASS_VISIBILITY_EAP_AM_SEMAPHORE_SYMBIAN_H EAP_IMPORT |
|
44 #define EAP_FUNC_VISIBILITY_EAP_AM_SEMAPHORE_SYMBIAN_H EAP_FUNC_IMPORT |
|
45 #define EAP_C_FUNC_VISIBILITY_EAP_AM_SEMAPHORE_SYMBIAN_H EAP_C_FUNC_IMPORT |
|
46 #define EAP_FUNC_EXPORT_EAP_AM_SEMAPHORE_SYMBIAN_H |
|
47 #define EAP_C_FUNC_EXPORT_EAP_AM_SEMAPHORE_SYMBIAN_H |
|
48 #endif |
|
49 // End: added by script change_export_macros.sh. |
29 #include <abs_eap_am_semaphore.h> |
50 #include <abs_eap_am_semaphore.h> |
30 |
51 |
31 // CLASS DECLARATION |
52 // CLASS DECLARATION |
32 class EAP_EXPORT eap_am_semaphore_symbian_c |
53 class EAP_CLASS_VISIBILITY_EAP_AM_SEMAPHORE_SYMBIAN_H eap_am_semaphore_symbian_c |
33 : public abs_eap_am_semaphore_c |
54 : public abs_eap_am_semaphore_c |
34 , public eap_am_semaphore_base_c |
55 , public eap_am_semaphore_base_c |
35 { |
56 { |
36 private: |
57 private: |
37 |
58 |
49 eap_am_semaphore_symbian_c(eap_am_semaphore_symbian_c &source); |
70 eap_am_semaphore_symbian_c(eap_am_semaphore_symbian_c &source); |
50 const eap_am_semaphore_symbian_c & operator=(const eap_am_semaphore_symbian_c& source); |
71 const eap_am_semaphore_symbian_c & operator=(const eap_am_semaphore_symbian_c& source); |
51 |
72 |
52 public: |
73 public: |
53 |
74 |
54 EAP_FUNC_IMPORT virtual ~eap_am_semaphore_symbian_c(); |
75 EAP_FUNC_VISIBILITY_EAP_AM_SEMAPHORE_SYMBIAN_H virtual ~eap_am_semaphore_symbian_c(); |
55 |
76 |
56 EAP_FUNC_IMPORT eap_am_semaphore_symbian_c( const i32_t initial_count,const i32_t maximum_count); |
77 EAP_FUNC_VISIBILITY_EAP_AM_SEMAPHORE_SYMBIAN_H eap_am_semaphore_symbian_c( const i32_t initial_count,const i32_t maximum_count); |
57 |
78 |
58 EAP_FUNC_IMPORT eap_am_semaphore_symbian_c(const eap_am_semaphore_symbian_c * const owner); |
79 EAP_FUNC_VISIBILITY_EAP_AM_SEMAPHORE_SYMBIAN_H eap_am_semaphore_symbian_c(const eap_am_semaphore_symbian_c * const owner); |
59 |
80 |
60 /// Function returns pointer to Symbian semaphore. |
81 /// Function returns pointer to Symbian semaphore. |
61 EAP_FUNC_IMPORT const RSemaphore * get_semaphore() const; |
82 EAP_FUNC_VISIBILITY_EAP_AM_SEMAPHORE_SYMBIAN_H const RSemaphore * get_semaphore() const; |
62 |
83 |
63 /// Function returns pointer to owner thread of the semaphore. |
84 /// Function returns pointer to owner thread of the semaphore. |
64 EAP_FUNC_IMPORT const RThread * get_owner_thread() const; |
85 EAP_FUNC_VISIBILITY_EAP_AM_SEMAPHORE_SYMBIAN_H const RThread * get_owner_thread() const; |
65 |
86 |
66 |
87 |
67 // - - - - - - - - - - - - - - - - - - - - - - - - |
88 // - - - - - - - - - - - - - - - - - - - - - - - - |
68 // From abs_eap_am_semaphore_c |
89 // From abs_eap_am_semaphore_c |
69 |
90 |
70 /** |
91 /** |
71 * This function reserves the semaphore. Thread will block until the semaphore is released |
92 * This function reserves the semaphore. Thread will block until the semaphore is released |
72 * by other owner of the semaphore. |
93 * by other owner of the semaphore. |
73 */ |
94 */ |
74 EAP_FUNC_IMPORT eap_status_e semaphore_reserve(); |
95 EAP_FUNC_VISIBILITY_EAP_AM_SEMAPHORE_SYMBIAN_H eap_status_e semaphore_reserve(); |
75 |
96 |
76 /** |
97 /** |
77 * This function releases the semaphore. Other blocking thread will continue execution. |
98 * This function releases the semaphore. Other blocking thread will continue execution. |
78 */ |
99 */ |
79 EAP_FUNC_IMPORT eap_status_e semaphore_release(); |
100 EAP_FUNC_VISIBILITY_EAP_AM_SEMAPHORE_SYMBIAN_H eap_status_e semaphore_release(); |
80 |
101 |
81 /** |
102 /** |
82 * The semaphore handle must be dublicated in Symbian operating system for each thread. |
103 * The semaphore handle must be dublicated in Symbian operating system for each thread. |
83 */ |
104 */ |
84 EAP_FUNC_IMPORT abs_eap_am_semaphore_c * dublicate_semaphore(); |
105 EAP_FUNC_VISIBILITY_EAP_AM_SEMAPHORE_SYMBIAN_H abs_eap_am_semaphore_c * dublicate_semaphore(); |
85 |
106 |
86 EAP_FUNC_IMPORT u32_t get_count() const; |
107 EAP_FUNC_VISIBILITY_EAP_AM_SEMAPHORE_SYMBIAN_H u32_t get_count() const; |
87 |
108 |
88 /** |
109 /** |
89 * Returns the validity of the semaphore. |
110 * Returns the validity of the semaphore. |
90 */ |
111 */ |
91 EAP_FUNC_IMPORT bool get_is_valid() const; |
112 EAP_FUNC_VISIBILITY_EAP_AM_SEMAPHORE_SYMBIAN_H bool get_is_valid() const; |
92 |
113 |
93 // - - - - - - - - - - - - - - - - - - - - - - - - |
114 // - - - - - - - - - - - - - - - - - - - - - - - - |
94 }; |
115 }; |
95 |
116 |
96 #endif //#if !defined( _EAP_AM_SEMAPHORE_SYMBIAN_H_ ) |
117 #endif //#if !defined( _EAP_AM_SEMAPHORE_SYMBIAN_H_ ) |