20 #pragma warning(disable:4355) // 'this' : used in base member initializer list 107 class cWebTabCallback
abstract 111 virtual ~cWebTabCallback() {}
141 m_UrlPath(a_UrlPath),
142 m_PluginName(a_PluginName),
143 m_Callback(a_Callback)
165 bool LoadLoginPage(
void);
172 void RemoveAllPluginWebTabs(
const AString & a_PluginName);
193 static AString GetContentTypeFromFileExt(
const AString & a_FileExtension);
209 std::shared_ptr<cWebTabCallback> a_Callback
215 bool DelWebTab(
const AString & a_UrlPath);
261 bool LoadIniFile(
void);
283 #if defined(_MSC_VER)
AString URL
The entire URL presented to the HTTP server.
AString StringsConcat(const AStringVector &a_Strings, char a_Separator)
Concatenates the specified strings into a single string, separated by the specified separator charact...
StringStringMap PostParams
Parameters posted as a part of a form - either in the URL (GET method) or in the body (POST method) ...
Provides storage for an incoming HTTP request.
std::map< std::string, HTTPFormData > FormDataMap
cWebTab(const AString &a_Title, const AString &a_UrlPath, const AString &a_PluginName, std::shared_ptr< cWebTabCallback > a_Callback)
std::map< std::string, std::string > StringStringMap
Encapsulates a Lua state and provides some syntactic sugar for common operations. ...
AString Username
Name of the logged-in user.
cIniFile m_IniFile
The webadmin.ini file, used for the settings and allowed logins.
Container for a single web tab.
AString Method
HTTP method used for the request ("GET", "POST" etc.)
AString GetPorts(void) const
Returns the list of ports on which the webadmin is configured to listen.
std::vector< AString > AStringVector
cWebTabPtrs GetAllWebTabs(void)
Returns a copy of all the registered web tabs.
cWebTabPtrs m_WebTabs
All registered WebTab handlers.
cLuaState m_TemplateScript
The Lua template script to provide templates.
cHTTPServer m_HTTPServer
The HTTP server which provides the underlying HTTP parsing, serialization and events.
std::shared_ptr< cWebTab > cWebTabPtr
std::shared_ptr< cWebTabCallback > m_Callback
FormDataMap FormData
Same as PostParams.
AString Path
The Path part of the request's URL (excluding GET params).
std::vector< cWebTabPtr > cWebTabPtrs
bool m_IsRunning
Set to true if Start() succeeds in starting the server, reset back to false in Stop().
AString m_LoginPage
The HTML page that provides the login.
bool m_IsInitialized
Set to true if Init() succeeds and the webadmin isn't to be disabled.
StringStringMap Params
Parameters given in the URL, after the questionmark.
cCriticalSection m_CS
Protects m_WebTabs, m_TemplateScript, m_LoginTemplate and m_IniFile against multithreaded access...
AStringVector m_Ports
The ports on which the webadmin is running.