summaryrefslogtreecommitdiffstats
path: root/src/H5FDros3.h
diff options
context:
space:
mode:
authorLarry Knox <lrknox@hdfgroup.org>2019-07-25 16:36:37 (GMT)
committerLarry Knox <lrknox@hdfgroup.org>2019-07-25 16:47:12 (GMT)
commit8008294578b5a133907d7ab1dd20e34735c54535 (patch)
treed1b9228d468afc05da9333567ea43a04bb0c4272 /src/H5FDros3.h
parentd3fdcd8a680ad0f8b21304b35e8564b774a88ef0 (diff)
downloadhdf5-8008294578b5a133907d7ab1dd20e34735c54535.zip
hdf5-8008294578b5a133907d7ab1dd20e34735c54535.tar.gz
hdf5-8008294578b5a133907d7ab1dd20e34735c54535.tar.bz2
Squashed commit of the following:
Merge changes from update_merged_S3_HDFS branch into develop. commit d5034315aea88629929ac0c9c59ebfafd5f21a31 Merge: 9c48823 d3fdcd8 Author: Larry Knox <lrknox@hdfgroup.org> Date: Thu Jul 25 08:24:53 2019 -0500 Merge branch 'develop' into update_merged_S3_HDFS
Diffstat (limited to 'src/H5FDros3.h')
-rw-r--r--src/H5FDros3.h105
1 files changed, 105 insertions, 0 deletions
diff --git a/src/H5FDros3.h b/src/H5FDros3.h
new file mode 100644
index 0000000..49e757c
--- /dev/null
+++ b/src/H5FDros3.h
@@ -0,0 +1,105 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Read-Only S3 Virtual File Driver (VFD) *
+ * Copyright (c) 2017-2018, The HDF Group. *
+ * *
+ * All rights reserved. *
+ * *
+ * NOTICE: *
+ * All information contained herein is, and remains, the property of The HDF *
+ * Group. The intellectual and technical concepts contained herein are *
+ * proprietary to The HDF Group. Dissemination of this information or *
+ * reproduction of this material is strictly forbidden unless prior written *
+ * permission is obtained from The HDF Group. *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+/*
+ * Programmer: John Mainzer
+ * 2017-10-10
+ *
+ * Purpose: The public header file for the ros3 driver.
+ */
+#ifndef H5FDros3_H
+#define H5FDros3_H
+
+#define H5FD_ROS3 (H5FD_ros3_init())
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/****************************************************************************
+ *
+ * Structure: H5FD_ros3_fapl_t
+ *
+ * Purpose:
+ *
+ * H5FD_ros3_fapl_t is a public structure that is used to pass S3
+ * authentication data to the appropriate S3 VFD via the FAPL. A pointer
+ * to an instance of this structure is a parameter to H5Pset_fapl_ros3()
+ * and H5Pget_fapl_ros3().
+ *
+ *
+ *
+ * `version` (int32_t)
+ *
+ * Version number of the H5FD_ros3_fapl_t structure. Any instance passed
+ * to the above calls must have a recognized version number, or an error
+ * will be flagged.
+ *
+ * This field should be set to H5FD__CURR_ROS3_FAPL_T_VERSION.
+ *
+ * `authenticate` (hbool_t)
+ *
+ * Flag TRUE or FALSE whether or not requests are to be authenticated
+ * with the AWS4 algorithm.
+ * If TRUE, `aws_region`, `secret_id`, and `secret_key` must be populated.
+ * If FALSE, those three components are unused.
+ *
+ * `aws_region` (char[])
+ *
+ * String: name of the AWS "region" of the host, e.g. "us-east-1".
+ *
+ * `secret_id` (char[])
+ *
+ * String: "Access ID" for the resource.
+ *
+ * `secret_key` (char[])
+ *
+ * String: "Secret Access Key" associated with the ID and resource.
+ *
+ *
+ *
+ * Programmer: John Mainzer
+ *
+ * Changes:
+ *
+ * - Add documentation of fields (except `version`)
+ * --- Jacob Smith 2017-12-04
+ *
+ ****************************************************************************/
+
+#define H5FD__CURR_ROS3_FAPL_T_VERSION 1
+
+#define H5FD__ROS3_MAX_REGION_LEN 32
+#define H5FD__ROS3_MAX_SECRET_ID_LEN 128
+#define H5FD__ROS3_MAX_SECRET_KEY_LEN 128
+
+typedef struct H5FD_ros3_fapl_t {
+ int32_t version;
+ hbool_t authenticate;
+ char aws_region[H5FD__ROS3_MAX_REGION_LEN + 1];
+ char secret_id[H5FD__ROS3_MAX_SECRET_ID_LEN + 1];
+ char secret_key[H5FD__ROS3_MAX_SECRET_KEY_LEN + 1];
+} H5FD_ros3_fapl_t;
+
+H5_DLL hid_t H5FD_ros3_init(void);
+H5_DLL herr_t H5Pget_fapl_ros3(hid_t fapl_id, H5FD_ros3_fapl_t * fa_out);
+H5_DLL herr_t H5Pset_fapl_ros3(hid_t fapl_id, H5FD_ros3_fapl_t * fa);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* ifndef H5FDros3_H */
+
+