summaryrefslogtreecommitdiffstats
path: root/test/echo_vol.c
diff options
context:
space:
mode:
authorDana Robinson <derobins@hdfgroup.org>2018-10-10 15:10:15 (GMT)
committerDana Robinson <derobins@hdfgroup.org>2018-10-10 15:10:15 (GMT)
commite962df1591bc6eaee5b9e318de83b9c6698bc7b6 (patch)
treede3cb2001c62b76a89837ff1e90044574d71f19d /test/echo_vol.c
parent471150151d29eeb806333a8db41fefc9dfb452bb (diff)
downloadhdf5-e962df1591bc6eaee5b9e318de83b9c6698bc7b6.zip
hdf5-e962df1591bc6eaee5b9e318de83b9c6698bc7b6.tar.gz
hdf5-e962df1591bc6eaee5b9e318de83b9c6698bc7b6.tar.bz2
VOL FEATURE
Diffstat (limited to 'test/echo_vol.c')
-rw-r--r--test/echo_vol.c116
1 files changed, 116 insertions, 0 deletions
diff --git a/test/echo_vol.c b/test/echo_vol.c
new file mode 100644
index 0000000..02c0fb3
--- /dev/null
+++ b/test/echo_vol.c
@@ -0,0 +1,116 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * 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. *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+/*
+ * Purpose: A simple virtual object layer (VOL) plugin that just echoes
+ * the name of the API call.
+ */
+
+#include "H5PLextern.h"
+
+/* The VOL class struct.
+ */
+static const H5VL_class_t echo_vol_g = {
+ 0, /* version */
+ (H5VL_class_value_t)501, /* value */
+ "echo", /* name */
+ NULL, /* initialize */
+ NULL, /* terminate */
+ (size_t)0, /* fapl size */
+ NULL, /* fapl copy */
+ NULL, /* fapl free */
+ { /* attribute_cls */
+ NULL, /* create */
+ NULL, /* open */
+ NULL, /* read */
+ NULL, /* write */
+ NULL, /* get */
+ NULL, /* specific */
+ NULL, /* optional */
+ NULL /* close */
+ },
+ { /* dataset_cls */
+ NULL, /* create */
+ NULL, /* open */
+ NULL, /* read */
+ NULL, /* write */
+ NULL, /* get */
+ NULL, /* specific */
+ NULL, /* optional */
+ NULL /* close */
+ },
+ { /* datatype_cls */
+ NULL, /* commit */
+ NULL, /* open */
+ NULL, /* get_size */
+ NULL, /* specific */
+ NULL, /* optional */
+ NULL /* close */
+ },
+ { /* file_cls */
+ NULL, /* create */
+ NULL, /* open */
+ NULL, /* get */
+ NULL, /* specific */
+ NULL, /* optional */
+ NULL /* close */
+ },
+ { /* group_cls */
+ NULL, /* create */
+ NULL, /* open */
+ NULL, /* get */
+ NULL, /* specific */
+ NULL, /* optional */
+ NULL /* close */
+ },
+ { /* link_cls */
+ NULL, /* create */
+ NULL, /* copy */
+ NULL, /* move */
+ NULL, /* get */
+ NULL, /* specific */
+ NULL /* optional */
+ },
+ { /* object_cls */
+ NULL, /* open */
+ NULL, /* copy */
+ NULL, /* get */
+ NULL, /* specific */
+ NULL /* optional */
+ },
+ { /* async_cls */
+ NULL, /* cancel */
+ NULL, /* test */
+ NULL /* wait */
+ },
+ NULL /* optional */
+};
+
+
+
+/* These two functions are necessary to load this plugin using
+ * the HDF5 library.
+ */
+
+H5PL_type_t
+H5PLget_plugin_type(void)
+{
+ return H5PL_TYPE_VOL;
+}
+
+
+const void*
+H5PLget_plugin_info(void)
+{
+ return &echo_vol_g;
+}
+