1 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
2  * Copyright by The HDF Group.                                               *
3  * Copyright by the Board of Trustees of the University of Illinois.         *
4  * All rights reserved.                                                      *
5  *                                                                           *
6  * This file is part of HDF5.  The full HDF5 copyright notice, including     *
7  * terms governing use, modification, and redistribution, is contained in    *
8  * the COPYING file, which can be found at the root of the source code       *
9  * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.  *
10  * If you do not have access to either file, you may request a copy from     *
11  * help@hdfgroup.org.                                                        *
12  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
13 
14 /*
15  * This file contains private information about the H5L module
16  * for dealing with links in an HDF5 file.
17  */
18 #ifndef _H5Lprivate_H
19 #define _H5Lprivate_H
20 
21 /* Include package's public header */
22 #include "H5Lpublic.h"
23 
24 /* Private headers needed by this file */
25 #include "H5Gprivate.h"		/* Groups				*/
26 #include "H5Oprivate.h"		/* Object headers			*/
27 
28 
29 /**************************/
30 /* Library Private Macros */
31 /**************************/
32 
33 /* Default number of soft links to traverse */
34 #define H5L_NUM_LINKS   16
35 
36 /* ========  Link creation property names ======== */
37 #define H5L_CRT_INTERMEDIATE_GROUP_NAME         "intermediate_group" /* Create intermediate groups flag */
38 
39 /* ========  Link access property names ======== */
40 #define H5L_ACS_NLINKS_NAME        "max soft links"         /* Number of soft links to traverse */
41 #define H5L_ACS_ELINK_PREFIX_NAME  "external link prefix"   /* External link prefix */
42 #define H5L_ACS_ELINK_FAPL_NAME    "external link fapl"     /* file access property list for external link access */
43 #define H5L_ACS_ELINK_FLAGS_NAME   "external link flags"    /* file access flags for external link traversal */
44 #define H5L_ACS_ELINK_CB_NAME      "external link callback" /*  callback function for external link traversal */
45 
46 
47 /****************************/
48 /* Library Private Typedefs */
49 /****************************/
50 
51 /* Structure for external link traversal callback property */
52 typedef struct H5L_elink_cb_t {
53     H5L_elink_traverse_t      func;
54     void                      *user_data;
55 } H5L_elink_cb_t;
56 
57 
58 /*****************************/
59 /* Library Private Variables */
60 /*****************************/
61 
62 
63 /******************************/
64 /* Library Private Prototypes */
65 /******************************/
66 
67 /* General operations on links */
68 H5_DLL herr_t H5L_init(void);
69 H5_DLL herr_t H5L_link(const H5G_loc_t *new_loc, const char *new_name,
70     H5G_loc_t *obj_loc, hid_t lcpl_id, hid_t lapl_id, hid_t dxpl_id);
71 H5_DLL herr_t H5L_link_object(const H5G_loc_t *new_loc, const char *new_name,
72     H5O_obj_create_t *ocrt_info, hid_t lcpl_id, hid_t lapl_id, hid_t dxpl_id);
73 H5_DLL herr_t H5L_create_hard(H5G_loc_t *cur_loc, const char *cur_name,
74     const H5G_loc_t *link_loc, const char *link_name, hid_t lcpl_id,
75     hid_t lapl_id, hid_t dxpl_id);
76 H5_DLL herr_t H5L_create_soft(const char *target_path, const H5G_loc_t *cur_loc,
77     const char *cur_name, hid_t lcpl_id, hid_t lapl_id, hid_t dxpl_id);
78 H5_DLL hid_t H5L_get_default_lcpl(void);
79 H5_DLL herr_t H5L_move(H5G_loc_t *src_loc, const char *src_name,
80     H5G_loc_t *dst_loc, const char *dst_name, hbool_t copy_flag,
81     hid_t lcpl_id, hid_t lapl_id, hid_t dxpl_id);
82 H5_DLL htri_t H5L_exists_tolerant(const H5G_loc_t *loc, const char *name, hid_t lapl_id,
83     hid_t dxpl_id);
84 H5_DLL herr_t H5L_get_info(const H5G_loc_t *loc, const char *name,
85     H5L_info_t *linkbuf/*out*/, hid_t lapl_id, hid_t dxpl_id);
86 H5_DLL herr_t H5L_delete(H5G_loc_t *loc, const char *name, hid_t lapl_id,
87     hid_t dxpl_id);
88 H5_DLL herr_t H5L_get_val(H5G_loc_t *loc, const char *name, void *buf/*out*/,
89     size_t size, hid_t lapl_id, hid_t dxpl_id);
90 H5_DLL herr_t H5L_register_external(void);
91 
92 /* User-defined link functions */
93 H5_DLL herr_t H5L_register(const H5L_class_t *cls);
94 H5_DLL herr_t H5L_unregister(H5L_type_t id);
95 H5_DLL const H5L_class_t *H5L_find_class(H5L_type_t id);
96 
97 #endif /* _H5Lprivate_H */
98 
99