diff options
| author | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2010-11-14 07:17:55 +0000 |
|---|---|---|
| committer | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2010-11-14 07:17:55 +0000 |
| commit | 1372ac51ade17bc27126449bf29f99c6c2cf7703 (patch) | |
| tree | 974a54b86b20555c8822f651c7b3a53c0a072df3 /src/FileEntry.cc | |
| parent | 93e5dbed325f29c1bf867a2847d3b839d545cfb2 (diff) | |
2010-11-14 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Added .cc file for classes/structs that only provided by header
file. Defined non-POD classes' ctor, dtor in .cc file. Moved
implementation code in header file to .cc file for major
classes/strucsts.
Diffstat (limited to 'src/FileEntry.cc')
| -rw-r--r-- | src/FileEntry.cc | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/src/FileEntry.cc b/src/FileEntry.cc index cf09a054..c8664941 100644 --- a/src/FileEntry.cc +++ b/src/FileEntry.cc @@ -43,6 +43,7 @@ #include "wallclock.h" #include "a2algo.h" #include "uri.h" +#include "PeerStat.h" namespace aria2 { @@ -458,4 +459,34 @@ bool FileEntry::insertUri(const std::string& uri, size_t pos) } } +void FileEntry::setPath(const std::string& path) +{ + path_ = path; +} + +void FileEntry::setContentType(const std::string& contentType) +{ + contentType_ = contentType; +} + +size_t FileEntry::countInFlightRequest() const +{ + return inFlightRequests_.size(); +} + +size_t FileEntry::countPooledRequest() const +{ + return requestPool_.size(); +} + +void FileEntry::setOriginalName(const std::string& originalName) +{ + originalName_ = originalName; +} + +bool FileEntry::emptyRequestUri() const +{ + return uris_.empty() && inFlightRequests_.empty() && requestPool_.empty(); +} + } // namespace aria2 |
