summaryrefslogtreecommitdiff
path: root/src/FileEntry.h
diff options
context:
space:
mode:
authorTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2012-06-25 23:35:24 +0900
committerTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2012-06-25 23:35:24 +0900
commit1b874268a067b4aba0e329768b82df635d7cae17 (patch)
treef72263f15286a6c3372d87571c261789ff8c87f7 /src/FileEntry.h
parent4b03634f36b05c32737aeea8ca178f53f68052e8 (diff)
Use int64_t instead of off_t
Some classes such as DiskAdaptor, DiskWriter, FileAllocationIterator and ChecksumValidator are left unchanged.
Diffstat (limited to 'src/FileEntry.h')
-rw-r--r--src/FileEntry.h18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/FileEntry.h b/src/FileEntry.h
index 13d51272..a1ed29de 100644
--- a/src/FileEntry.h
+++ b/src/FileEntry.h
@@ -66,8 +66,8 @@ private:
std::string path_;
std::deque<std::string> uris_;
std::deque<std::string> spentUris_;
- off_t length_;
- off_t offset_;
+ int64_t length_;
+ int64_t offset_;
bool requested_;
class RequestFaster {
@@ -92,7 +92,7 @@ private:
public:
FileEntry();
- FileEntry(const std::string& path, off_t length, off_t offset,
+ FileEntry(const std::string& path, int64_t length, int64_t offset,
const std::vector<std::string>& uris = std::vector<std::string>());
~FileEntry();
@@ -107,15 +107,15 @@ public:
void setPath(const std::string& path);
- off_t getLength() const { return length_; }
+ int64_t getLength() const { return length_; }
- void setLength(off_t length) { length_ = length; }
+ void setLength(int64_t length) { length_ = length; }
- off_t getOffset() const { return offset_; }
+ int64_t getOffset() const { return offset_; }
- void setOffset(off_t offset) { offset_ = offset; }
+ void setOffset(int64_t offset) { offset_ = offset; }
- off_t getLastOffset() { return offset_+length_; }
+ int64_t getLastOffset() { return offset_+length_; }
bool isRequested() const { return requested_; }
@@ -209,7 +209,7 @@ public:
bool exists() const;
// Translate global offset goff to file local offset.
- off_t gtoloff(off_t goff) const;
+ int64_t gtoloff(int64_t goff) const;
void removeURIWhoseHostnameIs(const std::string& hostname);