Rename KeyVals DownloadHandle::getOption() as getOptions

pull/92/head
Tatsuhiro Tsujikawa 2013-05-17 23:00:37 +09:00
parent 06377d77c9
commit 45506573a8
3 changed files with 4 additions and 4 deletions

View File

@ -778,7 +778,7 @@ struct RequestGroupDH : public DownloadHandle {
{ {
return group->getOption()->get(option::k2p(name)); return group->getOption()->get(option::k2p(name));
} }
virtual KeyVals getOption() virtual KeyVals getOptions()
{ {
KeyVals res; KeyVals res;
pushRequestOption(std::back_inserter(res), group->getOption(), pushRequestOption(std::back_inserter(res), group->getOption(),
@ -890,7 +890,7 @@ struct DownloadResultDH : public DownloadHandle {
{ {
return A2STR::NIL; return A2STR::NIL;
} }
virtual KeyVals getOption() virtual KeyVals getOptions()
{ {
return KeyVals(); return KeyVals();
} }

View File

@ -833,7 +833,7 @@ public:
* :c:macro:`DOWNLOAD_ACTIVE`, :c:macro:`DOWNLOAD_PAUSED` or * :c:macro:`DOWNLOAD_ACTIVE`, :c:macro:`DOWNLOAD_PAUSED` or
* :c:macro:`DOWNLOAD_WAITING` will return empty array. * :c:macro:`DOWNLOAD_WAITING` will return empty array.
*/ */
virtual KeyVals getOption() = 0; virtual KeyVals getOptions() = 0;
}; };
/** /**

View File

@ -175,7 +175,7 @@ void Aria2ApiTest::testChangeOption()
CPPUNIT_ASSERT_EQUAL(std::string("mydownload"), hd->getOption("dir")); CPPUNIT_ASSERT_EQUAL(std::string("mydownload"), hd->getOption("dir"));
CPPUNIT_ASSERT(hd->getOption("unknown").empty()); CPPUNIT_ASSERT(hd->getOption("unknown").empty());
KeyVals retopts = hd->getOption(); KeyVals retopts = hd->getOptions();
CPPUNIT_ASSERT(std::find(retopts.begin(), retopts.end(), CPPUNIT_ASSERT(std::find(retopts.begin(), retopts.end(),
KeyVals::value_type("dir", "mydownload")) KeyVals::value_type("dir", "mydownload"))
!= retopts.end()); != retopts.end());