1 /*
2  * Catalog B-tree file thread record functions
3  *
4  * Copyright (C) 2009-2021, Joachim Metz <joachim.metz@gmail.com>
5  *
6  * Refer to AUTHORS for acknowledgements.
7  *
8  * This program is free software: you can redistribute it and/or modify
9  * it under the terms of the GNU Lesser General Public License as published by
10  * the Free Software Foundation, either version 3 of the License, or
11  * (at your option) any later version.
12  *
13  * This program is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16  * GNU General Public License for more details.
17  *
18  * You should have received a copy of the GNU Lesser General Public License
19  * along with this program.  If not, see <https://www.gnu.org/licenses/>.
20  */
21 
22 #if !defined( _LIBFSHFS_THREAD_RECORD_H )
23 #define _LIBFSHFS_THREAD_RECORD_H
24 
25 #include <common.h>
26 #include <types.h>
27 
28 #include "libfshfs_libcerror.h"
29 
30 #if defined( __cplusplus )
31 extern "C" {
32 #endif
33 
34 typedef struct libfshfs_thread_record libfshfs_thread_record_t;
35 
36 struct libfshfs_thread_record
37 {
38 	/* Identifier
39 	 */
40 	uint32_t identifier;
41 
42 	/* Parent identifier
43 	 */
44 	uint32_t parent_identifier;
45 
46 	/* Name size
47 	 */
48 	uint16_t name_size;
49 
50 	/* Name
51 	 */
52 	uint8_t *name;
53 };
54 
55 int libfshfs_thread_record_initialize(
56      libfshfs_thread_record_t **thread_record,
57      uint32_t identifier,
58      libcerror_error_t **error );
59 
60 int libfshfs_thread_record_free(
61      libfshfs_thread_record_t **thread_record,
62      libcerror_error_t **error );
63 
64 int libfshfs_thread_record_read_data(
65      libfshfs_thread_record_t *thread_record,
66      const uint8_t *data,
67      size_t data_size,
68      libcerror_error_t **error );
69 
70 #if defined( __cplusplus )
71 }
72 #endif
73 
74 #endif /* !defined( _LIBFSHFS_THREAD_RECORD_H ) */
75 
76