~jpakkane/thumbnailer/standalone-albumart

« back to all changes in this revision

Viewing changes to include/internal/ubuntuserverdownloader.h

  • Committer: Jussi Pakkanen
  • Date: 2013-09-25 12:45:32 UTC
  • Revision ID: jussi.pakkanen@canonical.com-20130925124532-spx31kdvxwizl34a
Added Debian packaging.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/*
2
 
 * Copyright (C) 2014 Canonical Ltd.
3
 
 *
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.
7
 
 *
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.
12
 
 *
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/>.
15
 
 *
16
 
 * Authored by: Pawel Stolowski <pawel.stolowski@canonical.com>
17
 
 */
18
 
 
19
 
#ifndef UBUNTUSERVER_DOWNLOADER_H
20
 
#define UBUNTUSERVER_DOWNLOADER_H
21
 
 
22
 
#include <string>
23
 
#include <memory>
24
 
#include <internal/httpdownloader.h>
25
 
#include <internal/artdownloader.h>
26
 
 
27
 
class UbuntuServerDownloader final : public ArtDownloader {
28
 
public:
29
 
    UbuntuServerDownloader();
30
 
    UbuntuServerDownloader(HttpDownloader *o); // Takes ownership.
31
 
    ~UbuntuServerDownloader() = default;
32
 
 
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;
35
 
 
36
 
private:
37
 
    bool download(const std::string &url, const std::string &fname);
38
 
    std::unique_ptr<HttpDownloader> dl;
39
 
};
40
 
 
41
 
#endif