From e5cccd335cc99f28615d44d5cb0b4400239c63cd Mon Sep 17 00:00:00 2001 From: Tatsuhiro Tsujikawa Date: Thu, 2 May 2013 09:40:27 +0900 Subject: [PATCH] Add addMetalink API function --- src/aria2api.cc | 37 +++++++++++++++++++++++++++++++++++++ src/includes/aria2/aria2.h | 14 ++++++++++++++ 2 files changed, 51 insertions(+) diff --git a/src/aria2api.cc b/src/aria2api.cc index 72352266..02171b7a 100644 --- a/src/aria2api.cc +++ b/src/aria2api.cc @@ -227,6 +227,43 @@ int addUri(Session* session, return 0; } +int addMetalink(Session* session, + std::vector& gids, + const std::string& metalinkFile, + const KeyVals& options, + int position) +{ +#ifdef ENABLE_METALINK + const SharedHandle& e = + session->context->reqinfo->getDownloadEngine(); + SharedHandle