From 968f41ba511f8f74377b1a1c7b61ff759ebe3078 Mon Sep 17 00:00:00 2001 From: faketruth Date: Tue, 31 Jan 2012 20:56:42 +0000 Subject: Changed how Lua handles the (Post)Params in the HTTPRequest of a WebPlugin It should now be theoretically possible to upload files through WebAdmin git-svn-id: http://mc-server.googlecode.com/svn/trunk@203 0a769ca7-a7f5-676a-18bf-c427514a06d6 --- source/cWebAdmin.h | 29 +++++++++++++++++++---------- 1 file changed, 19 insertions(+), 10 deletions(-) (limited to 'source/cWebAdmin.h') diff --git a/source/cWebAdmin.h b/source/cWebAdmin.h index da60a5492..3be9426ad 100644 --- a/source/cWebAdmin.h +++ b/source/cWebAdmin.h @@ -4,16 +4,25 @@ #include "cSocket.h" class cStringMap; -//tolua_begin -struct HTTPRequest -{ - std::string Method; - std::string Path; - cStringMap* Params; - cStringMap* PostParams; - std::string Username; -}; -//tolua_end + +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; -- cgit v1.2.3