H5Lprivate.h

00001 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
00002  * Copyright by The HDF Group.                                               *
00003  * Copyright by the Board of Trustees of the University of Illinois.         *
00004  * All rights reserved.                                                      *
00005  *                                                                           *
00006  * This file is part of HDF5.  The full HDF5 copyright notice, including     *
00007  * terms governing use, modification, and redistribution, is contained in    *
00008  * the files COPYING and Copyright.html.  COPYING can be found at the root   *
00009  * of the source code distribution tree; Copyright.html can be found at the  *
00010  * root level of an installed copy of the electronic HDF5 document set and   *
00011  * is linked from the top-level documents page.  It can also be found at     *
00012  * http://hdfgroup.org/HDF5/doc/Copyright.html.  If you do not have          *
00013  * access to either file, you may request a copy from help@hdfgroup.org.     *
00014  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
00015 
00016 /*
00017  * This file contains private information about the H5L module
00018  * for dealing with links in an HDF5 file.
00019  */
00020 #ifndef _H5Lprivate_H
00021 #define _H5Lprivate_H
00022 
00023 /* Include package's public header */
00024 #include "H5Lpublic.h"
00025 
00026 /* Private headers needed by this file */
00027 #include "H5Gprivate.h"         /* Groups                               */
00028 #include "H5Oprivate.h"         /* Object headers                       */
00029 
00030 
00031 /**************************/
00032 /* Library Private Macros */
00033 /**************************/
00034 
00035 /* Default number of soft links to traverse */
00036 #define H5L_NUM_LINKS   16
00037 
00038 /* ========  Link creation property names ======== */
00039 #define H5L_CRT_INTERMEDIATE_GROUP_NAME         "intermediate_group" /* Create intermediate groups flag */
00040 
00041 /* ========  Link access property names ======== */
00042 #define H5L_ACS_NLINKS_NAME        "max soft links"         /* Number of soft links to traverse */
00043 #define H5L_ACS_ELINK_PREFIX_NAME  "external link prefix"   /* External link prefix */
00044 #define H5L_ACS_ELINK_FAPL_NAME    "external link fapl"     /* file access property list for external link access */
00045 #define H5L_ACS_ELINK_FLAGS_NAME   "external link flags"    /* file access flags for external link traversal */
00046 #define H5L_ACS_ELINK_CB_NAME      "external link callback" /*  callback function for external link traversal */
00047 
00048 
00049 /****************************/
00050 /* Library Private Typedefs */
00051 /****************************/
00052 
00053 /* Structure for external link traversal callback property */
00054 typedef struct H5L_elink_cb_t {
00055     H5L_elink_traverse_t      func;
00056     void                      *user_data;
00057 } H5L_elink_cb_t;
00058 
00059 
00060 /*****************************/
00061 /* Library Private Variables */
00062 /*****************************/
00063 
00064 
00065 /******************************/
00066 /* Library Private Prototypes */
00067 /******************************/
00068 
00069 /* General operations on links */
00070 H5_DLL herr_t H5L_init(void);
00071 H5_DLL herr_t H5L_link(const H5G_loc_t *new_loc, const char *new_name,
00072     H5G_loc_t *obj_loc, hid_t lcpl_id, hid_t lapl_id, hid_t dxpl_id);
00073 H5_DLL herr_t H5L_link_object(const H5G_loc_t *new_loc, const char *new_name,
00074     H5O_obj_create_t *ocrt_info, hid_t lcpl_id, hid_t lapl_id, hid_t dxpl_id);
00075 H5_DLL herr_t H5L_create_hard(H5G_loc_t *cur_loc, const char *cur_name,
00076     const H5G_loc_t *link_loc, const char *link_name, hid_t lcpl_id,
00077     hid_t lapl_id, hid_t dxpl_id);
00078 H5_DLL herr_t H5L_create_soft(const char *target_path, const H5G_loc_t *cur_loc,
00079     const char *cur_name, hid_t lcpl_id, hid_t lapl_id, hid_t dxpl_id);
00080 H5_DLL hid_t H5L_get_default_lcpl(void);
00081 H5_DLL herr_t H5L_move(H5G_loc_t *src_loc, const char *src_name,
00082     H5G_loc_t *dst_loc, const char *dst_name, hbool_t copy_flag,
00083     hid_t lcpl_id, hid_t lapl_id, hid_t dxpl_id);
00084 H5_DLL herr_t H5L_get_info(const H5G_loc_t *loc, const char *name,
00085     H5L_info_t *linkbuf/*out*/, hid_t lapl_id, hid_t dxpl_id);
00086 H5_DLL herr_t H5L_delete(H5G_loc_t *loc, const char *name, hid_t lapl_id,
00087     hid_t dxpl_id);
00088 H5_DLL herr_t H5L_get_val(H5G_loc_t *loc, const char *name, void *buf/*out*/,
00089     size_t size, hid_t lapl_id, hid_t dxpl_id);
00090 H5_DLL herr_t H5L_register_external(void);
00091 
00092 /* User-defined link functions */
00093 H5_DLL herr_t H5L_register(const H5L_class_t *cls);
00094 H5_DLL herr_t H5L_unregister(H5L_type_t id);
00095 H5_DLL const H5L_class_t *H5L_find_class(H5L_type_t id);
00096 
00097 #endif /* _H5Lprivate_H */
00098