libdap
Updated for version 3.17.0
|
00001 /* 00002 * D4AsyncUtil.h 00003 * 00004 * Created on: Feb 18, 2014 00005 * Author: ndp 00006 */ 00007 00008 #ifndef D4ASYNCUTIL_H_ 00009 #define D4ASYNCUTIL_H_ 00010 00011 #include "XMLWriter.h" 00012 00013 namespace libdap { 00014 00015 00016 enum RejectReasonCode { TIME, UNAVAILABLE, PRIVILEGES, OTHER }; 00017 00018 00019 class D4AsyncUtil { 00020 private: 00021 #if 0 00022 // Not used 00023 string *d_stylesheet_ref; 00024 #endif 00025 00026 public: 00027 D4AsyncUtil(); 00028 virtual ~D4AsyncUtil(); 00029 00030 const static string STYLESHEET_REFERENCE_KEY; 00031 00032 00038 void writeD4AsyncRequired(XMLWriter &xml, long expectedDelay, long responseLifetime, string *stylesheet_ref=0); 00039 00040 00046 void writeD4AsyncAccepted(XMLWriter &xml, long expectedDelay, long responseLifetime, string asyncResourceUrl, string *stylesheet_ref=0); 00047 00053 void writeD4AsyncPending(XMLWriter &xml, string *stylesheet_ref=0); 00054 00055 00061 void writeD4AsyncResponseGone(XMLWriter &xml, string *stylesheet_ref=0); 00062 00068 void writeD4AsyncResponseRejected(XMLWriter &xml, RejectReasonCode code, string description, string *stylesheet_ref=0); 00069 string getRejectReasonCodeString(RejectReasonCode code); 00070 00076 void writeD2AsyncRequired(XMLWriter &xml, long expectedDelay, long responseLifetime); 00077 void writeD2AsyncAccepted(XMLWriter &xml, long expectedDelay, long responseLifetime, string asyncResourceUrl); 00078 void writeD2AsyncPending(XMLWriter &xml); 00079 void writeD2AsyncResponseGone(XMLWriter &xml); 00080 void writeD2AsyncResponseRejected(XMLWriter &xml, RejectReasonCode code, string description); 00081 00082 00083 }; 00084 00085 } /* namespace libdap */ 00086 #endif /* D4ASYNCUTIL_H_ */