hdf5_sys/
h5pl.rs

1//! Programmatically controlling dynamically loaded plugins
2use crate::internal_prelude::*;
3
4#[cfg(feature = "1.8.15")]
5mod hdf5_1_8_15 {
6    use super::*;
7
8    #[repr(C)]
9    #[derive(Copy, Clone, PartialEq, PartialOrd, Debug)]
10    pub enum H5PL_type_t {
11        H5PL_TYPE_ERROR = -1,
12        H5PL_TYPE_FILTER = 0,
13        #[cfg(feature = "1.12.0")]
14        H5PL_VOL,
15        #[cfg(feature = "1.12.0")]
16        H5PL_TYPE_NONE,
17    }
18
19    pub use self::H5PL_type_t::*;
20
21    pub const H5PL_FILTER_PLUGIN: c_uint = 0x0001;
22    pub const H5PL_ALL_PLUGIN: c_uint = 0xffff;
23
24    extern "C" {
25        pub fn H5PLget_loading_state(plugin_flags: *mut c_int) -> herr_t;
26        pub fn H5PLset_loading_state(plugin_flags: *mut c_int) -> herr_t;
27    }
28}
29
30#[cfg(feature = "1.8.15")]
31pub use self::hdf5_1_8_15::*;
32
33#[cfg(feature = "1.10.1")]
34extern "C" {
35    pub fn H5PLappend(search_path: *const c_char) -> herr_t;
36    pub fn H5PLprepend(search_path: *const c_char) -> herr_t;
37    pub fn H5PLreplace(search_path: *const c_char, index: c_uint) -> herr_t;
38    pub fn H5PLinsert(search_path: *const c_char, index: c_uint) -> herr_t;
39    pub fn H5PLremove(index: c_uint) -> herr_t;
40    pub fn H5PLget(index: c_uint, path_buf: *mut c_char, buf_size: size_t) -> ssize_t;
41    pub fn H5PLsize(num_paths: *mut c_uint) -> herr_t;
42}