1
0
Fork 0
mirror of https://github.com/KingDuckZ/kamokan.git synced 2025-08-07 12:59:45 +00:00

Refactoring.

IncRedis is now held by Response, if requested by the base class.
Response objects know their names, and they use it to load
the html (soon to be mustache) data from disk.
Main only prepares a factory, the factory then instantiates
the actual Response.
The code now correctly serves index.cgi when the request is /.
Remove kakoune's safe_ptr from inside src and put an updated
one in lib/kakoune.
This commit is contained in:
King_DuckZ 2017-04-15 03:18:33 +01:00
parent 4bf8dfc29f
commit 680f13e1f6
19 changed files with 400 additions and 195 deletions

View file

@ -21,21 +21,16 @@
#include <string>
#include <boost/optional.hpp>
namespace redis {
class IncRedis;
} //namespace redis
namespace tawashi {
class SubmitPasteResponse : public Response {
public:
SubmitPasteResponse (redis::IncRedis& parRedis, const boost::string_ref& parBaseURI);
explicit SubmitPasteResponse (const IniFile& parIni);
private:
virtual void on_process() override;
virtual void on_send (std::ostream& parStream) override;
boost::optional<std::string> submit_to_redis (const std::string& parText) const;
redis::IncRedis& m_redis;
std::string m_error_message;
};
} //namespace tawashi