libdap  Updated for version 3.20.6
libdap4 is an implementation of OPeNDAP's DAP protocol.
D4AsyncUtil.h
1 /*
2  * D4AsyncUtil.h
3  *
4  * Created on: Feb 18, 2014
5  * Author: ndp
6  */
7 
8 #ifndef D4ASYNCUTIL_H_
9 #define D4ASYNCUTIL_H_
10 
11 #include "XMLWriter.h"
12 
13 namespace libdap {
14 
15 
16 enum RejectReasonCode { TIME, UNAVAILABLE, PRIVILEGES, OTHER };
17 
18 
19 class D4AsyncUtil {
20 private:
21 #if 0
22  // Not used
23  string *d_stylesheet_ref;
24 #endif
25 
26 public:
27  D4AsyncUtil();
28  virtual ~D4AsyncUtil();
29 
30  const static string STYLESHEET_REFERENCE_KEY;
31 
32 
38  void writeD4AsyncRequired(XMLWriter &xml, long expectedDelay, long responseLifetime, string *stylesheet_ref=0);
39 
40 
46  void writeD4AsyncAccepted(XMLWriter &xml, long expectedDelay, long responseLifetime, string asyncResourceUrl, string *stylesheet_ref=0);
47 
53  void writeD4AsyncPending(XMLWriter &xml, string *stylesheet_ref=0);
54 
55 
61  void writeD4AsyncResponseGone(XMLWriter &xml, string *stylesheet_ref=0);
62 
68  void writeD4AsyncResponseRejected(XMLWriter &xml, RejectReasonCode code, string description, string *stylesheet_ref=0);
69  string getRejectReasonCodeString(RejectReasonCode code);
70 
76  void writeD2AsyncRequired(XMLWriter &xml, long expectedDelay, long responseLifetime);
77  void writeD2AsyncAccepted(XMLWriter &xml, long expectedDelay, long responseLifetime, string asyncResourceUrl);
78  void writeD2AsyncPending(XMLWriter &xml);
79  void writeD2AsyncResponseGone(XMLWriter &xml);
80  void writeD2AsyncResponseRejected(XMLWriter &xml, RejectReasonCode code, string description);
81 
82 
83 };
84 
85 } /* namespace libdap */
86 #endif /* D4ASYNCUTIL_H_ */
void writeD4AsyncPending(XMLWriter &xml, string *stylesheet_ref=0)
Write the DAP4 AsyncPending response. Write the DAP4 AsyncPending in XML form.
Definition: D4AsyncUtil.cc:178
void writeD2AsyncRequired(XMLWriter &xml, long expectedDelay, long responseLifetime)
Write the DAP2 AsyncRequired response . Write the DAP2 AsyncRequired in XML form. ...
Definition: D4AsyncUtil.cc:335
top level DAP object to house generic methods
Definition: AISConnect.cc:30
void writeD4AsyncRequired(XMLWriter &xml, long expectedDelay, long responseLifetime, string *stylesheet_ref=0)
Write the DAP4 AsyncRequired response. Print the AsyncRequired in XML form.
Definition: D4AsyncUtil.cc:34
void writeD4AsyncResponseRejected(XMLWriter &xml, RejectReasonCode code, string description, string *stylesheet_ref=0)
Write the DAP4 ResponseRejected response. Write the DAP4 AsyncRequired in XML form.
Definition: D4AsyncUtil.cc:256
void writeD4AsyncResponseGone(XMLWriter &xml, string *stylesheet_ref=0)
Write the DAP4 AsyncResponseGone response. Write the DAP4 AsyncRequired in XML form.
Definition: D4AsyncUtil.cc:217
void writeD4AsyncAccepted(XMLWriter &xml, long expectedDelay, long responseLifetime, string asyncResourceUrl, string *stylesheet_ref=0)
Write the DAP4 AsyncAccepted response. Write the AsyncAccepted in XML form.
Definition: D4AsyncUtil.cc:105