2018-10-10 23:10:15 +08:00
|
|
|
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
|
|
|
* 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. *
|
|
|
|
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
|
|
|
|
|
2018-12-28 07:50:04 +08:00
|
|
|
/* Purpose: A simple virtual object layer (VOL) connector with almost no
|
|
|
|
* functionality that is used for testing basic plugin handling
|
|
|
|
* (registration, etc.).
|
2018-10-10 23:10:15 +08:00
|
|
|
*/
|
|
|
|
|
2019-05-24 08:56:27 +08:00
|
|
|
|
|
|
|
/* Public HDF5 header */
|
|
|
|
#include "hdf5.h"
|
|
|
|
|
|
|
|
/* For HDF5 plugin functionality */
|
2018-10-10 23:10:15 +08:00
|
|
|
#include "H5PLextern.h"
|
|
|
|
|
2019-05-24 08:56:27 +08:00
|
|
|
|
|
|
|
/* This connector's header */
|
2018-12-28 07:50:04 +08:00
|
|
|
#include "null_vol_connector.h"
|
|
|
|
|
|
|
|
/* The VOL class struct */
|
|
|
|
static const H5VL_class_t null_vol_g = {
|
2018-10-10 23:10:15 +08:00
|
|
|
0, /* version */
|
2018-12-28 07:50:04 +08:00
|
|
|
NULL_VOL_CONNECTOR_VALUE, /* value */
|
|
|
|
NULL_VOL_CONNECTOR_NAME, /* name */
|
2018-12-06 05:09:32 +08:00
|
|
|
0, /* capability flags */
|
2018-10-10 23:10:15 +08:00
|
|
|
NULL, /* initialize */
|
|
|
|
NULL, /* terminate */
|
2019-04-22 03:45:54 +08:00
|
|
|
{ /* info_cls */
|
|
|
|
(size_t)0, /* size */
|
|
|
|
NULL, /* copy */
|
|
|
|
NULL, /* compare */
|
|
|
|
NULL, /* free */
|
|
|
|
NULL, /* to_str */
|
|
|
|
NULL, /* from_str */
|
|
|
|
},
|
|
|
|
{ /* wrap_cls */
|
|
|
|
NULL, /* get_object */
|
|
|
|
NULL, /* get_wrap_ctx */
|
|
|
|
NULL, /* wrap_object */
|
|
|
|
NULL, /* unwrap_object */
|
|
|
|
NULL, /* free_wrap_ctx */
|
|
|
|
},
|
2018-10-10 23:10:15 +08:00
|
|
|
{ /* 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 */
|
|
|
|
},
|
2018-12-06 05:09:32 +08:00
|
|
|
{ /* request_cls */
|
|
|
|
NULL, /* wait */
|
|
|
|
NULL, /* notify */
|
2018-10-10 23:10:15 +08:00
|
|
|
NULL, /* cancel */
|
2018-12-06 05:09:32 +08:00
|
|
|
NULL, /* specific */
|
|
|
|
NULL, /* optional */
|
|
|
|
NULL /* free */
|
2018-10-10 23:10:15 +08:00
|
|
|
},
|
2019-12-04 07:14:57 +08:00
|
|
|
{ /* blob_cls */
|
|
|
|
NULL, /* put */
|
|
|
|
NULL, /* get */
|
|
|
|
NULL, /* specific */
|
|
|
|
NULL /* optional */
|
|
|
|
},
|
2018-10-10 23:10:15 +08:00
|
|
|
NULL /* optional */
|
|
|
|
};
|
|
|
|
|
|
|
|
/* These two functions are necessary to load this plugin using
|
|
|
|
* the HDF5 library.
|
|
|
|
*/
|
|
|
|
|
2018-12-28 07:50:04 +08:00
|
|
|
H5PL_type_t H5PLget_plugin_type(void) {return H5PL_TYPE_VOL;}
|
|
|
|
const void *H5PLget_plugin_info(void) {return &null_vol_g;}
|
2018-10-10 23:10:15 +08:00
|
|
|
|