// SPDX-FileCopyrightText: 2026 Filip Leonarski, Paul Scherrer Institute // SPDX-License-Identifier: GPL-3.0-only OR HDF5 // This file may be used, modified, and distributed under either GPL-3.0-only // or the HDF5 license, at the recipient's option. #ifndef H5FD_POISON_SEC2_H #define H5FD_POISON_SEC2_H #include #ifdef __cplusplus extern "C" { #endif typedef void (*H5FD_poison_sec2_cb_t)( const char *filename, const char *operation, int error_number, void *user_data ); hid_t H5FD_poison_sec2_init(void); herr_t H5Pset_fapl_poison_sec2(hid_t fapl_id); herr_t H5FD_poison_sec2_set_callback( H5FD_poison_sec2_cb_t cb, void *user_data ); herr_t H5FD_poison_sec2_begin_fail_pass(void); herr_t H5FD_poison_sec2_end_fail_pass(void); /* * Returns: * 1 if an error is available * 0 if no error has been recorded since the last begin_fail_pass() * -1 on invalid arguments * * filename and operation point to internal storage and remain valid until * the next H5FD_poison_sec2_begin_fail_pass() or recorded VFD error. */ int H5FD_poison_sec2_get_last_error( const char **filename, const char **operation, int *error_number ); #ifdef __cplusplus } #endif #endif /* H5FD_POISON_SEC2_H */