netcdf-c/libcdmr/nccr.h

88 lines
2.3 KiB
C
Raw Normal View History

2010-12-16 05:45:05 +08:00
/*********************************************************************
* Copyright 2010, UCAR/Unidata
* See netcdf/COPYRIGHT file for copying and redistribution conditions.
* $Id$
* $Header$
*********************************************************************/
#ifndef NCCR_H
#define NCCR_H
2011-04-17 04:56:36 +08:00
/**************************************************/
/*Forwards*/
struct NC;
2011-06-11 02:47:26 +08:00
struct NC_URI;
2011-04-17 04:56:36 +08:00
struct NClist;
2011-06-11 02:47:26 +08:00
struct Data;
2010-12-16 05:45:05 +08:00
/**************************************************/
/* The NCCR structure is subtype of NC_INFO_TYPE_T (libsrc4) */
typedef struct NCCDMR {
2011-04-17 04:56:36 +08:00
struct NC* controller; /* Parent instance of NCDAP3 or NCDAP4 */
2010-12-16 05:45:05 +08:00
char* urltext; /* as given to open()*/
2011-06-11 02:47:26 +08:00
struct NC_URI* uri;
2010-12-16 05:45:05 +08:00
/* Track some flags */
int controls;
2011-06-11 02:47:26 +08:00
struct CCEconstraint* urlconstraint; /* constraint from url */
struct Header* ncstreamhdr; /* Parsed result */
struct Data* datahdr; /* Parsed result */
struct NClist* allvariables; /* set of all variables */
struct NClist* variables; /* set of visible variables */
/* provide a collection of the ncStream nodes*/
struct NClist* streamnodes;
/* Store curl state info */
2010-12-16 05:45:05 +08:00
struct NCCURLSTATE {
CURL* curl;
int curlflags;
int compress;
int verbose;
int followlocation;
int maxredirs;
char *host;
int port;
char *username;
char *password;
char* useragent;
char* cookiejar;
char* cookiefile;
int validate;
char* certificate;
char* key;
char* keypasswd;
char* cainfo; /* certificate authority */
char* capath;
} curl;
} NCCDMR;
typedef struct NCCURLSTATE NCCURLSTATE;
2011-09-17 02:36:08 +08:00
#ifdef NOTUSED
2010-12-16 05:45:05 +08:00
typedef struct NCCR {
NC_FILE_INFO_T info;
NCCDMR* cdmr;
} NCCR;
2011-09-17 02:36:08 +08:00
#endif
2010-12-16 05:45:05 +08:00
/**************************************************/
/* Define various flags (powers of 2)*/
2011-06-11 02:47:26 +08:00
#define SHOWFETCH (0x1)
#define BIGENDIAN (0x2)
#define DATAVARS (0x4)
2010-12-16 05:45:05 +08:00
/**************************************************/
/* Give PSEUDOFILE a value */
#define PSEUDOFILE "/tmp/pseudofileXXXXXX"
#define nullstring(s) (s==NULL?"(null)":s)
/**********************************************************/
2011-04-17 04:56:36 +08:00
/* Forwards */
struct Header;
struct NClist;
2010-12-16 05:45:05 +08:00
2011-04-17 04:56:36 +08:00
extern int nccrceparse(char*, int, struct NClist**, struct NClist**, char**);
2010-12-16 05:45:05 +08:00
/**********************************************************/
#endif /*NCCR_H*/