diff --git a/src/aria2api.cc b/src/aria2api.cc index c7504941..f922ee3c 100644 --- a/src/aria2api.cc +++ b/src/aria2api.cc @@ -778,7 +778,7 @@ struct RequestGroupDH : public DownloadHandle { { return group->getOption()->get(option::k2p(name)); } - virtual KeyVals getOption() + virtual KeyVals getOptions() { KeyVals res; pushRequestOption(std::back_inserter(res), group->getOption(), @@ -890,7 +890,7 @@ struct DownloadResultDH : public DownloadHandle { { return A2STR::NIL; } - virtual KeyVals getOption() + virtual KeyVals getOptions() { return KeyVals(); } diff --git a/src/includes/aria2/aria2.h b/src/includes/aria2/aria2.h index 7328d2c0..fe4fb1b4 100644 --- a/src/includes/aria2/aria2.h +++ b/src/includes/aria2/aria2.h @@ -833,7 +833,7 @@ public: * :c:macro:`DOWNLOAD_ACTIVE`, :c:macro:`DOWNLOAD_PAUSED` or * :c:macro:`DOWNLOAD_WAITING` will return empty array. */ - virtual KeyVals getOption() = 0; + virtual KeyVals getOptions() = 0; }; /** diff --git a/test/Aria2ApiTest.cc b/test/Aria2ApiTest.cc index 0c5429e7..ac8eafb5 100644 --- a/test/Aria2ApiTest.cc +++ b/test/Aria2ApiTest.cc @@ -175,7 +175,7 @@ void Aria2ApiTest::testChangeOption() CPPUNIT_ASSERT_EQUAL(std::string("mydownload"), hd->getOption("dir")); CPPUNIT_ASSERT(hd->getOption("unknown").empty()); - KeyVals retopts = hd->getOption(); + KeyVals retopts = hd->getOptions(); CPPUNIT_ASSERT(std::find(retopts.begin(), retopts.end(), KeyVals::value_type("dir", "mydownload")) != retopts.end());