1 /* Copyright 2018, UCAR/Unidata. See netcdf/COPYRIGHT file for copying
2  * and redistribution conditions. */
3 /**
4  * @file @internal This header file contains the prototypes for the
5  * HDF4 versions of the netCDF functions. This is part of the HDF4
6  * dispatch layer and this header should not be included by any file
7  * outside the libhdf4 directory.
8  *
9  * Ed Hartnett
10  */
11 #ifndef _HDF4DISPATCH_H
12 #define _HDF4DISPATCH_H
13 
14 #include "config.h"
15 #include "ncdispatch.h"
16 
17 /** This is the max number of dimensions for a HDF4 SD dataset (from
18  * HDF4 documentation). */
19 #define NC_MAX_HDF4_DIMS 32
20 
21 /* Stuff below is for hdf4 files. */
22 typedef struct NC_VAR_HDF4_INFO
23 {
24     int sdsid;
25     int hdf4_data_type;
26 } NC_VAR_HDF4_INFO_T;
27 
28 typedef struct NC_HDF4_FILE_INFO
29 {
30     int sdid;
31 } NC_HDF4_FILE_INFO_T;
32 
33 #if defined(__cplusplus)
34 extern "C" {
35 #endif
36 
37     extern int
38     NC_HDF4_open(const char *path, int mode, int basepe, size_t *chunksizehintp,
39                  void *parameters, const NC_Dispatch *, int);
40 
41     extern int
42     NC_HDF4_abort(int ncid);
43 
44     extern int
45     NC_HDF4_close(int ncid, void *ignore);
46 
47     extern int
48     NC_HDF4_inq_format(int ncid, int *formatp);
49 
50     extern int
51     NC_HDF4_inq_format_extended(int ncid, int *formatp, int *modep);
52 
53     extern int
54     NC_HDF4_get_vara(int ncid, int varid, const size_t *start, const size_t *count,
55                      void *value, nc_type);
56 
57 #if defined(__cplusplus)
58 }
59 #endif
60 
61 #endif /*_HDF4DISPATCH_H */
62