Introducing HandlerConfig class to give handlers config values they need
Tento commit je obsažen v:
20
config.h
20
config.h
@@ -7,8 +7,10 @@
|
||||
#include "permissions.h"
|
||||
#include "utils.h"
|
||||
|
||||
class WikiGeneralConfig
|
||||
/* Stuff handlers/ (may) need to know */
|
||||
struct HandlerConfig
|
||||
{
|
||||
Permissions anon_permissions;
|
||||
std::string wikiname;
|
||||
std::string anon_username;
|
||||
int max_pagename_length;
|
||||
@@ -72,29 +74,21 @@ class Config
|
||||
uint64_t optional(const std::string &key, uint64_t defaultvalue);
|
||||
|
||||
public:
|
||||
ConfigUrls urls;
|
||||
ConfigVariableResolver configVarResolver;
|
||||
|
||||
Config(const std::map<std::string, std::string> &map);
|
||||
|
||||
// TODO: these could be references!?
|
||||
std::string wikiname;
|
||||
ConfigUrls urls;
|
||||
ConfigVariableResolver configVarResolver;
|
||||
HandlerConfig handlersConfig;
|
||||
|
||||
std::string wikipath;
|
||||
std::string templatepath;
|
||||
std::string templateprefix;
|
||||
std::string logfile;
|
||||
std::string anon_username;
|
||||
|
||||
std::string connectionstring;
|
||||
|
||||
int query_limit;
|
||||
int session_max_lifetime;
|
||||
int max_pagename_length;
|
||||
int threadscount;
|
||||
|
||||
uint64_t max_payload_length;
|
||||
|
||||
Permissions anon_permissions;
|
||||
};
|
||||
|
||||
class ConfigReader
|
||||
|
Odkázat v novém úkolu
Zablokovat Uživatele