1 module hdf5.H5Opublic;
2 
3 import core.stdc.time;
4 import core.sys.posix.sys.types;
5 import core.stdc.config;
6 
7 import hdf5.H5public;
8 import hdf5.H5Ipublic;
9 
10 extern (C):
11 
12 //alias H5O_type_t H5O_type_t;
13 //alias H5O_hdr_info_t H5O_hdr_info_t;
14 //alias H5O_info_t H5O_info_t;
15 alias uint H5O_msg_crt_idx_t;
16 alias int function (c_long, const(char)*, const(H5O_info_t)*, void*) H5O_iterate_t;
17 //alias H5O_mcdt_search_ret_t H5O_mcdt_search_ret_t;
18 alias H5O_mcdt_search_ret_t function (void*) H5O_mcdt_search_cb_t;
19 //alias H5O_stat_t H5O_stat_t;
20 
21 enum H5O_type_t
22 {
23     H5O_TYPE_UNKNOWN = -1,
24     H5O_TYPE_GROUP = 0,
25     H5O_TYPE_DATASET = 1,
26     H5O_TYPE_NAMED_DATATYPE = 2,
27     H5O_TYPE_NTYPES = 3
28 }
29 
30 enum H5O_mcdt_search_ret_t
31 {
32     H5O_MCDT_SEARCH_ERROR = -1,
33     H5O_MCDT_SEARCH_CONT = 0,
34     H5O_MCDT_SEARCH_STOP = 1
35 }
36 
37 struct H5O_hdr_info_t
38 {
39     uint version_;
40     uint nmesgs;
41     uint nchunks;
42     uint flags;
43     struct
44     {
45         hsize_t total;
46         hsize_t meta;
47         hsize_t mesg;
48         hsize_t free;
49     }
50     struct
51     {
52         ulong present;
53         ulong shared_;
54     }
55 }
56 
57 struct H5O_info_t
58 {
59     c_ulong fileno;
60     haddr_t addr;
61     H5O_type_t type;
62     uint rc;
63     time_t atime;
64     time_t mtime;
65     time_t ctime;
66     time_t btime;
67     hsize_t num_attrs;
68     H5O_hdr_info_t hdr;
69     struct
70     {
71         H5_ih_info_t obj;
72         H5_ih_info_t attr;
73     }
74 }
75 
76 struct H5O_stat_t
77 {
78     hsize_t size;
79     hsize_t free;
80     uint nmesgs;
81     uint nchunks;
82 }
83 
84 hid_t H5Oopen (hid_t loc_id, const(char)* name, hid_t lapl_id);
85 hid_t H5Oopen_by_addr (hid_t loc_id, haddr_t addr);
86 hid_t H5Oopen_by_idx (hid_t loc_id, const(char)* group_name, H5_index_t idx_type, H5_iter_order_t order, hsize_t n, hid_t lapl_id);
87 htri_t H5Oexists_by_name (hid_t loc_id, const(char)* name, hid_t lapl_id);
88 herr_t H5Oget_info (hid_t loc_id, H5O_info_t* oinfo);
89 herr_t H5Oget_info_by_name (hid_t loc_id, const(char)* name, H5O_info_t* oinfo, hid_t lapl_id);
90 herr_t H5Oget_info_by_idx (hid_t loc_id, const(char)* group_name, H5_index_t idx_type, H5_iter_order_t order, hsize_t n, H5O_info_t* oinfo, hid_t lapl_id);
91 herr_t H5Olink (hid_t obj_id, hid_t new_loc_id, const(char)* new_name, hid_t lcpl_id, hid_t lapl_id);
92 herr_t H5Oincr_refcount (hid_t object_id);
93 herr_t H5Odecr_refcount (hid_t object_id);
94 herr_t H5Ocopy (hid_t src_loc_id, const(char)* src_name, hid_t dst_loc_id, const(char)* dst_name, hid_t ocpypl_id, hid_t lcpl_id);
95 herr_t H5Oset_comment (hid_t obj_id, const(char)* comment);
96 herr_t H5Oset_comment_by_name (hid_t loc_id, const(char)* name, const(char)* comment, hid_t lapl_id);
97 ssize_t H5Oget_comment (hid_t obj_id, char* comment, size_t bufsize);
98 ssize_t H5Oget_comment_by_name (hid_t loc_id, const(char)* name, char* comment, size_t bufsize, hid_t lapl_id);
99 herr_t H5Ovisit (hid_t obj_id, H5_index_t idx_type, H5_iter_order_t order, H5O_iterate_t op, void* op_data);
100 herr_t H5Ovisit_by_name (hid_t loc_id, const(char)* obj_name, H5_index_t idx_type, H5_iter_order_t order, H5O_iterate_t op, void* op_data, hid_t lapl_id);
101 herr_t H5Oclose (hid_t object_id);
102 herr_t H5Oflush (hid_t obj_id);
103 herr_t H5Orefresh (hid_t oid);
104 herr_t H5Odisable_mdc_flushes (hid_t object_id);
105 herr_t H5Oenable_mdc_flushes (hid_t object_id);
106 herr_t H5Oare_mdc_flushes_disabled (hid_t object_id, hbool_t* are_disabled);