From f801e16b787f033cea4e473d69b54fe65248a439 Mon Sep 17 00:00:00 2001 From: Perttu Ahola Date: Sun, 25 Mar 2012 11:50:29 +0300 Subject: Texture cache -> Media cache WIP --- src/server.h | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) (limited to 'src/server.h') diff --git a/src/server.h b/src/server.h index ae50af15b..6c789f7b5 100644 --- a/src/server.h +++ b/src/server.h @@ -253,21 +253,21 @@ struct PrioritySortedBlockTransfer u16 peer_id; }; -struct TextureRequest +struct MediaRequest { std::string name; - TextureRequest(const std::string &name_=""): + MediaRequest(const std::string &name_=""): name(name_) {} }; -struct TextureInformation +struct MediaInfo { std::string path; std::string sha1_digest; - TextureInformation(const std::string path_="", + MediaInfo(const std::string path_="", const std::string sha1_digest_=""): path(path_), sha1_digest(sha1_digest_) @@ -644,11 +644,10 @@ private: // Sends blocks to clients (locks env and con on its own) void SendBlocks(float dtime); - void PrepareTextures(); - - void SendTextureAnnouncement(u16 peer_id); - - void SendTexturesRequested(u16 peer_id,core::list tosend); + void fillMediaCache(); + void sendMediaAnnouncement(u16 peer_id); + void sendRequestedMedia(u16 peer_id, + const core::list &tosend); /* Something random @@ -832,7 +831,7 @@ private: friend class EmergeThread; friend class RemoteClient; - std::map m_Textures; + std::map m_media; /* Sounds -- cgit v1.2.3