HDF5  1.12.0
H5FDros3.h
Go to the documentation of this file.
1 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
2  * Copyright by The HDF Group. *
3  * All rights reserved. *
4  * *
5  * This file is part of HDF5. The full HDF5 copyright notice, including *
6  * terms governing use, modification, and redistribution, is contained in *
7  * the COPYING file, which can be found at the root of the source code *
8  * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
9  * If you do not have access to either file, you may request a copy from *
10  * help@hdfgroup.org. *
11  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
12 
13 /*
14  * Read-Only S3 Virtual File Driver (VFD)
15  *
16  * Programmer: John Mainzer
17  * 2017-10-10
18  *
19  * Purpose: The public header file for the ros3 driver.
20  */
21 #ifndef H5FDros3_H
22 #define H5FDros3_H
23 
24 #ifdef H5_HAVE_ROS3_VFD
25 #define H5FD_ROS3 (H5FD_ros3_init())
26 #else
27 #define H5FD_ROS3 (H5I_INVALID_HID)
28 #endif /* H5_HAVE_ROS3_VFD */
29 
30 #ifdef H5_HAVE_ROS3_VFD
31 
32 /****************************************************************************
33  *
34  * Structure: H5FD_ros3_fapl_t
35  *
36  * Purpose:
37  *
38  * H5FD_ros3_fapl_t is a public structure that is used to pass S3
39  * authentication data to the appropriate S3 VFD via the FAPL. A pointer
40  * to an instance of this structure is a parameter to H5Pset_fapl_ros3()
41  * and H5Pget_fapl_ros3().
42  *
43  *
44  *
45  * `version` (int32_t)
46  *
47  * Version number of the H5FD_ros3_fapl_t structure. Any instance passed
48  * to the above calls must have a recognized version number, or an error
49  * will be flagged.
50  *
51  * This field should be set to H5FD_CURR_ROS3_FAPL_T_VERSION.
52  *
53  * `authenticate` (hbool_t)
54  *
55  * Flag TRUE or FALSE whether or not requests are to be authenticated
56  * with the AWS4 algorithm.
57  * If TRUE, `aws_region`, `secret_id`, and `secret_key` must be populated.
58  * If FALSE, those three components are unused.
59  *
60  * `aws_region` (char[])
61  *
62  * String: name of the AWS "region" of the host, e.g. "us-east-1".
63  *
64  * `secret_id` (char[])
65  *
66  * String: "Access ID" for the resource.
67  *
68  * `secret_key` (char[])
69  *
70  * String: "Secret Access Key" associated with the ID and resource.
71  *
72  ****************************************************************************/
73 
74 #define H5FD_CURR_ROS3_FAPL_T_VERSION 1
75 
76 #define H5FD_ROS3_MAX_REGION_LEN 32
77 #define H5FD_ROS3_MAX_SECRET_ID_LEN 128
78 #define H5FD_ROS3_MAX_SECRET_KEY_LEN 128
79 
80 typedef struct H5FD_ros3_fapl_t {
81  int32_t version;
82  hbool_t authenticate;
83  char aws_region[H5FD_ROS3_MAX_REGION_LEN + 1];
84  char secret_id[H5FD_ROS3_MAX_SECRET_ID_LEN + 1];
85  char secret_key[H5FD_ROS3_MAX_SECRET_KEY_LEN + 1];
86 } H5FD_ros3_fapl_t;
87 
88 
89 #ifdef __cplusplus
90 extern "C" {
91 #endif
92 
93 H5_DLL hid_t H5FD_ros3_init(void);
94 H5_DLL herr_t H5Pget_fapl_ros3(hid_t fapl_id, H5FD_ros3_fapl_t *fa_out);
95 H5_DLL herr_t H5Pset_fapl_ros3(hid_t fapl_id, H5FD_ros3_fapl_t *fa);
96 
97 #ifdef __cplusplus
98 }
99 #endif
100 
101 #endif /* H5_HAVE_ROS3_VFD */
102 
103 #endif /* ifndef H5FDros3_H */
104 
105 
hid_t
int64_t hid_t
Definition: H5Ipublic.h:55
H5_DLL
#define H5_DLL
Definition: H5api_adpt.h:234
herr_t
int herr_t
Definition: H5public.h:128
hbool_t
bool hbool_t
Definition: H5public.h:159