diff options
author | cedeel@gmail.com <cedeel@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6> | 2012-06-14 15:06:06 +0200 |
---|---|---|
committer | cedeel@gmail.com <cedeel@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6> | 2012-06-14 15:06:06 +0200 |
commit | 92c59963f82f81aa3202657e7fdbb2592924ede3 (patch) | |
tree | b7eb2474528a4998fa102e3ec9119b908cee08b4 /source/cWebAdmin.h | |
parent | Added HOOK_WEATHER_CHANGE. (diff) | |
download | cuberite-92c59963f82f81aa3202657e7fdbb2592924ede3.tar cuberite-92c59963f82f81aa3202657e7fdbb2592924ede3.tar.gz cuberite-92c59963f82f81aa3202657e7fdbb2592924ede3.tar.bz2 cuberite-92c59963f82f81aa3202657e7fdbb2592924ede3.tar.lz cuberite-92c59963f82f81aa3202657e7fdbb2592924ede3.tar.xz cuberite-92c59963f82f81aa3202657e7fdbb2592924ede3.tar.zst cuberite-92c59963f82f81aa3202657e7fdbb2592924ede3.zip |
Diffstat (limited to 'source/cWebAdmin.h')
-rw-r--r-- | source/cWebAdmin.h | 136 |
1 files changed, 68 insertions, 68 deletions
diff --git a/source/cWebAdmin.h b/source/cWebAdmin.h index 3be9426ad..9eca47105 100644 --- a/source/cWebAdmin.h +++ b/source/cWebAdmin.h @@ -1,69 +1,69 @@ -#pragma once
-
-#include "../WebServer/WebServer.h"
-#include "cSocket.h"
-
-class cStringMap;
-
-struct HTTPFormData //tolua_export
-{ //tolua_export
- std::string Name; //tolua_export
- std::string Value; //tolua_export
- std::string Type; //tolua_export
-};//tolua_export
-
-struct HTTPRequest //tolua_export
-{ //tolua_export
- typedef std::map< std::string, std::string > StringStringMap;
- typedef std::map< std::string, HTTPFormData > FormDataMap;
- std::string Method; //tolua_export
- std::string Path; //tolua_export
- StringStringMap Params; // >> EXPORTED IN MANUALBINDINGS <<
- StringStringMap PostParams; // >> EXPORTED IN MANUALBINDINGS <<
- std::string Username; //tolua_export
- FormDataMap FormData; // >> EXPORTED IN MANUALBINDINGS <<
-}; //tolua_export
-
-struct lua_State;
-class cEvent;
-class cIniFile;
-class cWebPlugin;
-class cWebAdmin
-{
-public:
- cWebAdmin( int a_Port = 8080 );
- ~cWebAdmin();
-
- bool Init( int a_Port );
-
- void AddPlugin( cWebPlugin* a_Plugin );
- void RemovePlugin( cWebPlugin* a_Plugin );
-
- typedef std::list< cWebPlugin* > PluginList;
- PluginList GetPlugins() { return m_Plugins; }
-
- static void Request_Handler(webserver::http_request* r);
-
- void RemovePlugin( lua_State* L );
-private:
-
-#ifdef _WIN32
- static DWORD WINAPI ListenThread(LPVOID lpParam);
-#else
- static void *ListenThread( void *lpParam );
-#endif
-
- std::string GetTemplate();
-
- int m_Port;
-
- bool m_bConnected;
- cSocket m_ListenSocket;
-
- cIniFile* m_IniFile;
- PluginList m_Plugins;
-
- cEvent* m_Event;
-
- webserver* m_WebServer;
+#pragma once + +#include "../WebServer/WebServer.h" +#include "cSocket.h" + +class cStringMap; + +struct HTTPFormData //tolua_export +{ //tolua_export + std::string Name; //tolua_export + std::string Value; //tolua_export + std::string Type; //tolua_export +};//tolua_export + +struct HTTPRequest //tolua_export +{ //tolua_export + typedef std::map< std::string, std::string > StringStringMap; + typedef std::map< std::string, HTTPFormData > FormDataMap; + std::string Method; //tolua_export + std::string Path; //tolua_export + StringStringMap Params; // >> EXPORTED IN MANUALBINDINGS << + StringStringMap PostParams; // >> EXPORTED IN MANUALBINDINGS << + std::string Username; //tolua_export + FormDataMap FormData; // >> EXPORTED IN MANUALBINDINGS << +}; //tolua_export + +struct lua_State; +class cEvent; +class cIniFile; +class cWebPlugin; +class cWebAdmin +{ +public: + cWebAdmin( int a_Port = 8080 ); + ~cWebAdmin(); + + bool Init( int a_Port ); + + void AddPlugin( cWebPlugin* a_Plugin ); + void RemovePlugin( cWebPlugin* a_Plugin ); + + typedef std::list< cWebPlugin* > PluginList; + PluginList GetPlugins() { return m_Plugins; } + + static void Request_Handler(webserver::http_request* r); + + void RemovePlugin( lua_State* L ); +private: + +#ifdef _WIN32 + static DWORD WINAPI ListenThread(LPVOID lpParam); +#else + static void *ListenThread( void *lpParam ); +#endif + + std::string GetTemplate(); + + int m_Port; + + bool m_bConnected; + cSocket m_ListenSocket; + + cIniFile* m_IniFile; + PluginList m_Plugins; + + cEvent* m_Event; + + webserver* m_WebServer; };
\ No newline at end of file |