summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@lbl.gov>2021-06-28 16:34:30 (GMT)
committerQuincey Koziol <koziol@lbl.gov>2021-06-28 16:34:30 (GMT)
commit2aedb2522b3e6f228d22bc91fcc9ab88ea190993 (patch)
tree458f0d3353887fc099df7b12bd89337a2acf8587
parent851be6f4ec7e7022357a476f30d36757a4579662 (diff)
downloadhdf5-2aedb2522b3e6f228d22bc91fcc9ab88ea190993.zip
hdf5-2aedb2522b3e6f228d22bc91fcc9ab88ea190993.tar.gz
hdf5-2aedb2522b3e6f228d22bc91fcc9ab88ea190993.tar.bz2
Add new source files
-rw-r--r--src/H5Pdevelop.h88
-rw-r--r--utils/vds_check_compat_vol.c60
2 files changed, 148 insertions, 0 deletions
diff --git a/src/H5Pdevelop.h b/src/H5Pdevelop.h
new file mode 100644
index 0000000..3e1b507
--- /dev/null
+++ b/src/H5Pdevelop.h
@@ -0,0 +1,88 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright by The HDF Group. *
+ * All rights reserved. *
+ * *
+ * This file is part of HDF5. The full HDF5 copyright notice, including *
+ * terms governing use, modification, and redistribution, is contained in *
+ * the COPYING file, which can be found at the root of the source code *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * If you do not have access to either file, you may request a copy from *
+ * help@hdfgroup.org. *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+/*
+ * This file contains public declarations for the H5P (property list) developer
+ * support routines.
+ */
+
+#ifndef _H5Pdevelop_H
+#define _H5Pdevelop_H
+
+/* Include package's public header */
+#include "H5Ppublic.h"
+
+/*****************/
+/* Public Macros */
+/*****************/
+
+/*******************/
+/* Public Typedefs */
+/*******************/
+
+
+/********************/
+/* Public Variables */
+/********************/
+
+/*********************/
+/* Public Prototypes */
+/*********************/
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ *
+ * \ingroup DXPL
+ *
+ * \brief Sets "new API context" flag for plugin API wrapper call.
+ *
+ * \dxpl_id{plist_id}
+ * \param[in] new_api_ctx Indicate that API wrapper should create new API context
+ * \return \herr_t
+ *
+ * \details Set flag to indicate that an API wrapper for a plugin's
+ * public wrapper API call (e.g. H5VLfile_create, H5FDopen, etc)
+ * should open a new API context for the API call.
+ *
+ */
+H5_DLL herr_t H5Pset_plugin_new_api_context(hid_t plist_id, hbool_t new_api_ctx);
+
+/**
+ * \ingroup DXPL
+ *
+ * \brief Gets "new API context" flag for plugin API wrapper call.
+ *
+ * \dxpl_id{plist_id}
+ * \param[out] new_api_ctx Flag indicating API wrapper should create new API context
+ * \return \herr_t
+ *
+ * \details Retrieve "new API context" flag for plugin wrapper API calls.
+ *
+ */
+H5_DLL herr_t H5Pget_plugin_new_api_context(hid_t plist_id, hbool_t *new_api_ctx);
+
+#ifdef __cplusplus
+}
+#endif
+
+/* Symbols defined for compatibility with previous versions of the HDF5 API.
+ *
+ * Use of these symbols is deprecated.
+ */
+#ifndef H5_NO_DEPRECATED_SYMBOLS
+
+#endif /* H5_NO_DEPRECATED_SYMBOLS */
+
+#endif /* _H5Pdevelop_H */
diff --git a/utils/vds_check_compat_vol.c b/utils/vds_check_compat_vol.c
new file mode 100644
index 0000000..03f17fb
--- /dev/null
+++ b/utils/vds_check_compat_vol.c
@@ -0,0 +1,60 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright by The HDF Group. *
+ * All rights reserved. *
+ * *
+ * This file is part of HDF5. The full HDF5 copyright notice, including *
+ * terms governing use, modification, and redistribution, is contained in *
+ * the COPYING file, which can be found at the root of the source code *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
+ * If you do not have access to either file, you may request a copy from *
+ * help@hdfgroup.org. *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+/* Purpose: This is a small program that checks if the HDF5_VOL_CONNECTOR
+ * environment variable is set to a value that supports virtual
+ * datasets.
+ *
+ * It is intended for use in shell scripts.
+ */
+
+#include "h5test.h"
+#include "H5VLprivate.h" /* Virtual Object Layer */
+
+/*-------------------------------------------------------------------------
+ * Function: main
+ *
+ * Purpose: Uses the default file access property lists, which is
+ * initialized with the VOL connector from the HDF5_VOL_CONNECTOR
+ * environment variable to determine if virtual datasets are
+ * supported.
+ *
+ * Return: VOL connector supports virtual datasets: EXIT_SUCCESS
+ *
+ * VOL connector does not support virtual datasets
+ * or failure: EXIT_FAILURE
+ *
+ *-------------------------------------------------------------------------
+ */
+int
+main(void)
+{
+ hid_t fapl_id;
+ hbool_t is_native; /* Whether native VOL connector is being used */
+
+ /* Open the VDS file and dataset */
+ if ((fapl_id = h5_fileaccess()) < 0)
+ return EXIT_FAILURE;
+
+ /* Check for operating with native (only) VOL connector */
+ is_native = FALSE;
+ if (H5VL_fapl_is_native(fapl_id, &is_native) < 0)
+ return EXIT_FAILURE;
+
+ /* Currently, only the native VOL connector supports virtual datasets */
+ if (is_native)
+ return EXIT_SUCCESS;
+ else
+ return EXIT_FAILURE;
+} /* end main() */
+
+