1 module hdf5.H5Gpublic;
2 
3 import core.stdc.time;
4 import core.sys.posix.sys.types;
5 import core.stdc.config;
6 
7 import hdf5.H5Ipublic;
8 import hdf5.H5Opublic;
9 import hdf5.H5Lpublic;
10 import hdf5.H5public;
11 
12 extern (C):
13 
14 //alias H5G_storage_type_t H5G_storage_type_t;
15 //alias H5G_info_t H5G_info_t;
16 //alias H5G_obj_t H5G_obj_t;
17 alias int function (c_long, const(char)*, void*) H5G_iterate_t;
18 //alias H5G_stat_t H5G_stat_t;
19 
20 enum H5G_storage_type_t
21 {
22     H5G_STORAGE_TYPE_UNKNOWN = -1,
23     H5G_STORAGE_TYPE_SYMBOL_TABLE = 0,
24     H5G_STORAGE_TYPE_COMPACT = 1,
25     H5G_STORAGE_TYPE_DENSE = 2
26 }
27 
28 enum H5G_obj_t
29 {
30     H5G_UNKNOWN = -1,
31     H5G_GROUP = 0,
32     H5G_DATASET = 1,
33     H5G_TYPE = 2,
34     H5G_LINK = 3,
35     H5G_UDLINK = 4,
36     H5G_RESERVED_5 = 5,
37     H5G_RESERVED_6 = 6,
38     H5G_RESERVED_7 = 7
39 }
40 
41 struct H5G_info_t
42 {
43     H5G_storage_type_t storage_type;
44     hsize_t nlinks;
45     long max_corder;
46     hbool_t mounted;
47 }
48 
49 struct H5G_stat_t
50 {
51     c_ulong[2] fileno;
52     c_ulong[2] objno;
53     uint nlink;
54     H5G_obj_t type;
55     time_t mtime;
56     size_t linklen;
57     H5O_stat_t ohdr;
58 }
59 
60 hid_t H5Gcreate2 (hid_t loc_id, const(char)* name, hid_t lcpl_id, hid_t gcpl_id, hid_t gapl_id);
61 hid_t H5Gcreate_anon (hid_t loc_id, hid_t gcpl_id, hid_t gapl_id);
62 hid_t H5Gopen2 (hid_t loc_id, const(char)* name, hid_t gapl_id);
63 hid_t H5Gget_create_plist (hid_t group_id);
64 herr_t H5Gget_info (hid_t loc_id, H5G_info_t* ginfo);
65 herr_t H5Gget_info_by_name (hid_t loc_id, const(char)* name, H5G_info_t* ginfo, hid_t lapl_id);
66 herr_t H5Gget_info_by_idx (hid_t loc_id, const(char)* group_name, H5_index_t idx_type, H5_iter_order_t order, hsize_t n, H5G_info_t* ginfo, hid_t lapl_id);
67 herr_t H5Gclose (hid_t group_id);
68 herr_t H5Gflush (hid_t group_id);
69 herr_t H5Grefresh (hid_t group_id);
70 hid_t H5Gcreate1 (hid_t loc_id, const(char)* name, size_t size_hint);
71 hid_t H5Gopen1 (hid_t loc_id, const(char)* name);
72 herr_t H5Glink (hid_t cur_loc_id, H5L_type_t type, const(char)* cur_name, const(char)* new_name);
73 herr_t H5Glink2 (hid_t cur_loc_id, const(char)* cur_name, H5L_type_t type, hid_t new_loc_id, const(char)* new_name);
74 herr_t H5Gmove (hid_t src_loc_id, const(char)* src_name, const(char)* dst_name);
75 herr_t H5Gmove2 (hid_t src_loc_id, const(char)* src_name, hid_t dst_loc_id, const(char)* dst_name);
76 herr_t H5Gunlink (hid_t loc_id, const(char)* name);
77 herr_t H5Gget_linkval (hid_t loc_id, const(char)* name, size_t size, char* buf);
78 herr_t H5Gset_comment (hid_t loc_id, const(char)* name, const(char)* comment);
79 int H5Gget_comment (hid_t loc_id, const(char)* name, size_t bufsize, char* buf);
80 herr_t H5Giterate (hid_t loc_id, const(char)* name, int* idx, H5G_iterate_t op, void* op_data);
81 herr_t H5Gget_num_objs (hid_t loc_id, hsize_t* num_objs);
82 herr_t H5Gget_objinfo (hid_t loc_id, const(char)* name, hbool_t follow_link, H5G_stat_t* statbuf);
83 ssize_t H5Gget_objname_by_idx (hid_t loc_id, hsize_t idx, char* name, size_t size);
84 H5G_obj_t H5Gget_objtype_by_idx (hid_t loc_id, hsize_t idx);