Let's make (git) history!

This commit is contained in:
2018-11-03 17:12:20 +01:00
當前提交 3bfebfe8a8
共有 212 個文件被更改,包括 11970 次插入0 次删除

36
requestworker.h Normal file
查看文件

@@ -0,0 +1,36 @@
#ifndef REQUESTWORKER_H
#define REQUESTWORKER_H
#include "request.h"
#include "response.h"
#include "session.h"
#include "template.h"
#include "database/database.h"
#include "urlprovider.h"
#include "database/sessiondao.h"
#include "cache/fscache.h"
class RequestWorker
{
Database *db;
Template *templ;
UrlProvider *urlProvider;
ICache *cache;
std::unique_ptr<SessionDao> sessionDao;
private:
Session retrieveSession(std::string token) const;
public:
RequestWorker(Database &db, Template &templ, UrlProvider &provider, ICache &cache)
{
this->db = &db;
this->templ = &templ;
this->urlProvider = &provider;
this->sessionDao = db.createSessionDao();
this->cache = &cache;
}
Response processRequest(const Request &r);
};
#endif // REQUESTWORKER_H