netcdf-c/oc2/occonstraints.h
dmh f423f27693 Sync with oc project.
This supports better authorization
handling for DAP requests, especially redirection
based authorization. I also added a new test case
ncdap_tests/testauth.sh.

Specifically, suppose I have a netrc file /tmp/netrc
containing this.
    machine uat.urs.earthdata.nasa.gov login xxxxxx password yyyyyy
Also suppose I have a .ocrc file containing these lines
    HTTP.COOKIEJAR=/tmp/cookies
    HTTP.NETRC=/tmp/netrc
Assume that .ocrc is in the local directory or HOME.

Then this command should work (assuming a valid login and password).
    ncdump -h "https://54.86.135.31/opendap/data/nc/fnoc1.nc"
2014-12-24 10:22:47 -07:00

40 lines
1.1 KiB
C

/* Copyright 2009, UCAR/Unidata and OPeNDAP, Inc.
See the COPYRIGHT file for more information. */
#ifndef OCCONSTRAINTS_H
#define OCCONSTRAINTS_H 1
/*! Specifies an OCslice. */
typedef struct OCslice {
size_t first;
size_t count;
size_t stride;
size_t stop; /* == first + count */
size_t declsize; /* from defining dimension, if any.*/
} OCslice;
/*! Specifies a form of path where each element can have a set of associated indices */
typedef struct OCpath {
OClist* names;
OClist* indexsets; /* oclist<oclist<Slice>> */
} OCpath;
/*! Specifies a ProjectionClause. */
typedef struct OCprojectionclause {
char* target; /* "variable name" as mentioned in the projection */
OClist* indexsets; /* oclist<oclist<OCslice>> */
struct OCnode* node; /* node with name matching target, if any. */
int gridconstraint; /* used only for testing purposes */
} OCprojectionclause;
/*! Selection is the node type for selection expression trees */
typedef struct OCselectionclause {
int op;
char* value;
struct OCselectionclause* lhs;
OClist* rhs;
} OCselectionclause;
#endif /*OCCONSTRAINTS_H*/