diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2012-04-01 22:27:15 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2012-04-01 22:27:15 (GMT) |
commit | 362f22119d9cb25424f7cdf181219bfa6330b6b8 (patch) | |
tree | 4ffa1e4be8fecd337594ef32cc1da95c16bdf615 /src/H5FDpublic.h | |
parent | 7022c013acb0ffac172d0ef99aa7d0205ab842c8 (diff) | |
download | hdf5-362f22119d9cb25424f7cdf181219bfa6330b6b8.zip hdf5-362f22119d9cb25424f7cdf181219bfa6330b6b8.tar.gz hdf5-362f22119d9cb25424f7cdf181219bfa6330b6b8.tar.bz2 |
[svn-r22228] Description:
Bring r22219 from trunk to 1.8 branch: (with release manager's blessing)
Merge "file image" changes from feature branch back to trunk.
Tested on:
h5committested
Diffstat (limited to 'src/H5FDpublic.h')
-rw-r--r-- | src/H5FDpublic.h | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/src/H5FDpublic.h b/src/H5FDpublic.h index cd6c964..0c5605c 100644 --- a/src/H5FDpublic.h +++ b/src/H5FDpublic.h @@ -177,6 +177,18 @@ typedef enum H5F_mem_t H5FD_mem_t; * of type 'int' and is compatible with POSIX I/O calls. */ #define H5FD_FEAT_POSIX_COMPAT_HANDLE 0x00000080 + /* + * 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 */ @@ -246,6 +258,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 |