summaryrefslogtreecommitdiffstats
path: root/tools/lib/h5tools.h
diff options
context:
space:
mode:
authorJordan Henderson <jhenderson@hdfgroup.org>2020-02-11 23:57:19 (GMT)
committerJordan Henderson <jhenderson@hdfgroup.org>2020-03-17 19:25:36 (GMT)
commitfa087c39199fccc1686b122e67b56e06c8fbe313 (patch)
treed6e6a8a1b8650d454256f32efc635d04edd94d43 /tools/lib/h5tools.h
parent7613f7e1aa89210bb625d59d79a6220c49a1f22c (diff)
downloadhdf5-fa087c39199fccc1686b122e67b56e06c8fbe313.zip
hdf5-fa087c39199fccc1686b122e67b56e06c8fbe313.tar.gz
hdf5-fa087c39199fccc1686b122e67b56e06c8fbe313.tar.bz2
Update Tools library to be better compatible with VOL connectors
Modify h5repack to integrate with VOL connectors Update tools library to accomodate VOL connectors Update logic in h5tools_fopen for VOL connectors Add command-line options to h5repack for specifying in/out VOL connectors Implement h5tools_set_vol_fapl Fix library shutdown issue Integrate ROS3 and HDFS VFDs into new h5tools_get_fapl() scheme Avoid H5Ocopy in h5repack when using different VOL connectors Update h5tools_test_utils.c for ROS3 and HDFS integration
Diffstat (limited to 'tools/lib/h5tools.h')
-rw-r--r--tools/lib/h5tools.h49
1 files changed, 48 insertions, 1 deletions
diff --git a/tools/lib/h5tools.h b/tools/lib/h5tools.h
index 9440e7a..11b0a1d 100644
--- a/tools/lib/h5tools.h
+++ b/tools/lib/h5tools.h
@@ -539,6 +539,52 @@ typedef struct h5tools_context_t {
int display_char; /* */
} h5tools_context_t;
+typedef enum {
+ GET_VFD_BY_NAME,
+ GET_VOL_BY_NAME,
+ GET_VOL_BY_ID
+} h5tools_get_fapl_type_t;
+
+typedef struct h5tools_get_fapl_info_t {
+ h5tools_get_fapl_type_t get_type;
+
+ /* Pointer to information to be passed to the driver/connector for its setup */
+ const void *info;
+
+ /* Field specifying either the driver's/connector's name, or the driver's/connector's ID */
+ union {
+ const char *name;
+ long id;
+ } u;
+} h5tools_get_fapl_info_t;
+
+extern const char *volnames[];
+extern const char *drivernames[];
+
+/* This enum should match the entries in the above 'volnames'
+ * since they are indices into the 'volnames' array. */
+typedef enum {
+ NATIVE_VOL_IDX = 0,
+ PASS_THROUGH_VOL_IDX,
+} vol_idx;
+
+/* This enum should match the entries in the above 'drivernames'
+ * since they are indices into the 'drivernames' array. */
+typedef enum {
+ SEC2_VFD_IDX = 0,
+ DIRECT_VFD_IDX,
+ LOG_VFD_IDX,
+ WINDOWS_VFD_IDX,
+ STDIO_VFD_IDX,
+ CORE_VFD_IDX,
+ FAMILY_VFD_IDX,
+ SPLIT_VFD_IDX,
+ MULTI_VFD_IDX,
+ MPIO_VFD_IDX,
+ ROS3_VFD_IDX,
+ HDFS_VFD_IDX,
+} driver_idx;
+
/* The following include, h5tools_str.h, must be after the
* above stucts are defined. There is a dependency in the following
* include that hasn't been identified yet. */
@@ -591,8 +637,9 @@ H5TOOLS_DLL int h5tools_set_attr_output_file(const char *fname, int is_bin);
H5TOOLS_DLL int h5tools_set_input_file(const char *fname, int is_bin);
H5TOOLS_DLL int h5tools_set_output_file(const char *fname, int is_bin);
H5TOOLS_DLL int h5tools_set_error_file(const char *fname, int is_bin);
+H5TOOLS_DLL hid_t h5tools_get_fapl(hid_t fapl, h5tools_get_fapl_info_t *get_info);
H5TOOLS_DLL hid_t h5tools_fopen(const char *fname, unsigned flags, hid_t fapl,
- const char *driver, char *drivername, size_t drivername_len);
+ hbool_t use_specific_driver, char *drivername, size_t drivername_size);
H5TOOLS_DLL hid_t h5tools_get_little_endian_type(hid_t type);
H5TOOLS_DLL hid_t h5tools_get_big_endian_type(hid_t type);
H5TOOLS_DLL htri_t h5tools_detect_vlen(hid_t tid);