summaryrefslogtreecommitdiffstats
path: root/src/H5Plcpl.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/H5Plcpl.c')
-rw-r--r--src/H5Plcpl.c75
1 files changed, 64 insertions, 11 deletions
diff --git a/src/H5Plcpl.c b/src/H5Plcpl.c
index 6508a82..16be52a 100644
--- a/src/H5Plcpl.c
+++ b/src/H5Plcpl.c
@@ -13,11 +13,9 @@
/*-------------------------------------------------------------------------
*
- * Created: H5Plcpl.c
- * May 8 2006
- * Peter Cao <xcao@ncsa.uiuc.edu>
+ * Created: H5Plcpl.c
*
- * Purpose: Link creation property list class routines
+ * Purpose: Link creation property list class routines
*
*-------------------------------------------------------------------------
*/
@@ -32,11 +30,11 @@
/***********/
/* Headers */
/***********/
-#include "H5private.h" /* Generic Functions */
-#include "H5Eprivate.h" /* Error handling */
-#include "H5Iprivate.h" /* IDs */
-#include "H5Lprivate.h" /* Links */
-#include "H5Ppkg.h" /* Property lists */
+#include "H5private.h" /* Generic Functions */
+#include "H5Eprivate.h" /* Error handling */
+#include "H5Iprivate.h" /* IDs */
+#include "H5Lprivate.h" /* Links */
+#include "H5Ppkg.h" /* Property lists */
/****************/
@@ -50,6 +48,31 @@
#define H5L_CRT_INTERMEDIATE_GROUP_ENC H5P__encode_unsigned
#define H5L_CRT_INTERMEDIATE_GROUP_DEC H5P__decode_unsigned
+/* ======== VOL specific properties ========= */
+/* Definitions for target object ID */
+#define H5L_CRT_TARGET_SIZE sizeof(void *)
+#define H5L_CRT_TARGET_DEF NULL
+
+/* Definitions for Location params */
+#define H5L_CRT_LOCATION_SIZE sizeof(H5VL_loc_params_t)
+#define H5L_CRT_LOCATION_DEF {H5I_BADID, H5VL_OBJECT_BY_SELF, {{HADDR_UNDEF}}}
+
+/* Definitions for target object NAME */
+#define H5L_CRT_TARGET_NAME_SIZE sizeof(char *)
+#define H5L_CRT_TARGET_NAME_DEF NULL
+
+/* Definitions for link type */
+#define H5L_CRT_LINK_TYPE_SIZE sizeof(link_type)
+#define H5L_CRT_LINK_TYPE_DEF H5L_TYPE_ERROR
+
+/* Definitions for UDATA */
+#define H5L_CRT_UDATA_SIZE sizeof(void *)
+#define H5L_CRT_UDATA_DEF NULL
+
+/* Definitions for UDATA_SIZE */
+#define H5L_CRT_UDATA_SIZE_SIZE sizeof(size_t)
+#define H5L_CRT_UDATA_SIZE_DEF 0
+
/******************/
/* Local Typedefs */
/******************/
@@ -120,16 +143,46 @@ static const unsigned H5L_def_intmd_group_g = H5L_CRT_INTERMEDIATE_GROUP_DEF;
herr_t
H5P_lcrt_reg_prop(H5P_genclass_t *pclass)
{
- herr_t ret_value = SUCCEED; /* Return value */
+ void* target = H5L_CRT_TARGET_DEF;
+ H5VL_loc_params_t loc_params = H5L_CRT_LOCATION_DEF;
+ char *target_name = H5L_CRT_TARGET_NAME_DEF;
+ H5L_type_t link_type = H5L_CRT_LINK_TYPE_DEF;
+ void *udata = H5L_CRT_UDATA_DEF;
+ size_t udata_size = H5L_CRT_UDATA_SIZE_DEF;
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
/* Register create intermediate groups property */
- if(H5P_register_real(pclass, H5L_CRT_INTERMEDIATE_GROUP_NAME, H5L_CRT_INTERMEDIATE_GROUP_SIZE, &H5L_def_intmd_group_g,
+ if(H5P__register_real(pclass, H5L_CRT_INTERMEDIATE_GROUP_NAME, H5L_CRT_INTERMEDIATE_GROUP_SIZE, &H5L_def_intmd_group_g,
NULL, NULL, NULL, H5L_CRT_INTERMEDIATE_GROUP_ENC, H5L_CRT_INTERMEDIATE_GROUP_DEC,
NULL, NULL, NULL, NULL) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class")
+ if(H5P__register_real(pclass, H5VL_PROP_LINK_TARGET, H5L_CRT_TARGET_SIZE, &target,
+ NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL) < 0)
+ HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class")
+
+ if(H5P__register_real(pclass, H5VL_PROP_LINK_TARGET_LOC_PARAMS, H5L_CRT_LOCATION_SIZE, &loc_params,
+ NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL) < 0)
+ HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class")
+
+ if(H5P__register_real(pclass, H5VL_PROP_LINK_TARGET_NAME, H5L_CRT_TARGET_NAME_SIZE, &target_name,
+ NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL) < 0)
+ HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class")
+
+ if(H5P__register_real(pclass, H5VL_PROP_LINK_TYPE, H5L_CRT_LINK_TYPE_SIZE, &link_type,
+ NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL) < 0)
+ HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class")
+
+ if(H5P__register_real(pclass, H5VL_PROP_LINK_UDATA, H5L_CRT_UDATA_SIZE, &udata,
+ NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL) < 0)
+ HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class")
+
+ if(H5P__register_real(pclass, H5VL_PROP_LINK_UDATA_SIZE, H5L_CRT_UDATA_SIZE_SIZE, &udata_size,
+ NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL) < 0)
+ HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class")
+
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5P_lcrt_reg_prop() */