summaryrefslogtreecommitdiffstats
path: root/src/H5VLconnector_passthru.h
diff options
context:
space:
mode:
authorDana Robinson <derobins@hdfgroup.org>2019-05-24 00:56:27 (GMT)
committerDana Robinson <derobins@hdfgroup.org>2019-05-24 09:22:08 (GMT)
commitd5a8b2a80cd1e5aaa62a523e03a5936260a56f60 (patch)
tree7b3076c1cf79633dc0d67cc37b4aa5994ebb0c2b /src/H5VLconnector_passthru.h
parente1879a23ae414e5256bcc0170f40784cd698af89 (diff)
downloadhdf5-d5a8b2a80cd1e5aaa62a523e03a5936260a56f60.zip
hdf5-d5a8b2a80cd1e5aaa62a523e03a5936260a56f60.tar.gz
hdf5-d5a8b2a80cd1e5aaa62a523e03a5936260a56f60.tar.bz2
Split VOL connector routines into separate headers:
* H5VLconnector.h for terminal connector things * H5VLconnector_passthru.h for passthrough connector things Note that these headers are arranged such that they are included in hdf5.h so VOL connectors only need to include that. The separation into multiple headers is mainly for readability.
Diffstat (limited to 'src/H5VLconnector_passthru.h')
-rw-r--r--src/H5VLconnector_passthru.h80
1 files changed, 80 insertions, 0 deletions
diff --git a/src/H5VLconnector_passthru.h b/src/H5VLconnector_passthru.h
new file mode 100644
index 0000000..5083cb4
--- /dev/null
+++ b/src/H5VLconnector_passthru.h
@@ -0,0 +1,80 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * 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 authoring VOL connectors
+ * which act as "passthrough" connectors that forward their API calls to
+ * an underlying connector.
+ *
+ * An example of this might be a logging connector, which creates log messages
+ * and then passes the call on to an underlying VOL connector.
+ *
+ * The functionality required to implement such a connector is specialized
+ * and non-trivial so it has been split into this header in an effort to keep
+ * the H5VLpublic_dev.h header easier to understand.
+ */
+
+#ifndef _H5VLconnector_passthru_H
+#define _H5VLconnector_passthru_H
+
+/* Public headers needed by this file */
+#include "H5public.h" /* Generic Functions */
+#include "H5Ipublic.h" /* IDs */
+#include "H5VLpublic.h" /* Virtual Object Layer */
+
+/* Semi-public headers mainly for VOL connector authors */
+#include "H5VLconnector.h"
+
+
+/*****************/
+/* Public Macros */
+/*****************/
+
+/*******************/
+/* Public Typedefs */
+/*******************/
+
+/********************/
+/* Public Variables */
+/********************/
+
+/*********************/
+/* Public Prototypes */
+/*********************/
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* Helper routines for VOL connector authors */
+H5_DLL herr_t H5VLcmp_connector_cls(int *cmp, hid_t connector_id1, hid_t connector_id2);
+H5_DLL hid_t H5VLwrap_register(void *obj, H5I_type_t type);
+H5_DLL herr_t H5VLretrieve_lib_state(void **state);
+H5_DLL herr_t H5VLrestore_lib_state(const void *state);
+H5_DLL herr_t H5VLreset_lib_state(void);
+H5_DLL herr_t H5VLfree_lib_state(void *state);
+
+/* Pass-through callbacks */
+H5_DLL void *H5VLget_object(void *obj, hid_t connector_id);
+H5_DLL herr_t H5VLget_wrap_ctx(void *obj, hid_t connector_id, void **wrap_ctx);
+H5_DLL void *H5VLwrap_object(void *obj, H5I_type_t obj_type, hid_t connector_id,
+ void *wrap_ctx);
+H5_DLL void *H5VLunwrap_object(void *obj, hid_t connector_id);
+H5_DLL herr_t H5VLfree_wrap_ctx(void *wrap_ctx, hid_t connector_id);
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _H5VLconnector_passthru_H */
+