1libesedb(3) BSD Library Functions Manual libesedb(3)
2
4 libesedb.h — Library to support the Extensible Storage Engine (ESE) Data‐
5 base File (EDB) format
6
8 library “libesedb”
9
11 #include <libesedb.h>
12
13 Support functions
14
15 const char *
16 libesedb_get_version(void);
17
18 int
19 libesedb_get_access_flags_read();
20
21 int
22 libesedb_get_codepage(int *codepage, libesedb_error_t **error);
23
24 int
25 libesedb_set_codepage(int codepage, libesedb_error_t **error);
26
27 int
28 libesedb_check_file_signature(const char *filename, libesedb_error_t **error);
29
30 Available when compiled with wide character string support:
31
32 int
33 libesedb_check_file_signature_wide(const wchar_t *filename, libesedb_error_t **error);
34
35 Available when compiled with libbfio support:
36
37 int
38 libesedb_check_file_signature_file_io_handle(libbfio_handle_t *bfio_handle, libesedb_error_t **error);
39
40 Notify functions
41
42 void
43 libesedb_notify_set_verbose(int verbose);
44
45 int
46 libesedb_notify_set_stream(FILE *stream, libesedb_error_t **error);
47
48 int
49 libesedb_notify_stream_open(const char *filename, libesedb_error_t **error);
50
51 int
52 libesedb_notify_stream_close(libesedb_error_t **error);
53
54 Error functions
55
56 void
57 libesedb_error_free(libesedb_error_t **error);
58
59 int
60 libesedb_error_fprint(libesedb_error_t *error, FILE *stream);
61
62 int
63 libesedb_error_sprint(libesedb_error_t *error, char *string, size_t size);
64
65 int
66 libesedb_error_backtrace_fprint(libesedb_error_t *error, FILE *stream);
67
68 int
69 libesedb_error_backtrace_sprint(libesedb_error_t *error, char *string, size_t size);
70
71 File functions
72
73 int
74 libesedb_file_initialize(libesedb_file_t **file, libesedb_error_t **error);
75
76 int
77 libesedb_file_free(libesedb_file_t **file, libesedb_error_t **error);
78
79 int
80 libesedb_file_open(libesedb_file_t *file, const char *filename, int flags, libesedb_error_t **error);
81
82 int
83 libesedb_file_close(libesedb_file_t *file, libesedb_error_t **error);
84
85 int
86 libesedb_file_get_type(libesedb_file_t *file, uint32_t *type, libesedb_error_t **error);
87
88 int
89 libesedb_file_get_format_version(libesedb_file_t *file, uint32_t *format_version, uint32_t *format_revision, libesedb_error_t **error);
90
91 int
92 libesedb_file_get_creation_format_version(libesedb_file_t *file, uint32_t *format_version, uint32_t *format_revision, libesedb_error_t **error);
93
94 int
95 libesedb_file_get_page_size(libesedb_file_t *file, uint32_t *page_size, libesedb_error_t **error);
96
97 int
98 libesedb_file_get_number_of_tables(libesedb_file_t *file, int *number_of_tables, libesedb_error_t **error);
99
100 int
101 libesedb_file_get_table(libesedb_file_t *file, int table_entry, libesedb_table_t **table, libesedb_error_t **error);
102
103 int
104 libesedb_file_get_table_by_utf8_name(libesedb_file_t *file, const uint8_t *utf8_string, size_t utf8_string_length, libesedb_table_t **table, libesedb_error_t **error);
105
106 int
107 libesedb_file_get_table_by_utf16_name(libesedb_file_t *file, const uint16_t *utf16_string, size_t utf16_string_length, libesedb_table_t **table, libesedb_error_t **error);
108
109 Available when compiled with wide character string support:
110
111 int
112 libesedb_file_open_wide(libesedb_file_t *file, const wchar_t *filename, int flags, libesedb_error_t **error);
113
114 Available when compiled with libbfio support:
115
116 int
117 libesedb_file_open_file_io_handle(libesedb_file_t *file, libbfio_handle_t *file_io_handle, int flags, libesedb_error_t **error);
118
119 Table functions
120
121 int
122 libesedb_table_free(libesedb_table_t **table, libesedb_error_t **error);
123
124 int
125 libesedb_table_get_identifier(libesedb_table_t *table, uint32_t *identifier, libesedb_error_t **error);
126
127 int
128 libesedb_table_get_utf8_name_size(libesedb_table_t *table, size_t *utf8_string_size, libesedb_error_t **error);
129
130 int
131 libesedb_table_get_utf8_name(libesedb_table_t *table, uint8_t *utf8_string, size_t utf8_string_size, libesedb_error_t **error);
132
133 int
134 libesedb_table_get_utf16_name_size(libesedb_table_t *table, size_t *utf16_string_size, libesedb_error_t **error);
135
136 int
137 libesedb_table_get_utf16_name(libesedb_table_t *table, uint16_t *utf16_string, size_t utf16_string_size, libesedb_error_t **error);
138
139 int
140 libesedb_table_get_utf8_template_name_size(libesedb_table_t *table, size_t *utf8_string_size, libesedb_error_t **error);
141
142 int
143 libesedb_table_get_utf8_template_name(libesedb_table_t *table, uint8_t *utf8_string, size_t utf8_string_size, libesedb_error_t **error);
144
145 int
146 libesedb_table_get_utf16_template_name_size(libesedb_table_t *table, size_t *utf16_string_size, libesedb_error_t **error);
147
148 int
149 libesedb_table_get_utf16_template_name(libesedb_table_t *table, uint16_t *utf16_string, size_t utf16_string_size, libesedb_error_t **error);
150
151 int
152 libesedb_table_get_number_of_columns(libesedb_table_t *table, int *number_of_columns, uint8_t flags, libesedb_error_t **error);
153
154 int
155 libesedb_table_get_column(libesedb_table_t *table, int column_entry, libesedb_column_t **column, uint8_t flags, libesedb_error_t **error);
156
157 int
158 libesedb_table_get_number_of_indexes(libesedb_table_t *table, int *number_of_indexes, libesedb_error_t **error);
159
160 int
161 libesedb_table_get_index(libesedb_table_t *table, int index_entry, libesedb_index_t **index, libesedb_error_t **error);
162
163 int
164 libesedb_table_get_number_of_records(libesedb_table_t *table, int *number_of_records, libesedb_error_t **error);
165
166 int
167 libesedb_table_get_record(libesedb_table_t *table, int record_entry, libesedb_record_t **record, libesedb_error_t **error);
168
169 Column functions
170
171 int
172 libesedb_column_free(libesedb_column_t **column, libesedb_error_t **error);
173
174 int
175 libesedb_column_get_identifier(libesedb_column_t *column, uint32_t *identifier, libesedb_error_t **error);
176
177 int
178 libesedb_column_get_type(libesedb_column_t *column, uint32_t *type, libesedb_error_t **error);
179
180 int
181 libesedb_column_get_utf8_name_size(libesedb_column_t *column, size_t *utf8_string_size, libesedb_error_t **error);
182
183 int
184 libesedb_column_get_utf8_name(libesedb_column_t *column, uint8_t *utf8_string, size_t utf8_string_size, libesedb_error_t **error);
185
186 int
187 libesedb_column_get_utf16_name_size(libesedb_column_t *column, size_t *utf16_string_size, libesedb_error_t **error);
188
189 int
190 libesedb_column_get_utf16_name(libesedb_column_t *column, uint16_t *utf16_string, size_t utf16_string_size, libesedb_error_t **error);
191
192 Index functions
193
194 int
195 libesedb_index_free(libesedb_index_t **index, libesedb_error_t **error);
196
197 int
198 libesedb_index_get_identifier(libesedb_index_t *index, uint32_t *identifier, libesedb_error_t **error);
199
200 int
201 libesedb_index_get_utf8_name_size(libesedb_index_t *index, size_t *utf8_string_size, libesedb_error_t **error);
202
203 int
204 libesedb_index_get_utf8_name(libesedb_index_t *index, uint8_t *utf8_string, size_t utf8_string_size, libesedb_error_t **error);
205
206 int
207 libesedb_index_get_utf16_name_size(libesedb_index_t *index, size_t *utf16_string_size, libesedb_error_t **error);
208
209 int
210 libesedb_index_get_utf16_name(libesedb_index_t *index, uint16_t *utf16_string, size_t utf16_string_size, libesedb_error_t **error);
211
212 int
213 libesedb_index_get_number_of_records(libesedb_index_t *index, int *number_of_records, libesedb_error_t **error);
214
215 int
216 libesedb_index_get_record(libesedb_index_t *index, int record_entry, libesedb_record_t **record, libesedb_error_t **error);
217
218 Record functions
219
220 int
221 libesedb_record_free(libesedb_record_t **record, libesedb_error_t **error);
222
223 int
224 libesedb_record_get_number_of_values(libesedb_record_t *record, int *number_of_values, libesedb_error_t **error);
225
226 int
227 libesedb_record_get_column_identifier(libesedb_record_t *record, int value_entry, uint32_t *column_identifier, libesedb_error_t **error);
228
229 int
230 libesedb_record_get_column_type(libesedb_record_t *record, int value_entry, uint32_t *column_type, libesedb_error_t **error);
231
232 int
233 libesedb_record_get_utf8_column_name_size(libesedb_record_t *record, int value_entry, size_t *utf8_string_size, libesedb_error_t **error);
234
235 int
236 libesedb_record_get_utf8_column_name(libesedb_record_t *record, int value_entry, uint8_t *utf8_string, size_t utf8_string_size, libesedb_error_t **error);
237
238 int
239 libesedb_record_get_utf16_column_name_size(libesedb_record_t *record, int value_entry, size_t *utf16_string_size, libesedb_error_t **error);
240
241 int
242 libesedb_record_get_utf16_column_name(libesedb_record_t *record, int value_entry, uint16_t *utf16_string, size_t utf16_string_size, libesedb_error_t **error);
243
244 int
245 libesedb_record_get_value(libesedb_record_t *record, int value_entry, uint8_t **value_data, size_t *value_data_size, uint8_t *value_flags, libesedb_error_t **error);
246
247 int
248 libesedb_record_get_value_boolean(libesedb_record_t *record, int value_entry, uint8_t *value_boolean, libesedb_error_t **error);
249
250 int
251 libesedb_record_get_value_8bit(libesedb_record_t *record, int value_entry, uint8_t *value_8bit, libesedb_error_t **error);
252
253 int
254 libesedb_record_get_value_16bit(libesedb_record_t *record, int value_entry, uint16_t *value_16bit, libesedb_error_t **error);
255
256 int
257 libesedb_record_get_value_32bit(libesedb_record_t *record, int value_entry, uint32_t *value_32bit, libesedb_error_t **error);
258
259 int
260 libesedb_record_get_value_64bit(libesedb_record_t *record, int value_entry, uint64_t *value_64bit, libesedb_error_t **error);
261
262 int
263 libesedb_record_get_value_filetime(libesedb_record_t *record, int value_entry, uint64_t *value_filetime, libesedb_error_t **error);
264
265 int
266 libesedb_record_get_value_floating_point_32bit(libesedb_record_t *record, int value_entry, float *value_floating_point_32bit, libesedb_error_t **error);
267
268 int
269 libesedb_record_get_value_floating_point_64bit(libesedb_record_t *record, int value_entry, double *value_floating_point_64bit, libesedb_error_t **error);
270
271 int
272 libesedb_record_get_value_utf8_string_size(libesedb_record_t *record, int value_entry, size_t *utf8_string_size, libesedb_error_t **error);
273
274 int
275 libesedb_record_get_value_utf8_string(libesedb_record_t *record, int value_entry, uint8_t *utf8_string, size_t utf8_string_size, libesedb_error_t **error);
276
277 int
278 libesedb_record_get_value_utf16_string_size(libesedb_record_t *record, int value_entry, size_t *utf16_string_size, libesedb_error_t **error);
279
280 int
281 libesedb_record_get_value_utf16_string(libesedb_record_t *record, int value_entry, uint16_t *utf16_string, size_t utf16_string_size, libesedb_error_t **error);
282
283 int
284 libesedb_record_get_value_binary_data_size(libesedb_record_t *record, int value_entry, size_t *binary_data_size, libesedb_error_t **error);
285
286 int
287 libesedb_record_get_value_binary_data(libesedb_record_t *record, int value_entry, uint8_t *binary_data, size_t binary_data_size, libesedb_error_t **error);
288
289 int
290 libesedb_record_get_long_value(libesedb_record_t *record, int value_entry, libesedb_long_value_t **long_value, libesedb_error_t **error);
291
292 int
293 libesedb_record_get_multi_value(libesedb_record_t *record, int value_entry, libesedb_multi_value_t **multi_value, libesedb_error_t **error);
294
295 Long value functions
296
297 int
298 libesedb_long_value_free(libesedb_long_value_t **long_value, libesedb_error_t **error);
299
300 int
301 libesedb_long_value_get_number_of_segments(libesedb_long_value_t *long_value, int *number_of_segments, libesedb_error_t **error);
302
303 int
304 libesedb_long_value_get_segment_data(libesedb_long_value_t *long_value, int data_segment_index, uint8_t **segment_data, size_t *segment_data_size, libesedb_error_t **error);
305
306 Multi value functions
307
308 int
309 libesedb_multi_value_free(libesedb_multi_value_t **multi_value, libesedb_error_t **error);
310
311 int
312 libesedb_multi_value_get_number_of_values(libesedb_multi_value_t *multi_value, int *number_of_values, libesedb_error_t **error);
313
314 int
315 libesedb_multi_value_get_entry_value(libesedb_multi_value_t *multi_value, int value_index, uint32_t *value_type, uint8_t **value_data, size_t *value_data_size, libesedb_error_t **error);
316
317 int
318 libesedb_multi_value_get_value_32bit(libesedb_multi_value_t *multi_value, int value_index, uint32_t *value_32bit, libesedb_error_t **error);
319
320 int
321 libesedb_multi_value_get_value_64bit(libesedb_multi_value_t *multi_value, int value_index, uint64_t *value_64bit, libesedb_error_t **error);
322
323 int
324 libesedb_multi_value_get_value_filetime(libesedb_multi_value_t *multi_value, int value_index, uint64_t *value_filetime, libesedb_error_t **error);
325
326 int
327 libesedb_multi_value_get_value_utf8_string_size(libesedb_multi_value_t *multi_value, int value_index, size_t *utf8_string_size, libesedb_error_t **error);
328
329 int
330 libesedb_multi_value_get_value_utf8_string(libesedb_multi_value_t *multi_value, int value_index, uint8_t *utf8_string, size_t utf8_string_size, libesedb_error_t **error);
331
332 int
333 libesedb_multi_value_get_value_utf16_string_size(libesedb_multi_value_t *multi_value, int value_index, size_t *utf16_string_size, libesedb_error_t **error);
334
335 int
336 libesedb_multi_value_get_value_utf16_string(libesedb_multi_value_t *multi_value, int value_index, uint16_t *utf16_string, size_t utf16_string_size, libesedb_error_t **error);
337
338 int
339 libesedb_multi_value_get_value_binary_data_size(libesedb_multi_value_t *multi_value, int value_index, size_t *binary_data_size, libesedb_error_t **error);
340
341 int
342 libesedb_multi_value_get_value_binary_data(libesedb_multi_value_t *multi_value, int value_index, uint8_t *binary_data, size_t binary_data_size, libesedb_error_t **error);
343
345 The libesedb_get_version() function is used to retrieve the library ver‐
346 sion.
347
349 Most of the functions return NULL or -1 on error, dependent on the return
350 type. For the actual return values refer to libesedb.h
351
353 None
354
356 None
357
359 libesedb uses mainly UTF-8 encoded strings except for filenames, but pro‐
360 vides several UTF-16 functions.
361
362 ASCII strings in an EDB file contain an extended ASCII string using the
363 codepage of the system it was created on. The function
364 libesedb_set_ascii_codepage
365 allows to set the required codepage for reading and writing. The default
366 codepage is ASCII and replaces all extended characters to the Unicode
367 replacement character (U+fffd) when reading and the ASCII substitude
368 character (0x1a) when writing.
369
370 libesedb allows to be compiled with wide character support. To compile
371 libesedb with wide character support use ./configure
372 --enable-wide-character-type=yes or pass the definition
373 HAVE_WIDE_CHARACTER_TYPE
374 to the compiler (i.e. in case of Microsoft Visual Studio (MSVS) C++).
375
376 To have other code to determine if libesedb was compiled with wide char‐
377 acter support it defines LIBESEDB_HAVE_WIDE_CHARACTER_TYPE
378 in libesedb/features.h.
379
380 libesedb allows to be compiled with chained IO support using libbfio.
381 libesedb will automatically detect if a compatible version of libbfio is
382 available.
383
384 To have other code to determine if libesedb was compiled with libbfio
385 support it defines LIBESEDB_HAVE_BFIO
386 in libesedb/features.h.
387
388
390 Please report bugs of any kind to <jbmetz@users.sourceforge.net> or on
391 the project website: http://libesedb.sourceforge.net/
392
394 These man pages were written by Joachim Metz.
395
397 Copyright 2009-2012 Joachim Metz <jbmetz@users.sourceforge.net>.
398
400 the libesedb.h include file
401
402libesedb January 2, 2012 libesedb