| @@ -60,6 +60,9 @@ liblol_core_headers = \ | |||
| lol/image/pixel.h lol/image/color.h lol/image/image.h \ | |||
| lol/image/resource.h lol/image/movie.h \ | |||
| \ | |||
| lol/net/all.h \ | |||
| lol/net/http.h \ | |||
| \ | |||
| lol/gpu/all.h \ | |||
| lol/gpu/shader.h lol/gpu/indexbuffer.h lol/gpu/vertexbuffer.h \ | |||
| lol/gpu/framebuffer.h lol/gpu/texture.h lol/gpu/lolfx.h \ | |||
| @@ -130,6 +133,8 @@ liblol_core_sources = \ | |||
| image/filter/dilate.cpp image/filter/median.cpp image/filter/yuv.cpp \ | |||
| image/movie.cpp \ | |||
| \ | |||
| net/http.cpp \ | |||
| \ | |||
| engine/tickable.cpp engine/ticker.cpp engine/ticker.h \ | |||
| engine/entity.cpp engine/entity.h \ | |||
| engine/world.cpp engine/world.h \ | |||
| @@ -184,6 +184,7 @@ | |||
| <ClCompile Include="mesh\mesh.cpp" /> | |||
| <ClCompile Include="mesh\primitivemesh.cpp" /> | |||
| <ClCompile Include="messageservice.cpp" /> | |||
| <ClCompile Include="net\http.cpp" /> | |||
| <ClCompile Include="platform.cpp" /> | |||
| <ClCompile Include="private\nx\nx-app.cpp"> | |||
| <ExcludedFromBuild Condition="'$(Platform)'!='NX64'">true</ExcludedFromBuild> | |||
| @@ -303,6 +304,8 @@ | |||
| <ClInclude Include="lol\math\real.h" /> | |||
| <ClInclude Include="lol\math\transform.h" /> | |||
| <ClInclude Include="lol\math\vector.h" /> | |||
| <ClInclude Include="lol\net\all.h" /> | |||
| <ClInclude Include="lol\net\http.h" /> | |||
| <ClInclude Include="lol\public.h" /> | |||
| <ClInclude Include="lol\sys\all.h" /> | |||
| <ClInclude Include="lol\sys\file.h" /> | |||
| @@ -226,6 +226,9 @@ | |||
| <Filter>mesh</Filter> | |||
| </ClCompile> | |||
| <ClCompile Include="messageservice.cpp" /> | |||
| <ClCompile Include="net\http.cpp"> | |||
| <Filter>net</Filter> | |||
| </ClCompile> | |||
| <ClCompile Include="platform.cpp" /> | |||
| <ClCompile Include="profiler.cpp" /> | |||
| <ClCompile Include="scene.cpp" /> | |||
| @@ -494,6 +497,12 @@ | |||
| <ClInclude Include="lol\math\vector.h"> | |||
| <Filter>lol\math</Filter> | |||
| </ClInclude> | |||
| <ClInclude Include="lol\net\all.h"> | |||
| <Filter>lol\net</Filter> | |||
| </ClInclude> | |||
| <ClInclude Include="lol\net\http.h"> | |||
| <Filter>lol\net</Filter> | |||
| </ClInclude> | |||
| <ClInclude Include="lol\public.h"> | |||
| <Filter>lol</Filter> | |||
| </ClInclude> | |||
| @@ -671,6 +680,9 @@ | |||
| <Filter Include="mesh"> | |||
| <UniqueIdentifier>{1eaa8df5-7a31-4358-a1e9-0e265de6ed49}</UniqueIdentifier> | |||
| </Filter> | |||
| <Filter Include="net"> | |||
| <UniqueIdentifier>{0db6de04-6778-43ed-81c6-0ac49c0481f4}</UniqueIdentifier> | |||
| </Filter> | |||
| <Filter Include="lol\base"> | |||
| <UniqueIdentifier>{e17b998c-d494-480b-ae29-5d1564f73327}</UniqueIdentifier> | |||
| </Filter> | |||
| @@ -692,6 +704,9 @@ | |||
| <Filter Include="lol\debug"> | |||
| <UniqueIdentifier>{01285b11-c6c7-4a9e-8dee-daa2c63901e4}</UniqueIdentifier> | |||
| </Filter> | |||
| <Filter Include="lol\net"> | |||
| <UniqueIdentifier>{59f31039-b311-4ebf-a900-e0f7567eb636}</UniqueIdentifier> | |||
| </Filter> | |||
| <Filter Include="platform"> | |||
| <UniqueIdentifier>{a11c55f8-8e10-4270-be24-38e8d4fcf589}</UniqueIdentifier> | |||
| </Filter> | |||
| @@ -0,0 +1,16 @@ | |||
| // | |||
| // Lol Engine | |||
| // | |||
| // Copyright © 2010—2020 Sam Hocevar <sam@hocevar.net> | |||
| // | |||
| // Lol Engine is free software. It comes without any warranty, to | |||
| // the extent permitted by applicable law. You can redistribute it | |||
| // and/or modify it under the terms of the Do What the Fuck You Want | |||
| // to Public License, Version 2, as published by the WTFPL Task Force. | |||
| // See http://www.wtfpl.net/ for more details. | |||
| // | |||
| #pragma once | |||
| #include <lol/net/http.h> | |||
| @@ -0,0 +1,47 @@ | |||
| // | |||
| // Lol Engine | |||
| // | |||
| // Copyright © 2010—2020 Sam Hocevar <sam@hocevar.net> | |||
| // | |||
| // Lol Engine is free software. It comes without any warranty, to | |||
| // the extent permitted by applicable law. You can redistribute it | |||
| // and/or modify it under the terms of the Do What the Fuck You Want | |||
| // to Public License, Version 2, as published by the WTFPL Task Force. | |||
| // See http://www.wtfpl.net/ for more details. | |||
| // | |||
| #pragma once | |||
| #include <memory> | |||
| namespace lol | |||
| { | |||
| namespace net | |||
| { | |||
| namespace http | |||
| { | |||
| class client_impl; | |||
| class client | |||
| { | |||
| public: | |||
| client(); | |||
| ~client(); | |||
| void get(std::string const &url); | |||
| bool is_ready() const; | |||
| std::tuple<int, std::string> result(); | |||
| private: | |||
| std::unique_ptr<client_impl> impl; | |||
| }; | |||
| } // namespace http | |||
| } // namespace net | |||
| } // namespace lol | |||
| @@ -23,6 +23,7 @@ | |||
| #include <lol/image/all.h> | |||
| #include <lol/sys/all.h> | |||
| #include <lol/audio/all.h> | |||
| #include <lol/net/all.h> | |||
| #include <lol/gpu/all.h> | |||
| #include <lol/debug/all.h> | |||
| #include <lol/engine/all.h> | |||
| @@ -0,0 +1,70 @@ | |||
| // | |||
| // Lol Engine | |||
| // | |||
| // Copyright © 2010—2020 Sam Hocevar <sam@hocevar.net> | |||
| // | |||
| // Lol Engine is free software. It comes without any warranty, to | |||
| // the extent permitted by applicable law. You can redistribute it | |||
| // and/or modify it under the terms of the Do What the Fuck You Want | |||
| // to Public License, Version 2, as published by the WTFPL Task Force. | |||
| // See http://www.wtfpl.net/ for more details. | |||
| // | |||
| #pragma once | |||
| #include <lol/engine-internal.h> | |||
| namespace lol | |||
| { | |||
| namespace net | |||
| { | |||
| namespace http | |||
| { | |||
| #if __EMSCRIPTEN__ | |||
| class client_impl | |||
| { | |||
| // FIXME | |||
| }; | |||
| #else | |||
| class client_impl | |||
| { | |||
| public: | |||
| void get(std::string const& url) | |||
| { | |||
| } | |||
| }; | |||
| #endif | |||
| client::client() | |||
| : impl(std::make_unique<client_impl>()) | |||
| { | |||
| } | |||
| client::~client() | |||
| { | |||
| } | |||
| void client::get(std::string const &url) | |||
| { | |||
| } | |||
| bool client::is_ready() const | |||
| { | |||
| return false; | |||
| } | |||
| std::tuple<int, std::string> client::result() | |||
| { | |||
| return std::make_tuple(404, std::string()); | |||
| } | |||
| } // namespace http | |||
| } // namespace net | |||
| } // namespace lol | |||