ocrc.h 847 B

123456789101112131415161718192021222324252627282930313233343536
  1. /*
  2. * rc.h
  3. *
  4. * Created on: Mar 5, 2009
  5. * Author: rikki
  6. */
  7. #ifndef RC_H_
  8. #define RC_H_
  9. /* Max .dodsrc line size */
  10. #define MAXRCLINESIZE 2048
  11. /* Max number of triples in a .dodsrc */
  12. #define MAXRCLINES 2048
  13. /* Create a triple store for (url,key,value) and sorted by url */
  14. /* Actual triple store */
  15. extern struct OCTriplestore {
  16. int ntriples;
  17. struct OCTriple {
  18. char url[MAXRCLINESIZE];
  19. char key[MAXRCLINESIZE];
  20. char value[MAXRCLINESIZE];
  21. } triples[MAXRCLINES];
  22. } *ocdodsrc;
  23. extern int ocdodsrc_read(char* basename,char *in_file_name);
  24. extern int ocdodsrc_process(OCstate* state);
  25. extern char* ocdodsrc_lookup(char* key, char* url);
  26. extern int occredentials_in_url(const char *url);
  27. extern int ocextract_credentials(const char *url, char **name, char **pw, char **result_url);
  28. #endif /* RC_H_ */