polserver/pol-core/pol/module/httpmod.h
Kevin Eady 12d6186d10
Script option enhancements (#118)
* Fix SCRIPTOPT_CAN_ACCESS_OFFLINE_MOBILES

* Add SCRIPTOPT_SURVIVE_ATTACHED_DISCONNECT

* wip beginning work on templatization

* Use PolModule in pol-specific modules

* wip, creating PolModule with getXYZParam

* wip 1, moving getXYZ to UOExecutor

* compilable with PolObjectImp / PolApplicObj

* add type guard

* wip, change signatures

change signatures of script_method, script_method_id, and
custom_script_method

* compilable (windows)

* linux fixes

* namespace fixes

* remove uoexhelp

* formatting

* compilable

- move can_access_offline_mobiles back to uoexec
- add guildscrobj and partyscrobj sources
- move EGuildRefObjImp and EPartyRefObjImp
- wip, implement asUOExec
- formatting uoexec.cpp,.h

* finish uoexec() helper

* some cleanup
2020-02-08 09:21:35 +01:00

56 lines
1.1 KiB
C++

/** @file
*
* @par History
*/
#ifndef __HTTPMOD_H
#define __HTTPMOD_H
#include <string>
#include "../polmodl.h"
#include "../../clib/network/wnsckt.h"
namespace Pol
{
namespace Bscript
{
class BObjectImp;
class Executor;
} // namespace Bscript
} // namespace Pol
namespace Pol
{
namespace Core
{
class UOExecutor;
}
namespace Module
{
class HttpExecutorModule : public Bscript::TmplExecutorModule<HttpExecutorModule, Core::PolModule>
{
public:
HttpExecutorModule( Bscript::Executor& exec, Clib::Socket&& isck );
Bscript::BObjectImp* mf_WriteHtml();
Bscript::BObjectImp* mf_WriteHtmlRaw();
Bscript::BObjectImp* mf_QueryParam();
Bscript::BObjectImp* mf_QueryIP();
void read_query_string( const std::string& query_string );
void read_query_ip();
virtual size_t sizeEstimate() const override;
// TODO: clean up the socket ownership thing so these can be private again
public:
Clib::Socket sck_;
typedef std::map<std::string, std::string, Clib::ci_cmp_pred> QueryParamMap;
QueryParamMap params_;
int continuing_offset;
std::string query_ip_;
};
} // namespace Module
} // namespace Pol
#endif // HTTPMOD_H