|
1 | 1 | use std::mem;
|
2 | 2 |
|
3 | 3 | pub use self::H5G_storage_type_t::*;
|
| 4 | +pub use {H5Gcreate2 as H5Gcreate, H5Gopen2 as H5Gopen}; |
4 | 5 |
|
5 | 6 | use crate::internal_prelude::*;
|
6 | 7 |
|
7 | 8 | use crate::h5l::{H5L_type_t, H5L_SAME_LOC, H5L_TYPE_ERROR, H5L_TYPE_HARD, H5L_TYPE_SOFT};
|
| 9 | +use crate::h5o::H5O_stat_t; |
8 | 10 |
|
9 | 11 | pub const H5G_SAME_LOC: hid_t = H5L_SAME_LOC;
|
10 | 12 |
|
@@ -62,10 +64,75 @@ extern "C" {
|
62 | 64 | n: hsize_t, ginfo: *mut H5G_info_t, lapl_id: hid_t,
|
63 | 65 | ) -> herr_t;
|
64 | 66 | pub fn H5Gclose(group_id: hid_t) -> herr_t;
|
| 67 | + #[deprecated(note = "deprecated in HDF5 1.8.0, use H5Gcreate2")] |
| 68 | + pub fn H5Gcreate1(loc_id: hid_t, name: *const c_char, size_hint: size_t) -> hid_t; |
| 69 | + #[deprecated(note = "deprecated in HDF5 1.8.0, use H5Oget_comment")] |
| 70 | + pub fn H5Gget_comment( |
| 71 | + loc_id: hid_t, name: *const c_char, bufsize: size_t, buf: *mut c_char, |
| 72 | + ) -> c_int; |
| 73 | + #[deprecated(note = "deprecated in HDF5 1.8.0, use H5Lget_val")] |
| 74 | + pub fn H5Gget_linkval(loc_id: hid_t, name: *const c_char, comment: *const c_char) -> herr_t; |
| 75 | + #[deprecated(note = "deprecated in HDF5 1.8.0, use H5Gget_info")] |
| 76 | + pub fn H5Gget_num_objs(loc_id: hid_t, num_objs: *mut hsize_t) -> herr_t; |
| 77 | + #[deprecated(note = "deprecated in HDF5 1.8.0, use H5Oget_info or H5Lget_info")] |
| 78 | + pub fn H5Gget_objinfo( |
| 79 | + loc_id: hid_t, name: *const c_char, follow_link: hbool_t, statubuf: *mut H5G_stat_t, |
| 80 | + ) -> herr_t; |
| 81 | + #[deprecated(note = "deprecated in HDF5 1.8.0, use H5Lget_name_by_idx")] |
| 82 | + pub fn H5Gget_objname_by_idx( |
| 83 | + loc_id: hid_t, idx: hsize_t, name: *mut c_char, size: size_t, |
| 84 | + ) -> ssize_t; |
| 85 | + #[deprecated(note = "deprecated in HDF5 1.8.0, use H5Oget_info")] |
| 86 | + pub fn H5Gget_objtype_by_idx(loc_id: hid_t, idx: hsize_t) -> H5G_obj_t; |
| 87 | + #[deprecated(note = "deprecated in HDF5 1.8.0, use H5Lcreate_hard or H5Lcreate_soft")] |
| 88 | + pub fn H5Glink( |
| 89 | + cur_loc_id: hid_t, type_: H5G_link_t, cur_name: *const c_char, new_name: *const c_char, |
| 90 | + ) -> herr_t; |
| 91 | + #[deprecated(note = "deprecated in HDF5 1.8.0, use H5Lcreate_hard or H5Lcreate_soft")] |
| 92 | + pub fn H5Glink2( |
| 93 | + cur_loc_id: hid_t, cur_name: *const c_char, type_: H5G_link_t, new_loc_id: hid_t, |
| 94 | + new_name: *const c_char, |
| 95 | + ) -> herr_t; |
| 96 | + #[deprecated(note = "deprecated in HDF5 1.8.0, use H5Lmove")] |
| 97 | + pub fn H5Gmove(src_loc_id: hid_t, src_name: *const c_char, dst_name: *const c_char) -> herr_t; |
| 98 | + #[deprecated(note = "deprecated in HDF5 1.8.0, use H5Lmove")] |
| 99 | + pub fn H5Gmove2( |
| 100 | + src_loc_id: hid_t, src_name: *const c_char, dst_loc_id: hid_t, dst_name: *const c_char, |
| 101 | + ) -> herr_t; |
| 102 | + #[deprecated(note = "deprecated in HDF5 1.8.0, use H5Gopen2")] |
| 103 | + pub fn H5Gopen1(loc_id: hid_t, name: *const c_char) -> hid_t; |
| 104 | + #[deprecated(note = "deprecated in HDF5 1.8.0, use H5Ldelete")] |
| 105 | + pub fn H5Gunlink(loc_id: hid_t, name: *const c_char) -> herr_t; |
65 | 106 | }
|
66 | 107 |
|
67 | 108 | #[cfg(hdf5_1_10_0)]
|
68 | 109 | extern "C" {
|
69 | 110 | pub fn H5Gflush(group_id: hid_t) -> herr_t;
|
70 | 111 | pub fn H5Grefresh(group_id: hid_t) -> herr_t;
|
71 | 112 | }
|
| 113 | + |
| 114 | +#[repr(C)] |
| 115 | +#[derive(Debug, Copy, Clone)] |
| 116 | +pub enum H5G_obj_t { |
| 117 | + H5G_UNKNOwN = -1, |
| 118 | + H5G_GROUP, |
| 119 | + H5G_DATASET, |
| 120 | + H5G_TYPE, |
| 121 | + H5G_LINK, |
| 122 | + H5G_UDLINK, |
| 123 | + H5G_RESERVED_5, |
| 124 | + H5G_RESERVED_6, |
| 125 | + H5G_RESERVED_7, |
| 126 | +} |
| 127 | + |
| 128 | +#[repr(C)] |
| 129 | +#[derive(Debug, Copy, Clone)] |
| 130 | +pub struct H5G_stat_t { |
| 131 | + fileno: [c_ulong; 2], |
| 132 | + objno: [c_ulong; 2], |
| 133 | + nlink: c_uint, |
| 134 | + type_: H5G_obj_t, |
| 135 | + mtime: time_t, |
| 136 | + linklen: size_t, |
| 137 | + ohdr: H5O_stat_t, |
| 138 | +} |
0 commit comments