diff options
author | Jordan Henderson <jhenderson@hdfgroup.org> | 2020-01-29 00:18:38 (GMT) |
---|---|---|
committer | Jordan Henderson <jhenderson@hdfgroup.org> | 2020-01-29 00:18:38 (GMT) |
commit | e41f671d2ff3c7bb797ea0246e6289b0bac5a0e5 (patch) | |
tree | 9b0af1ccf350a14b2165c1db1579b2434144aaf8 /java/src/jni/h5vlImp.c | |
parent | 71c050f837149a0c11e0936e661047c091deaa2f (diff) | |
download | hdf5-e41f671d2ff3c7bb797ea0246e6289b0bac5a0e5.zip hdf5-e41f671d2ff3c7bb797ea0246e6289b0bac5a0e5.tar.gz hdf5-e41f671d2ff3c7bb797ea0246e6289b0bac5a0e5.tar.bz2 |
Introduce new H5VL _by_value routines
Diffstat (limited to 'java/src/jni/h5vlImp.c')
-rw-r--r-- | java/src/jni/h5vlImp.c | 60 |
1 files changed, 54 insertions, 6 deletions
diff --git a/java/src/jni/h5vlImp.c b/java/src/jni/h5vlImp.c index 0fee343..1ead30b 100644 --- a/java/src/jni/h5vlImp.c +++ b/java/src/jni/h5vlImp.c @@ -78,11 +78,11 @@ done: /* * Class: hdf_hdf5lib_H5 - * Method: H5VLis_connector_registered + * Method: H5VLis_connector_registered_by_name * Signature: (Ljava/lang/String;)Z */ JNIEXPORT jboolean JNICALL -Java_hdf_hdf5lib_H5_H5VLis_1connector_1registered +Java_hdf_hdf5lib_H5_H5VLis_1connector_1registered_1by_1name (JNIEnv *env, jclass clss, jobject connector_name) { const char *volName = NULL; @@ -91,11 +91,11 @@ Java_hdf_hdf5lib_H5_H5VLis_1connector_1registered UNUSED(clss); if (NULL == connector_name) - H5_NULL_ARGUMENT_ERROR(ENVONLY, "H5VLis_connector_registered: VOL connector name is NULL"); + H5_NULL_ARGUMENT_ERROR(ENVONLY, "H5VLis_connector_registered_by_name: VOL connector name is NULL"); - PIN_JAVA_STRING(ENVONLY, connector_name, volName, NULL, "H5VLis_connector_registered: VOL connector name not pinned"); + PIN_JAVA_STRING(ENVONLY, connector_name, volName, NULL, "H5VLis_connector_registered_by_name: VOL connector name not pinned"); - if ((bval = H5VLis_connector_registered(volName)) < 0) + if ((bval = H5VLis_connector_registered_by_name(volName)) < 0) H5_LIBRARY_ERROR(ENVONLY); bval = (bval > 0) ? JNI_TRUE : JNI_FALSE; @@ -105,7 +105,32 @@ done: UNPIN_JAVA_STRING(ENVONLY, connector_name, volName); return (jboolean)bval; -} /* end Java_hdf_hdf5lib_H5_H5VLis_1connector_1registered */ +} /* end Java_hdf_hdf5lib_H5_H5VLis_1connector_1registered_1by_1name */ + +/* + * Class: hdf_hdf5lib_H5 + * Method: H5VLis_connector_registered_by_value + * Signature: (I)Z + */ +JNIEXPORT jboolean JNICALL +Java_hdf_hdf5lib_H5_H5VLis_1connector_1registered_1by_1value + (JNIEnv *env, jclass clss, jint connector_value) +{ + htri_t bval = JNI_FALSE; + + UNUSED(clss); + + if (connector_value < 0) + H5_BAD_ARGUMENT_ERROR(ENVONLY, "H5VLis_connector_registered_by_value: VOL connector value < 0"); + + if ((bval = H5VLis_connector_registered_by_value((H5VL_class_value_t)connector_value)) < 0) + H5_LIBRARY_ERROR(ENVONLY); + + bval = (bval > 0) ? JNI_TRUE : JNI_FALSE; + +done: + return (jboolean)bval; +} /* end Java_hdf_hdf5lib_H5_H5VLis_1connector_1registered_1by_1value */ /* * Class: hdf_hdf5lib_H5 @@ -158,6 +183,29 @@ done: /* * Class: hdf_hdf5lib_H5 + * Method: H5VLget_connector_id_by_value + * Signature: (I)J + */ +JNIEXPORT jlong JNICALL +Java_hdf_hdf5lib_H5_H5VLget_1connector_1id_1by_1value + (JNIEnv *env, jclass clss, jint connector_value) +{ + hid_t status = H5I_INVALID_HID; + + UNUSED(clss); + + if (connector_value < 0) + H5_BAD_ARGUMENT_ERROR(ENVONLY, "H5VLget_connector_id_by_value: VOL connector value < 0"); + + if ((status = H5VLget_connector_id_by_value((H5VL_class_value_t)connector_value)) < 0) + H5_LIBRARY_ERROR(ENVONLY); + +done: + return (jlong)status; +} /* end Java_hdf_hdf5lib_H5_H5VLget_1connector_1id_1by_1value */ + +/* + * Class: hdf_hdf5lib_H5 * Method: H5VLget_connector_name * Signature: (J)Ljava/lang/String; */ |