1 /* 2 * B-tree node 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_BTREE_NODE_RECORD_H ) 23 #define _LIBFSHFS_BTREE_NODE_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_btree_node_record libfshfs_btree_node_record_t; 35 36 struct libfshfs_btree_node_record 37 { 38 /* The reference to the node record data 39 */ 40 const uint8_t *data; 41 42 /* The size of the node record data 43 */ 44 uint16_t data_size; 45 46 /* The offset of the node record 47 */ 48 uint16_t offset; 49 50 /* The key value 51 */ 52 intptr_t *key_value; 53 54 /* The key value free function 55 */ 56 int (*key_value_free_function)( 57 intptr_t **key_value, 58 libcerror_error_t **error ); 59 }; 60 61 int libfshfs_btree_node_record_initialize( 62 libfshfs_btree_node_record_t **node_record, 63 libcerror_error_t **error ); 64 65 int libfshfs_btree_node_record_free( 66 libfshfs_btree_node_record_t **node_record, 67 libcerror_error_t **error ); 68 69 #if defined( __cplusplus ) 70 } 71 #endif 72 73 #endif /* !defined( _LIBFSHFS_BTREE_NODE_RECORD_H ) */ 74 75