diff options
author | sfan5 <sfan5@live.de> | 2020-06-13 19:03:26 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-06-13 19:03:26 +0200 |
commit | 2424dfe007e451bb02f87884c2b272cf307d6e7c (patch) | |
tree | de43d4ab42126b0533bf5955de3ce68f97f53420 /src/client/client.h | |
parent | 982a030f330bd4f4953ed7d4a7f88286f6fd645d (diff) | |
download | minetest-2424dfe007e451bb02f87884c2b272cf307d6e7c.tar.gz minetest-2424dfe007e451bb02f87884c2b272cf307d6e7c.tar.bz2 minetest-2424dfe007e451bb02f87884c2b272cf307d6e7c.zip |
Server pushing media at runtime (#9961)
Diffstat (limited to 'src/client/client.h')
-rw-r--r-- | src/client/client.h | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/client/client.h b/src/client/client.h index 3b1095ac2..733634db1 100644 --- a/src/client/client.h +++ b/src/client/client.h @@ -222,6 +222,7 @@ public: void handleCommand_FormspecPrepend(NetworkPacket *pkt); void handleCommand_CSMRestrictionFlags(NetworkPacket *pkt); void handleCommand_PlayerSpeed(NetworkPacket *pkt); + void handleCommand_MediaPush(NetworkPacket *pkt); void ProcessData(NetworkPacket *pkt); @@ -376,7 +377,8 @@ public: // The following set of functions is used by ClientMediaDownloader // Insert a media file appropriately into the appropriate manager - bool loadMedia(const std::string &data, const std::string &filename); + bool loadMedia(const std::string &data, const std::string &filename, + bool from_media_push = false); // Send a request for conventional media transfer void request_media(const std::vector<std::string> &file_requests); @@ -488,6 +490,7 @@ private: Camera *m_camera = nullptr; Minimap *m_minimap = nullptr; bool m_minimap_disabled_by_server = false; + // Server serialization version u8 m_server_ser_ver; @@ -529,7 +532,6 @@ private: AuthMechanism m_chosen_auth_mech; void *m_auth_data = nullptr; - bool m_access_denied = false; bool m_access_denied_reconnect = false; std::string m_access_denied_reason = ""; @@ -538,7 +540,10 @@ private: bool m_nodedef_received = false; bool m_activeobjects_received = false; bool m_mods_loaded = false; + ClientMediaDownloader *m_media_downloader; + // Set of media filenames pushed by server at runtime + std::unordered_set<std::string> m_media_pushed_files; // time_of_day speed approximation for old protocol bool m_time_of_day_set = false; |