26 #include "eap_tools.h" |
26 #include "eap_tools.h" |
27 #include "abs_eap_am_tools.h" |
27 #include "abs_eap_am_tools.h" |
28 #include "eap_am_tools.h" |
28 #include "eap_am_tools.h" |
29 #include "eap_variable_data.h" |
29 #include "eap_variable_data.h" |
30 #include "eap_am_export.h" |
30 #include "eap_am_export.h" |
|
31 // Start: added by script change_export_macros.sh. |
|
32 #if defined(EAP_NO_EXPORT_EAP_AM_FILE_INPUT_SYMBIAN_H) |
|
33 #define EAP_CLASS_VISIBILITY_EAP_AM_FILE_INPUT_SYMBIAN_H EAP_NONSHARABLE |
|
34 #define EAP_FUNC_VISIBILITY_EAP_AM_FILE_INPUT_SYMBIAN_H |
|
35 #define EAP_C_FUNC_VISIBILITY_EAP_AM_FILE_INPUT_SYMBIAN_H |
|
36 #define EAP_FUNC_EXPORT_EAP_AM_FILE_INPUT_SYMBIAN_H |
|
37 #define EAP_C_FUNC_EXPORT_EAP_AM_FILE_INPUT_SYMBIAN_H |
|
38 #elif defined(EAP_EXPORT_EAP_AM_FILE_INPUT_SYMBIAN_H) |
|
39 #define EAP_CLASS_VISIBILITY_EAP_AM_FILE_INPUT_SYMBIAN_H EAP_EXPORT |
|
40 #define EAP_FUNC_VISIBILITY_EAP_AM_FILE_INPUT_SYMBIAN_H EAP_FUNC_EXPORT |
|
41 #define EAP_C_FUNC_VISIBILITY_EAP_AM_FILE_INPUT_SYMBIAN_H EAP_C_FUNC_EXPORT |
|
42 #define EAP_FUNC_EXPORT_EAP_AM_FILE_INPUT_SYMBIAN_H EAP_FUNC_EXPORT |
|
43 #define EAP_C_FUNC_EXPORT_EAP_AM_FILE_INPUT_SYMBIAN_H EAP_C_FUNC_EXPORT |
|
44 #else |
|
45 #define EAP_CLASS_VISIBILITY_EAP_AM_FILE_INPUT_SYMBIAN_H EAP_IMPORT |
|
46 #define EAP_FUNC_VISIBILITY_EAP_AM_FILE_INPUT_SYMBIAN_H EAP_FUNC_IMPORT |
|
47 #define EAP_C_FUNC_VISIBILITY_EAP_AM_FILE_INPUT_SYMBIAN_H EAP_C_FUNC_IMPORT |
|
48 #define EAP_FUNC_EXPORT_EAP_AM_FILE_INPUT_SYMBIAN_H |
|
49 #define EAP_C_FUNC_EXPORT_EAP_AM_FILE_INPUT_SYMBIAN_H |
|
50 #endif |
|
51 // End: added by script change_export_macros.sh. |
31 #include "abs_eap_am_file_input.h" |
52 #include "abs_eap_am_file_input.h" |
32 #include <f32file.h> |
53 #include <f32file.h> |
33 |
54 |
34 //-------------------------------------------------- |
55 //-------------------------------------------------- |
35 |
56 |
36 const u32_t EAP_AM_FILE_INPUT_BUFFER_SIZE = 1024; |
57 const u32_t EAP_AM_FILE_INPUT_BUFFER_SIZE = 1024; |
37 |
58 |
38 /// This is interface to EAP file input. |
59 /// This is interface to EAP file input. |
39 /** The EAP file input is used in configuration file read operations. |
60 /** The EAP file input is used in configuration file read operations. |
40 */ |
61 */ |
41 class EAP_EXPORT eap_am_file_input_symbian_c |
62 class EAP_CLASS_VISIBILITY_EAP_AM_FILE_INPUT_SYMBIAN_H eap_am_file_input_symbian_c |
42 : public abs_eap_am_file_input_c |
63 : public abs_eap_am_file_input_c |
43 { |
64 { |
44 |
65 |
45 private: |
66 private: |
46 |
67 |
81 public: |
102 public: |
82 |
103 |
83 /** |
104 /** |
84 * The destructor of the eap_am_file_input_symbian_c class does nothing special. |
105 * The destructor of the eap_am_file_input_symbian_c class does nothing special. |
85 */ |
106 */ |
86 EAP_FUNC_IMPORT virtual ~eap_am_file_input_symbian_c(); |
107 EAP_FUNC_VISIBILITY_EAP_AM_FILE_INPUT_SYMBIAN_H virtual ~eap_am_file_input_symbian_c(); |
87 |
108 |
88 /** |
109 /** |
89 * The constructor of the eap_am_file_input_symbian_c does nothing special. |
110 * The constructor of the eap_am_file_input_symbian_c does nothing special. |
90 */ |
111 */ |
91 EAP_FUNC_IMPORT eap_am_file_input_symbian_c( |
112 EAP_FUNC_VISIBILITY_EAP_AM_FILE_INPUT_SYMBIAN_H eap_am_file_input_symbian_c( |
92 abs_eap_am_tools_c * const tools); |
113 abs_eap_am_tools_c * const tools); |
93 |
114 |
94 /** |
115 /** |
95 * This function checks the file of name file_name exists. |
116 * This function checks the file of name file_name exists. |
96 * It returns eap_status_ok if file exists |
117 * It returns eap_status_ok if file exists |
97 * in other cases some error status. |
118 * in other cases some error status. |
98 * @param file_name is the pathname of the tested file. |
119 * @param file_name is the pathname of the tested file. |
99 */ |
120 */ |
100 EAP_FUNC_IMPORT eap_status_e file_exists( |
121 EAP_FUNC_VISIBILITY_EAP_AM_FILE_INPUT_SYMBIAN_H eap_status_e file_exists( |
101 const eap_variable_data_c * const file_name); |
122 const eap_variable_data_c * const file_name); |
102 |
123 |
103 /** |
124 /** |
104 * This function deletes the file of name if file_name exists. |
125 * This function deletes the file of name if file_name exists. |
105 * It returns eap_status_ok if file did exist and it was deleted |
126 * It returns eap_status_ok if file did exist and it was deleted |
106 * in other cases some error status. |
127 * in other cases some error status. |
107 * @param file_nameis the pathname of the deleted file. |
128 * @param file_nameis the pathname of the deleted file. |
108 */ |
129 */ |
109 EAP_FUNC_IMPORT eap_status_e file_delete( |
130 EAP_FUNC_VISIBILITY_EAP_AM_FILE_INPUT_SYMBIAN_H eap_status_e file_delete( |
110 const eap_variable_data_c * const file_name); |
131 const eap_variable_data_c * const file_name); |
111 |
132 |
112 /** |
133 /** |
113 * This function copies the file source_file_name to file target_file_name. |
134 * This function copies the file source_file_name to file target_file_name. |
114 * @param target_file_name is the pathname of the target file. |
135 * @param target_file_name is the pathname of the target file. |
115 * @param source_file_name is the pathname of the source file. |
136 * @param source_file_name is the pathname of the source file. |
116 */ |
137 */ |
117 EAP_FUNC_IMPORT eap_status_e file_copy( |
138 EAP_FUNC_VISIBILITY_EAP_AM_FILE_INPUT_SYMBIAN_H eap_status_e file_copy( |
118 const eap_variable_data_c * const target_file_name, |
139 const eap_variable_data_c * const target_file_name, |
119 const eap_variable_data_c * const source_file_name); |
140 const eap_variable_data_c * const source_file_name); |
120 |
141 |
121 /** |
142 /** |
122 * This function opens file of name file_name. |
143 * This function opens file of name file_name. |
123 * @param file_name is the pathname of the opened file. |
144 * @param file_name is the pathname of the opened file. |
124 * @param dir is the I/O direction (eap_file_io_direction_read or eap_file_io_direction_write). |
145 * @param dir is the I/O direction (eap_file_io_direction_read or eap_file_io_direction_write). |
125 */ |
146 */ |
126 EAP_FUNC_IMPORT eap_status_e file_open( |
147 EAP_FUNC_VISIBILITY_EAP_AM_FILE_INPUT_SYMBIAN_H eap_status_e file_open( |
127 const eap_variable_data_c * const file_name, |
148 const eap_variable_data_c * const file_name, |
128 const eap_file_io_direction_e dir); |
149 const eap_file_io_direction_e dir); |
129 |
150 |
130 /** |
151 /** |
131 * This function closes the file. |
152 * This function closes the file. |
132 */ |
153 */ |
133 EAP_FUNC_IMPORT eap_status_e file_close(); |
154 EAP_FUNC_VISIBILITY_EAP_AM_FILE_INPUT_SYMBIAN_H eap_status_e file_close(); |
134 |
155 |
135 /** |
156 /** |
136 * This function returns size of a file. |
157 * This function returns size of a file. |
137 */ |
158 */ |
138 EAP_FUNC_IMPORT u32_t file_size(); |
159 EAP_FUNC_VISIBILITY_EAP_AM_FILE_INPUT_SYMBIAN_H u32_t file_size(); |
139 |
160 |
140 /** |
161 /** |
141 * This function reads data from file. |
162 * This function reads data from file. |
142 * Maximum size read is the buffer size. |
163 * Maximum size read is the buffer size. |
143 * @param buffer must be initialised to reguired size. |
164 * @param buffer must be initialised to reguired size. |
144 */ |
165 */ |
145 EAP_FUNC_IMPORT eap_status_e file_read(eap_variable_data_c * const buffer); |
166 EAP_FUNC_VISIBILITY_EAP_AM_FILE_INPUT_SYMBIAN_H eap_status_e file_read(eap_variable_data_c * const buffer); |
146 |
167 |
147 /** |
168 /** |
148 * This function write data to a file. |
169 * This function write data to a file. |
149 * Maximum size write is the buffer size. |
170 * Maximum size write is the buffer size. |
150 * @param buffer includes the written data. |
171 * @param buffer includes the written data. |
151 */ |
172 */ |
152 EAP_FUNC_IMPORT eap_status_e file_write(const eap_variable_data_c * const buffer); |
173 EAP_FUNC_VISIBILITY_EAP_AM_FILE_INPUT_SYMBIAN_H eap_status_e file_write(const eap_variable_data_c * const buffer); |
153 |
174 |
154 /** |
175 /** |
155 * This function reads line from file. |
176 * This function reads line from file. |
156 * @param The read line will be copied to line parameter. |
177 * @param The read line will be copied to line parameter. |
157 */ |
178 */ |
158 EAP_FUNC_IMPORT eap_status_e file_read_line(eap_variable_data_c * const line); |
179 EAP_FUNC_VISIBILITY_EAP_AM_FILE_INPUT_SYMBIAN_H eap_status_e file_read_line(eap_variable_data_c * const line); |
159 |
180 |
160 /** |
181 /** |
161 * This function reads word from file. |
182 * This function reads word from file. |
162 * @param The read word will be copied to word parameter. |
183 * @param The read word will be copied to word parameter. |
163 */ |
184 */ |
164 EAP_FUNC_IMPORT eap_status_e file_read_word(eap_variable_data_c * const word); |
185 EAP_FUNC_VISIBILITY_EAP_AM_FILE_INPUT_SYMBIAN_H eap_status_e file_read_word(eap_variable_data_c * const word); |
165 |
186 |
166 |
187 |
167 /** |
188 /** |
168 * Object must indicate it's validity. |
189 * Object must indicate it's validity. |
169 * If object initialization fails this function must return false. |
190 * If object initialization fails this function must return false. |
170 * @return This function returns the validity of this object. |
191 * @return This function returns the validity of this object. |
171 */ |
192 */ |
172 EAP_FUNC_IMPORT bool get_is_valid(); |
193 EAP_FUNC_VISIBILITY_EAP_AM_FILE_INPUT_SYMBIAN_H bool get_is_valid(); |
173 |
194 |
174 /** |
195 /** |
175 * This function opens directory of name directory_name. |
196 * This function opens directory of name directory_name. |
176 * @param file_name is the pathname of the opened directory. |
197 * @param file_name is the pathname of the opened directory. |
177 */ |
198 */ |
178 EAP_FUNC_IMPORT eap_status_e directory_open( |
199 EAP_FUNC_VISIBILITY_EAP_AM_FILE_INPUT_SYMBIAN_H eap_status_e directory_open( |
179 const eap_variable_data_c * const directory_name); |
200 const eap_variable_data_c * const directory_name); |
180 |
201 |
181 /** |
202 /** |
182 * This function reads the files and directories from open directory. |
203 * This function reads the files and directories from open directory. |
183 * @param directory_list includes the stattus of each file and directory in open directory. |
204 * @param directory_list includes the stattus of each file and directory in open directory. |
184 */ |
205 */ |
185 EAP_FUNC_IMPORT eap_status_e directory_read( |
206 EAP_FUNC_VISIBILITY_EAP_AM_FILE_INPUT_SYMBIAN_H eap_status_e directory_read( |
186 eap_array_c<abs_eap_file_stat_c> * const directory_list); |
207 eap_array_c<abs_eap_file_stat_c> * const directory_list); |
187 |
208 |
188 /** |
209 /** |
189 * This function closes the directory. |
210 * This function closes the directory. |
190 */ |
211 */ |
191 EAP_FUNC_IMPORT eap_status_e directory_close(); |
212 EAP_FUNC_VISIBILITY_EAP_AM_FILE_INPUT_SYMBIAN_H eap_status_e directory_close(); |
192 |
213 |
193 |
214 |
194 }; // class eap_am_bloom_algorithm_c |
215 }; // class eap_am_bloom_algorithm_c |
195 |
216 |
196 #endif //#if !defined(_EAP_AM_FILE_INPUT_SYMBIAN_H_) |
217 #endif //#if !defined(_EAP_AM_FILE_INPUT_SYMBIAN_H_) |