/* * Class: hdf_hdf5lib_H5 * Method: H5Oget_info * Signature: (J)Lhdf/hdf5lib/structs/H5O_info_t; */ JNIEXPORT jobject JNICALL Java_hdf_hdf5lib_H5_H5Oget_1info (JNIEnv *env, jclass clss, jlong loc_id) { herr_t status = -1; H5O_info_t infobuf; jvalue args[12]; jobject hdrinfobuf; jobject ihinfobuf1; jobject ihinfobuf2; jobject ret_obj = NULL; status = H5Oget_info((hid_t)loc_id, &infobuf); if (status < 0) { h5libraryError(env); } /* end if */ else { args[0].i = (jint)infobuf.hdr.version; args[1].i = (jint)infobuf.hdr.nmesgs; args[2].i = (jint)infobuf.hdr.nchunks; args[3].i = (jint)infobuf.hdr.flags; args[4].j = (jlong)infobuf.hdr.space.total; args[5].j = (jlong)infobuf.hdr.space.meta; args[6].j = (jlong)infobuf.hdr.space.mesg; args[7].j = (jlong)infobuf.hdr.space.free; args[8].j = (jlong)infobuf.hdr.mesg.present; args[9].j = (jlong)infobuf.hdr.mesg.shared; CALL_CONSTRUCTOR("hdf/hdf5lib/structs/H5O_hdr_info_t", "(IIIIJJJJJJ)V", args); hdrinfobuf = ret_obj; args[0].j = (jlong)infobuf.meta_size.obj.index_size; args[1].j = (jlong)infobuf.meta_size.obj.heap_size; CALL_CONSTRUCTOR("hdf/hdf5lib/structs/H5_ih_info_t", "(JJ)V", args); ihinfobuf1 = ret_obj; args[0].j = (jlong)infobuf.meta_size.attr.index_size; args[1].j = (jlong)infobuf.meta_size.attr.heap_size; CALL_CONSTRUCTOR("hdf/hdf5lib/structs/H5_ih_info_t", "(JJ)V", args); ihinfobuf2 = ret_obj; args[0].j = (jlong)infobuf.fileno; args[1].j = (jlong)infobuf.addr; args[2].i = infobuf.type; args[3].i = (jint)infobuf.rc; args[4].j = (jlong)infobuf.num_attrs; args[5].j = infobuf.atime; args[6].j = infobuf.mtime; args[7].j = infobuf.ctime; args[8].j = infobuf.btime; args[9].l = hdrinfobuf; args[10].l = ihinfobuf1; args[11].l = ihinfobuf2; CALL_CONSTRUCTOR("hdf/hdf5lib/structs/H5O_info_t", "(JJIIJJJJJLhdf/hdf5lib/structs/H5O_hdr_info_t;Lhdf/hdf5lib/structs/H5_ih_info_t;Lhdf/hdf5lib/structs/H5_ih_info_t;)V", args); } return ret_obj; } /* end Java_hdf_hdf5lib_H5_H5Oget_1info */
/* * Class: hdf_hdf5lib_H5 * Method: H5Lget_info_by_idx * Signature: (JLjava/lang/String;IIJJ)Lhdf/hdf5lib/structs/H5L_info_t; */ JNIEXPORT jobject JNICALL Java_hdf_hdf5lib_H5_H5Lget_1info_1by_1idx (JNIEnv *env, jclass clss, jlong loc_id, jstring name, jint index_field, jint order, jlong link_n, jlong access_id) { jobject ret_obj = NULL; jvalue args[5]; herr_t status; H5L_info_t infobuf; const char *lName; PIN_JAVA_STRING(name, lName); if (lName != NULL) { status = H5Lget_info_by_idx((hid_t)loc_id, lName, (H5_index_t)index_field, (H5_iter_order_t)order, (hsize_t)link_n, &infobuf, (hid_t)access_id); UNPIN_JAVA_STRING(name, lName); if (status < 0) { h5libraryError(env); } /* end if */ else { args[0].i = infobuf.type; args[1].z = infobuf.corder_valid; args[2].j = infobuf.corder; args[3].i = infobuf.cset; if(infobuf.type==0) args[4].j = (jlong)infobuf.u.address; else args[4].j = (jlong)infobuf.u.val_size; CALL_CONSTRUCTOR("hdf/hdf5lib/structs/H5L_info_t", "(IZJIJ)V", args); } /* end els */ } return ret_obj; } /* end Java_hdf_hdf5lib_H5_H5Lget_1info_1by_1idx */
/* * Class: hdf_hdf5lib_H5 * Method: H5Aget_info_by_name * Signature: (JLjava/lang/String;Ljava/lang/String;J)Lhdf/hdf5lib/structs/H5A_info_t; */ JNIEXPORT jobject JNICALL Java_hdf_hdf5lib_H5_H5Aget_1info_1by_1name (JNIEnv *env, jclass clss, jlong loc_id, jstring obj_name, jstring attr_name, jlong lapl_id) { const char *aName; const char *attrName; herr_t status; H5A_info_t ainfo; jvalue args[4]; jobject ret_obj = NULL; PIN_JAVA_STRING_TWO(obj_name, aName, attr_name, attrName); if (aName != NULL && attrName != NULL) { status = H5Aget_info_by_name((hid_t)loc_id, aName, attrName, &ainfo, (hid_t)lapl_id); UNPIN_JAVA_STRING_TWO(obj_name, aName, attr_name, attrName); if (status < 0) { h5libraryError(env); } /* end if */ else { args[0].z = ainfo.corder_valid; args[1].j = ainfo.corder; args[2].i = ainfo.cset; args[3].j = (jlong)ainfo.data_size; CALL_CONSTRUCTOR("hdf/hdf5lib/structs/H5A_info_t", "(ZJIJ)V", args); } /* end else */ } return ret_obj; } /* end Java_hdf_hdf5lib_H5_H5Aget_1info_1by_1name */
/* * Class: hdf_hdf5lib_H5 * Method: H5Aget_info * Signature: (J)Lhdf/hdf5lib/structs/H5A_info_t; */ JNIEXPORT jobject JNICALL Java_hdf_hdf5lib_H5_H5Aget_1info (JNIEnv *env, jclass clss, jlong attr_id) { herr_t status = -1; H5A_info_t ainfo; jvalue args[4]; jobject ret_obj = NULL; status = H5Aget_info((hid_t)attr_id, &ainfo); if (status < 0) { h5libraryError(env); } /* end if */ else { args[0].z = ainfo.corder_valid; args[1].j = ainfo.corder; args[2].i = ainfo.cset; args[3].j = (jlong)ainfo.data_size; CALL_CONSTRUCTOR("hdf/hdf5lib/structs/H5A_info_t", "(ZJIJ)V", args); } /* end else */ return ret_obj; } /* end Java_hdf_hdf5lib_H5_H5Aget_1info */
/* * Class: hdf_hdf5lib_H5 * Method: H5Oget_info_by_idx * Signature: (JLjava/lang/String;IIJIJ)Lhdf/hdf5lib/structs/H5O_info_t; */ JNIEXPORT jobject JNICALL Java_hdf_hdf5lib_H5_H5Oget_1info_1by_1idx (JNIEnv *env, jclass clss, jlong loc_id, jstring name, jint index_field, jint order, jlong link_n, jint fields, jlong access_id) { H5O_info_t infobuf; const char *grpName = NULL; jobject hdrinfobuf; jobject ihinfobuf1; jobject ihinfobuf2; jvalue args[12]; herr_t status = FAIL; jobject ret_obj = NULL; UNUSED(clss); if (NULL == name) H5_NULL_ARGUMENT_ERROR(ENVONLY, "H5Oget_info_by_idx: group name is NULL"); PIN_JAVA_STRING(ENVONLY, name, grpName, NULL, "H5Oget_info_by_idx: group name not pinned"); if ((status = H5Oget_info_by_idx2((hid_t)loc_id, grpName, (H5_index_t)index_field, (H5_iter_order_t)order, (hsize_t)link_n, &infobuf, (unsigned)fields, (hid_t)access_id)) < 0) H5_LIBRARY_ERROR(ENVONLY); args[0].i = (jint)infobuf.hdr.version; args[1].i = (jint)infobuf.hdr.nmesgs; args[2].i = (jint)infobuf.hdr.nchunks; args[3].i = (jint)infobuf.hdr.flags; args[4].j = (jlong)infobuf.hdr.space.total; args[5].j = (jlong)infobuf.hdr.space.meta; args[6].j = (jlong)infobuf.hdr.space.mesg; args[7].j = (jlong)infobuf.hdr.space.free; args[8].j = (jlong)infobuf.hdr.mesg.present; args[9].j = (jlong)infobuf.hdr.mesg.shared; CALL_CONSTRUCTOR(ENVONLY, "hdf/hdf5lib/structs/H5O_hdr_info_t", "(IIIIJJJJJJ)V", args, ret_obj); hdrinfobuf = ret_obj; args[0].j = (jlong)infobuf.meta_size.obj.index_size; args[1].j = (jlong)infobuf.meta_size.obj.heap_size; CALL_CONSTRUCTOR(ENVONLY, "hdf/hdf5lib/structs/H5_ih_info_t", "(JJ)V", args, ret_obj); ihinfobuf1 = ret_obj; args[0].j = (jlong)infobuf.meta_size.attr.index_size; args[1].j = (jlong)infobuf.meta_size.attr.heap_size; CALL_CONSTRUCTOR(ENVONLY, "hdf/hdf5lib/structs/H5_ih_info_t", "(JJ)V", args, ret_obj); ihinfobuf2 = ret_obj; args[0].j = (jlong)infobuf.fileno; args[1].j = (jlong)infobuf.addr; args[2].i = infobuf.type; args[3].i = (jint)infobuf.rc; args[4].j = (jlong)infobuf.num_attrs; args[5].j = infobuf.atime; args[6].j = infobuf.mtime; args[7].j = infobuf.ctime; args[8].j = infobuf.btime; args[9].l = hdrinfobuf; args[10].l = ihinfobuf1; args[11].l = ihinfobuf2; CALL_CONSTRUCTOR(ENVONLY, "hdf/hdf5lib/structs/H5O_info_t", "(JJIIJJJJJLhdf/hdf5lib/structs/H5O_hdr_info_t;Lhdf/hdf5lib/structs/H5_ih_info_t;Lhdf/hdf5lib/structs/H5_ih_info_t;)V", args, ret_obj); done: if (grpName) UNPIN_JAVA_STRING(ENVONLY, name, grpName); return ret_obj; } /* end Java_hdf_hdf5lib_H5_H5Oget_1info_1by_1idx */
/* * Class: hdf_hdf5lib_H5 * Method: H5Oget_info * Signature: (JI)Lhdf/hdf5lib/structs/H5O_info_t; */ JNIEXPORT jobject JNICALL Java_hdf_hdf5lib_H5_H5Oget_1info (JNIEnv *env, jclass clss, jlong loc_id, jint fields) { H5O_info_t infobuf; jobject hdrinfobuf; jobject ihinfobuf1; jobject ihinfobuf2; jvalue args[12]; herr_t status = FAIL; jobject ret_obj = NULL; UNUSED(clss); if ((status = H5Oget_info2((hid_t)loc_id, &infobuf, (unsigned)fields)) < 0) H5_LIBRARY_ERROR(ENVONLY); args[0].i = (jint)infobuf.hdr.version; args[1].i = (jint)infobuf.hdr.nmesgs; args[2].i = (jint)infobuf.hdr.nchunks; args[3].i = (jint)infobuf.hdr.flags; args[4].j = (jlong)infobuf.hdr.space.total; args[5].j = (jlong)infobuf.hdr.space.meta; args[6].j = (jlong)infobuf.hdr.space.mesg; args[7].j = (jlong)infobuf.hdr.space.free; args[8].j = (jlong)infobuf.hdr.mesg.present; args[9].j = (jlong)infobuf.hdr.mesg.shared; CALL_CONSTRUCTOR(ENVONLY, "hdf/hdf5lib/structs/H5O_hdr_info_t", "(IIIIJJJJJJ)V", args, ret_obj); hdrinfobuf = ret_obj; args[0].j = (jlong)infobuf.meta_size.obj.index_size; args[1].j = (jlong)infobuf.meta_size.obj.heap_size; CALL_CONSTRUCTOR(ENVONLY, "hdf/hdf5lib/structs/H5_ih_info_t", "(JJ)V", args, ret_obj); ihinfobuf1 = ret_obj; args[0].j = (jlong)infobuf.meta_size.attr.index_size; args[1].j = (jlong)infobuf.meta_size.attr.heap_size; CALL_CONSTRUCTOR(ENVONLY, "hdf/hdf5lib/structs/H5_ih_info_t", "(JJ)V", args, ret_obj); ihinfobuf2 = ret_obj; args[0].j = (jlong)infobuf.fileno; args[1].j = (jlong)infobuf.addr; args[2].i = infobuf.type; args[3].i = (jint)infobuf.rc; args[4].j = (jlong)infobuf.num_attrs; args[5].j = infobuf.atime; args[6].j = infobuf.mtime; args[7].j = infobuf.ctime; args[8].j = infobuf.btime; args[9].l = hdrinfobuf; args[10].l = ihinfobuf1; args[11].l = ihinfobuf2; CALL_CONSTRUCTOR(ENVONLY, "hdf/hdf5lib/structs/H5O_info_t", "(JJIIJJJJJLhdf/hdf5lib/structs/H5O_hdr_info_t;Lhdf/hdf5lib/structs/H5_ih_info_t;Lhdf/hdf5lib/structs/H5_ih_info_t;)V", args, ret_obj); done: return ret_obj; } /* end Java_hdf_hdf5lib_H5_H5Oget_1info */
/* * Class: hdf_hdf5lib_H5 * Method: H5Oget_info_by_idx * Signature: (JLjava/lang/String;IIJJ)Lhdf/hdf5lib/structs/H5O_info_t; */ JNIEXPORT jobject JNICALL Java_hdf_hdf5lib_H5_H5Oget_1info_1by_1idx (JNIEnv *env, jclass clss, jlong loc_id, jstring name, jint index_field, jint order, jlong link_n, jlong access_id) { const char *lName; herr_t status; H5O_info_t infobuf; jvalue args[12]; jobject hdrinfobuf; jobject ihinfobuf1; jobject ihinfobuf2; jobject ret_obj = NULL; PIN_JAVA_STRING(name, lName); if (lName != NULL) { status = H5Oget_info_by_idx((hid_t)loc_id, lName, (H5_index_t)index_field, (H5_iter_order_t)order, (hsize_t)link_n, &infobuf, (hid_t)access_id); UNPIN_JAVA_STRING(name, lName); if (status < 0) { h5libraryError(env); } /* end if */ else { args[0].i = (jint)infobuf.hdr.version; args[1].i = (jint)infobuf.hdr.nmesgs; args[2].i = (jint)infobuf.hdr.nchunks; args[3].i = (jint)infobuf.hdr.flags; args[4].j = (jlong)infobuf.hdr.space.total; args[5].j = (jlong)infobuf.hdr.space.meta; args[6].j = (jlong)infobuf.hdr.space.mesg; args[7].j = (jlong)infobuf.hdr.space.free; args[8].j = (jlong)infobuf.hdr.mesg.present; args[9].j = (jlong)infobuf.hdr.mesg.shared; CALL_CONSTRUCTOR("hdf/hdf5lib/structs/H5O_hdr_info_t", "(IIIIJJJJJJ)V", args); hdrinfobuf = ret_obj; args[0].j = (jlong)infobuf.meta_size.obj.index_size; args[1].j = (jlong)infobuf.meta_size.obj.heap_size; CALL_CONSTRUCTOR("hdf/hdf5lib/structs/H5_ih_info_t", "(JJ)V", args); ihinfobuf1 = ret_obj; args[0].j = (jlong)infobuf.meta_size.attr.index_size; args[1].j = (jlong)infobuf.meta_size.attr.heap_size; CALL_CONSTRUCTOR("hdf/hdf5lib/structs/H5_ih_info_t", "(JJ)V", args); ihinfobuf2 = ret_obj; args[0].j = (jlong)infobuf.fileno; args[1].j = (jlong)infobuf.addr; args[2].i = infobuf.type; args[3].i = (jint)infobuf.rc; args[4].j = (jlong)infobuf.num_attrs; args[5].j = infobuf.atime; args[6].j = infobuf.mtime; args[7].j = infobuf.ctime; args[8].j = infobuf.btime; args[9].l = hdrinfobuf; args[10].l = ihinfobuf1; args[11].l = ihinfobuf2; CALL_CONSTRUCTOR("hdf/hdf5lib/structs/H5O_info_t", "(JJIIJJJJJLhdf/hdf5lib/structs/H5O_hdr_info_t;Lhdf/hdf5lib/structs/H5_ih_info_t;Lhdf/hdf5lib/structs/H5_ih_info_t;)V", args); } } return ret_obj; } /* end Java_hdf_hdf5lib_H5_H5Oget_1info_1by_1idx */