summaryrefslogtreecommitdiffstats
path: root/src/H5FD.c
diff options
context:
space:
mode:
authorRaymond Lu <songyulu@hdfgroup.org>2002-09-30 16:31:55 (GMT)
committerRaymond Lu <songyulu@hdfgroup.org>2002-09-30 16:31:55 (GMT)
commitd1e26ae3280320dcc7cd286b4ef77be552bfc244 (patch)
treeb0b85f9e029956209be19e9b28f342a59294c260 /src/H5FD.c
parent4cfb158c292f7707a8a87edfd4b525c6ad7bb4b8 (diff)
downloadhdf5-d1e26ae3280320dcc7cd286b4ef77be552bfc244.zip
hdf5-d1e26ae3280320dcc7cd286b4ef77be552bfc244.tar.gz
hdf5-d1e26ae3280320dcc7cd286b4ef77be552bfc244.tar.bz2
[svn-r5951]
Purpose: New API functions Description: Added API functions to return pointer to low-level file handle (H5Fget_vfd_handle and H5FDget_vfd_handle) and related property list setting functions(H5Pset_family_offset and H5Pset_multi_type). Platforms tested: Linux 2.2(eirene), Solaris 2.7(arabica), IRIX64 6.5(modi4)
Diffstat (limited to 'src/H5FD.c')
-rw-r--r--src/H5FD.c59
1 files changed, 59 insertions, 0 deletions
diff --git a/src/H5FD.c b/src/H5FD.c
index dd15734..8534b38 100644
--- a/src/H5FD.c
+++ b/src/H5FD.c
@@ -2872,3 +2872,62 @@ done:
FUNC_LEAVE(ret_value);
} /* end H5F_get_fileno() */
+
+/*--------------------------------------------------------------------------
+ * Function: H5FDget_vfd_handle
+ *
+ * Purpose: Returns a pointer to the file handle of low-level virtual
+ * file driver.
+ *
+ * Return: Non-negative if succeed; negative otherwise.
+ *
+ * Programmer: Raymond Lu
+ * Sep. 16, 2002
+ *
+ * Modifications:
+ *
+ *--------------------------------------------------------------------------
+ */
+herr_t H5FDget_vfd_handle(H5FD_t *file, hid_t fapl, void** file_handle)
+{
+ herr_t ret_value;
+
+ FUNC_ENTER_API(H5FDget_vfd_handle, FAIL);
+
+ /* Check arguments */
+ assert(file);
+ assert(file_handle);
+ ret_value=H5FD_get_vfd_handle(file, fapl, file_handle);
+
+done:
+ FUNC_LEAVE(ret_value);
+}
+
+
+/*--------------------------------------------------------------------------
+ * Function: H5FD_get_vfd_handle
+ *
+ * Purpose: Retrieve the file handle for file driver.
+ *
+ * Return: Non-negative if succeed; negative if fails.
+ *
+ * Programmer: Raymond Lu
+ * Sep. 16, 2002
+ *
+ * Modifications:
+ *
+ *--------------------------------------------------------------------------
+ */
+herr_t H5FD_get_vfd_handle(H5FD_t *file, hid_t fapl, void** file_handle)
+{
+ herr_t ret_value = SUCCEED;
+
+ FUNC_ENTER_NOAPI(H5FD_get_vfd_handle, FAIL);
+
+ assert(file_handle);
+ if(file->cls->get_handle && ((ret_value=file->cls->get_handle(file, fapl, file_handle)) < 0))
+ HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "can't get file handle for file driver");
+
+done:
+ FUNC_LEAVE(ret_value);
+}