summaryrefslogtreecommitdiffstats
path: root/src/H5FDpublic.h
diff options
context:
space:
mode:
authorMohamad Chaarawi <chaarawi@hdfgroup.org>2012-04-10 20:19:35 (GMT)
committerMohamad Chaarawi <chaarawi@hdfgroup.org>2012-04-10 20:19:35 (GMT)
commit45f6d4c1eed29c45476970a9703304378a5a1073 (patch)
tree667240a5ea57e8a072bc8ffb59ecb7281867164c /src/H5FDpublic.h
parentad4b4b2b90c340bb408ddf32dd5cae780547bad2 (diff)
parent09fa6e9c54380362f6f283ad60daef679ec91b25 (diff)
downloadhdf5-45f6d4c1eed29c45476970a9703304378a5a1073.zip
hdf5-45f6d4c1eed29c45476970a9703304378a5a1073.tar.gz
hdf5-45f6d4c1eed29c45476970a9703304378a5a1073.tar.bz2
[svn-r22274] merge from trunk, resolve conflicts
Diffstat (limited to 'src/H5FDpublic.h')
-rw-r--r--src/H5FDpublic.h40
1 files changed, 40 insertions, 0 deletions
diff --git a/src/H5FDpublic.h b/src/H5FDpublic.h
index f495e2d..ab19c68 100644
--- a/src/H5FDpublic.h
+++ b/src/H5FDpublic.h
@@ -222,6 +222,19 @@ typedef enum H5F_mem_t H5FD_mem_t;
* instead of the default H5D_ALLOC_TIME_LATE
*/
#define H5FD_FEAT_ALLOCATE_EARLY 0x00000200
+ /*
+ * Defining the H5FD_FEAT_ALLOW_FILE_IMAGE for a VFL driver means that
+ * the driver is able to use a file image in the fapl as the initial
+ * contents of a file.
+ */
+#define H5FD_FEAT_ALLOW_FILE_IMAGE 0x00000400
+ /*
+ * Defining the H5FD_FEAT_CAN_USE_FILE_IMAGE_CALLBACKS for a VFL driver
+ * means that the driver is able to use callbacks to make a copy of the
+ * image to store in memory.
+ */
+#define H5FD_FEAT_CAN_USE_FILE_IMAGE_CALLBACKS 0x00000800
+
/* Forward declaration */
typedef struct H5FD_t H5FD_t;
@@ -291,6 +304,33 @@ struct H5FD_t {
hsize_t alignment; /* Allocation alignment */
};
+/* Define enum for the source of file image callbacks */
+typedef enum {
+ H5FD_FILE_IMAGE_OP_NO_OP,
+ H5FD_FILE_IMAGE_OP_PROPERTY_LIST_SET,
+ H5FD_FILE_IMAGE_OP_PROPERTY_LIST_COPY,
+ H5FD_FILE_IMAGE_OP_PROPERTY_LIST_GET,
+ H5FD_FILE_IMAGE_OP_PROPERTY_LIST_CLOSE,
+ H5FD_FILE_IMAGE_OP_FILE_OPEN,
+ H5FD_FILE_IMAGE_OP_FILE_RESIZE,
+ H5FD_FILE_IMAGE_OP_FILE_CLOSE,
+} H5FD_file_image_op_t;
+
+/* Define structure to hold file image callbacks */
+typedef struct {
+ void *(*image_malloc)(size_t size, H5FD_file_image_op_t file_image_op,
+ void *udata);
+ void *(*image_memcpy)(void *dest, const void *src, size_t size,
+ H5FD_file_image_op_t file_image_op, void *udata);
+ void *(*image_realloc)(void *ptr, size_t size,
+ H5FD_file_image_op_t file_image_op, void *udata);
+ herr_t (*image_free)(void *ptr, H5FD_file_image_op_t file_image_op,
+ void *udata);
+ void *(*udata_copy)(void *udata);
+ herr_t (*udata_free)(void *udata);
+ void *udata;
+} H5FD_file_image_callbacks_t;
+
#ifdef __cplusplus
extern "C" {
#endif