2
* Copyright (C) 2014 Canonical Ltd.
4
* This program is free software: you can redistribute it and/or modify
5
* it under the terms of the GNU Lesser General Public License version 3 as
6
* published by the Free Software Foundation.
8
* This program is distributed in the hope that it will be useful,
9
* but WITHOUT ANY WARRANTY; without even the implied warranty of
10
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11
* GNU Lesser General Public License for more details.
13
* You should have received a copy of the GNU Lesser General Public License
14
* along with this program. If not, see <http://www.gnu.org/licenses/>.
16
* Authored by: Pawel Stolowski <pawel.stolowski@canonical.com>
19
#ifndef UBUNTUSERVER_DOWNLOADER_H
20
#define UBUNTUSERVER_DOWNLOADER_H
24
#include <internal/httpdownloader.h>
25
#include <internal/artdownloader.h>
27
class UbuntuServerDownloader final : public ArtDownloader {
29
UbuntuServerDownloader();
30
UbuntuServerDownloader(HttpDownloader *o); // Takes ownership.
31
~UbuntuServerDownloader() = default;
33
bool download(const std::string &artist, const std::string &album, const std::string &fname) override;
34
bool download_artist(const std::string &artist, const std::string &album, const std::string &fname) override;
37
bool download(const std::string &url, const std::string &fname);
38
std::unique_ptr<HttpDownloader> dl;