Browse Source

Rename KeyVals DownloadHandle::getOption() as getOptions

Tatsuhiro Tsujikawa 12 năm trước cách đây
mục cha
commit
45506573a8
3 tập tin đã thay đổi với 4 bổ sung4 xóa
  1. 2 2
      src/aria2api.cc
  2. 1 1
      src/includes/aria2/aria2.h
  3. 1 1
      test/Aria2ApiTest.cc

+ 2 - 2
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();
   }

+ 1 - 1
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;
 };
 
 /**

+ 1 - 1
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());