comparison Core/HttpServer/HttpFileSender.h @ 217:1ac3aacd10a5

simplifications
author Sebastien Jodogne <s.jodogne@gmail.com>
date Thu, 29 Nov 2012 12:22:23 +0100
parents de640de989b8
children bdd72233b105
comparison
equal deleted inserted replaced
216:e5d5d4a9a326 217:1ac3aacd10a5
38 { 38 {
39 class HttpFileSender 39 class HttpFileSender
40 { 40 {
41 private: 41 private:
42 std::string contentType_; 42 std::string contentType_;
43 std::string filename_; 43 std::string downloadFilename_;
44 44
45 void SendHeader(HttpOutput& output); 45 void SendHeader(HttpOutput& output);
46 46
47 protected: 47 protected:
48 virtual uint64_t GetFileSize() = 0; 48 virtual uint64_t GetFileSize() = 0;
67 const std::string& GetContentType() const 67 const std::string& GetContentType() const
68 { 68 {
69 return contentType_; 69 return contentType_;
70 } 70 }
71 71
72 void ResetFilename() 72 void ResetDownloadFilename()
73 { 73 {
74 contentType_.clear(); 74 downloadFilename_.clear();
75 } 75 }
76 76
77 void SetFilename(const std::string& filename) 77 void SetDownloadFilename(const std::string& filename)
78 { 78 {
79 filename_ = filename; 79 downloadFilename_ = filename;
80 } 80 }
81 81
82 const std::string& GetFilename() const 82 const std::string& GetDownloadFilename() const
83 { 83 {
84 return filename_; 84 return downloadFilename_;
85 } 85 }
86 86
87 void Send(HttpOutput& output); 87 void Send(HttpOutput& output);
88 }; 88 };
89 } 89 }