File: ncurlmodel.h

package info (click to toggle)
netcdf-parallel 1%3A4.7.4-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 105,352 kB
  • sloc: ansic: 229,114; sh: 11,180; yacc: 2,561; makefile: 1,390; lex: 1,173; xml: 173; awk: 2
file content (55 lines) | stat: -rw-r--r-- 1,678 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
/* Copyright 2018-2018 University Corporation for Atmospheric
   Research/Unidata. */

/**
 * Header file for dmode.c
 * @author Dennis Heimbigner
 */

#ifndef NCURLMODEL_H
#define NCURLMODEL_H

/* Define the io handler to be used to do lowest level
   access. This is above the libcurl level.
   Note that cases (DAP2,DAP4) where the implementation is 1-1
   with the iosp are not included.
*/
#define NC_IOSP_ZARR (1)

/* Track the information from a URL that will help us
   infer how to access the data pointed to by that URL.
*/
typedef struct NCmode {
    int format; /* NC_FORMAT_XXX value */
    int implementation; /* NC_FORMATX_XXX value */
    int iosp; /* NC_IOSP_XXX value (above) */
} NCmode;

/* return 1 if path looks like a url; 0 otherwise */
EXTERNL int NC_testurl(const char* path);

/*
Return an NC_FORMATX_... value.
Assumes that the path is known to be a url.
*/
EXTERNL int NC_urlmodel(const char* path, int mode, char** newurl, NCmode* model);

/**
 * Provide a hidden interface to allow utilities
 * to check if a given path name is really an ncdap3 url.
 * If no, put null in basenamep, else put basename of the url
 * minus any extension into basenamep; caller frees.
 * Return 1 if it looks like a url, 0 otherwise.
 */
EXTERNL int nc__testurl(const char* path, char** basenamep);

/* allow access url parse and params without exposing nc_url.h */
EXTERNL int NCDAP_urlparse(const char* s, void** dapurl);
EXTERNL void NCDAP_urlfree(void* dapurl);
EXTERNL const char* NCDAP_urllookup(void* dapurl, const char* param);

/* Ping a specific server */
EXTERNL int NCDAP2_ping(const char*);
EXTERNL int NCDAP4_ping(const char*);

#endif /*NCURLMODEL_H*/