summaryrefslogtreecommitdiff
path: root/src/util.h
diff options
context:
space:
mode:
authorTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2009-12-07 12:49:19 +0000
committerTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2009-12-07 12:49:19 +0000
commit58bb1fa266d7d96c88b05a2c4727bdcde812e639 (patch)
tree4fddaa3cb109507ebbbcff9850cf9217d539e32c /src/util.h
parent32f25fdef43afcad0ea56f82de273bdf0d4dd729 (diff)
2009-12-07 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Specified defaultSize as an argument for easy testing. * src/util.cc * src/util.h * test/UtilTest.cc
Diffstat (limited to 'src/util.h')
-rw-r--r--src/util.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/util.h b/src/util.h
index 3f3c60f6..a7095a54 100644
--- a/src/util.h
+++ b/src/util.h
@@ -203,12 +203,14 @@ IntSequence parseIntRange(const std::string& src);
// parameter, SIZE. For example, if "head=SIZE" is specified, pieces
// in the range of first SIZE bytes of each file get higher
// priority. SIZE can include K or M(1K = 1024, 1M = 1024K).
+// If SIZE is omitted, SIZE=defaultSize is used.
//
// sample: head=512K,tail=512K
void parsePrioritizePieceRange
(std::vector<size_t>& result, const std::string& src,
const std::vector<SharedHandle<FileEntry> >& fileEntries,
- size_t pieceLength);
+ size_t pieceLength,
+ uint64_t defaultSize = 1048576 /* 1MiB */);
// this function temporarily put here
std::string getContentDispositionFilename(const std::string& header);