page_reply.h
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 #ifndef __LIBS_WEBVIEW_PAGE_REPLY_H_
00024 #define __LIBS_WEBVIEW_PAGE_REPLY_H_
00025
00026 #include <webview/reply.h>
00027
00028 namespace fawkes {
00029 #if 0
00030 }
00031 #endif
00032
00033 class WebPageHeaderGenerator;
00034 class WebPageFooterGenerator;
00035
00036 class WebPageReply : public StaticWebReply
00037 {
00038 public:
00039 WebPageReply(std::string title, std::string page = "");
00040
00041 virtual const std::string & body();
00042 virtual std::string::size_type body_length();
00043 virtual void pack() { pack("", 0, 0); }
00044 virtual void pack(std::string active_baseurl,
00045 WebPageHeaderGenerator *headergen,
00046 WebPageFooterGenerator *footergen);
00047
00048 protected:
00049 WebPageReply(response_code_t code);
00050
00051 protected:
00052
00053 std::string _title;
00054
00055 private:
00056 static const char *PAGE_HEADER;
00057 static const char *PAGE_FOOTER;
00058
00059 std::string __merged_body;
00060 };
00061
00062 }
00063
00064 #endif