1 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
2  * Copyright by The HDF Group.                                               *
3  * Copyright by the Board of Trustees of the University of Illinois.         *
4  * All rights reserved.                                                      *
5  *                                                                           *
6  * This file is part of HDF5.  The full HDF5 copyright notice, including     *
7  * terms governing use, modification, and redistribution, is contained in    *
8  * the files COPYING and Copyright.html.  COPYING can be found at the root   *
9  * of the source code distribution tree; Copyright.html can be found at the  *
10  * root level of an installed copy of the electronic HDF5 document set and   *
11  * is linked from the top-level documents page.  It can also be found at     *
12  * http://hdfgroup.org/HDF5/doc/Copyright.html.  If you do not have          *
13  * access to either file, you may request a copy from help@hdfgroup.org.     *
14  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
15 
16 module hdf5.H5Apublic;
17 
18 /*
19  * This file contains public declarations for the H5A module.
20  */
21 
22 /* Public headers needed by this file */
23 import hdf5.H5public;
24 import hdf5.H5Ipublic;
25 import hdf5.H5Opublic;
26 import hdf5.H5Tpublic;
27 
28 extern(C):
29 
30 /* Information struct for attribute (for H5Aget_info/H5Aget_info_by_idx) */
31 struct H5A_info_t {
32     hbool_t             corder_valid;   /* Indicate if creation order is valid */
33     H5O_msg_crt_idx_t   corder;         /* Creation order                 */
34     H5T_cset_t          cset;           /* Character set of attribute name */
35     hsize_t             data_size;      /* Size of raw data		  */
36 }
37 
38 /* Typedef for H5Aiterate2() callbacks */
39 alias H5A_operator2_t = herr_t function(hid_t location_id/*in*/,
40     const char *attr_name/*in*/, const H5A_info_t *ainfo/*in*/, void *op_data/*in,out*/);
41 
42 version(Posix) {
43 
44 /* Public function prototypes */
45 hid_t   H5Acreate2(hid_t loc_id, const char *attr_name, hid_t type_id,
46     hid_t space_id, hid_t acpl_id, hid_t aapl_id);
47 hid_t   H5Acreate_by_name(hid_t loc_id, const char *obj_name, const char *attr_name,
48     hid_t type_id, hid_t space_id, hid_t acpl_id, hid_t aapl_id, hid_t lapl_id);
49 hid_t   H5Aopen(hid_t obj_id, const char *attr_name, hid_t aapl_id);
50 hid_t   H5Aopen_by_name(hid_t loc_id, const char *obj_name,
51     const char *attr_name, hid_t aapl_id, hid_t lapl_id);
52 hid_t   H5Aopen_by_idx(hid_t loc_id, const char *obj_name,
53     H5_index_t idx_type, H5_iter_order_t order, hsize_t n, hid_t aapl_id,
54     hid_t lapl_id);
55 herr_t  H5Awrite(hid_t attr_id, hid_t type_id, const void *buf);
56 herr_t  H5Aread(hid_t attr_id, hid_t type_id, void *buf);
57 herr_t  H5Aclose(hid_t attr_id);
58 hid_t   H5Aget_space(hid_t attr_id);
59 hid_t   H5Aget_type(hid_t attr_id);
60 hid_t   H5Aget_create_plist(hid_t attr_id);
61 ssize_t H5Aget_name(hid_t attr_id, size_t buf_size, char *buf);
62 ssize_t H5Aget_name_by_idx(hid_t loc_id, const char *obj_name,
63     H5_index_t idx_type, H5_iter_order_t order, hsize_t n,
64     char *name /*out*/, size_t size, hid_t lapl_id);
65 hsize_t H5Aget_storage_size(hid_t attr_id);
66 herr_t  H5Aget_info(hid_t attr_id, H5A_info_t *ainfo /*out*/);
67 herr_t  H5Aget_info_by_name(hid_t loc_id, const char *obj_name,
68     const char *attr_name, H5A_info_t *ainfo /*out*/, hid_t lapl_id);
69 herr_t  H5Aget_info_by_idx(hid_t loc_id, const char *obj_name,
70     H5_index_t idx_type, H5_iter_order_t order, hsize_t n,
71     H5A_info_t *ainfo /*out*/, hid_t lapl_id);
72 herr_t  H5Arename(hid_t loc_id, const char *old_name, const char *new_name);
73 herr_t  H5Arename_by_name(hid_t loc_id, const char *obj_name,
74     const char *old_attr_name, const char *new_attr_name, hid_t lapl_id);
75 herr_t  H5Aiterate2(hid_t loc_id, H5_index_t idx_type,
76     H5_iter_order_t order, hsize_t *idx, H5A_operator2_t op, void *op_data);
77 herr_t  H5Aiterate_by_name(hid_t loc_id, const char *obj_name, H5_index_t idx_type,
78     H5_iter_order_t order, hsize_t *idx, H5A_operator2_t op, void *op_data,
79     hid_t lapd_id);
80 herr_t  H5Adelete(hid_t loc_id, const char *name);
81 herr_t  H5Adelete_by_name(hid_t loc_id, const char *obj_name,
82     const char *attr_name, hid_t lapl_id);
83 herr_t  H5Adelete_by_idx(hid_t loc_id, const char *obj_name,
84     H5_index_t idx_type, H5_iter_order_t order, hsize_t n, hid_t lapl_id);
85 htri_t H5Aexists(hid_t obj_id, const char *attr_name);
86 htri_t H5Aexists_by_name(hid_t obj_id, const char *obj_name,
87     const char *attr_name, hid_t lapl_id);
88 }
89 
90 /++ DEPRECATED
91 /* Symbols defined for compatibility with previous versions of the HDF5 API.
92  *
93  * Use of these symbols is deprecated.
94  */
95 #ifndef H5_NO_DEPRECATED_SYMBOLS
96 
97 /* Macros */
98 
99 
100 /* Typedefs */
101 
102 /* Typedef for H5Aiterate1() callbacks */
103 typedef herr_t (*H5A_operator1_t)(hid_t location_id/*in*/,
104     const char *attr_name/*in*/, void *operator_data/*in,out*/);
105 
106 
107 /* Function prototypes */
108 H5_DLL hid_t   H5Acreate1(hid_t loc_id, const char *name, hid_t type_id,
109     hid_t space_id, hid_t acpl_id);
110 H5_DLL hid_t   H5Aopen_name(hid_t loc_id, const char *name);
111 H5_DLL hid_t   H5Aopen_idx(hid_t loc_id, unsigned idx);
112 H5_DLL int     H5Aget_num_attrs(hid_t loc_id);
113 H5_DLL herr_t  H5Aiterate1(hid_t loc_id, unsigned *attr_num, H5A_operator1_t op,
114     void *op_data);
115 
116 #endif /* H5_NO_DEPRECATED_SYMBOLS */
117 +/
118