| 1 | #ifndef ENGINE_HTTP_H |
|---|---|
| 2 | #define ENGINE_HTTP_H |
| 3 | |
| 4 | #include "kernel.h" |
| 5 | |
| 6 | #include <chrono> |
| 7 | #include <memory> |
| 8 | |
| 9 | class IHttpRequest |
| 10 | { |
| 11 | }; |
| 12 | |
| 13 | class IHttp : public IInterface |
| 14 | { |
| 15 | MACRO_INTERFACE("http") |
| 16 | |
| 17 | public: |
| 18 | virtual void Run(std::shared_ptr<IHttpRequest> pRequest) = 0; |
| 19 | }; |
| 20 | |
| 21 | class IEngineHttp : public IHttp |
| 22 | { |
| 23 | MACRO_INTERFACE("enginehttp") |
| 24 | |
| 25 | public: |
| 26 | virtual bool Init(std::chrono::milliseconds ShutdownDelay) = 0; |
| 27 | void Shutdown() override = 0; |
| 28 | }; |
| 29 | |
| 30 | IEngineHttp *CreateEngineHttp(); |
| 31 | |
| 32 | #endif |
| 33 |