Sayonara Player
Loading...
Searching...
No Matches
Website.h
1/* Website.h
2 *
3 * Copyright (C) 2011-2024 Michael Lugmair
4 *
5 * This file is part of sayonara player
6 *
7 * This program is free software: you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation, either version 3 of the License, or
10 * (at your option) any later version.
11
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16
17 * You should have received a copy of the GNU General Public License
18 * along with this program. If not, see <http://www.gnu.org/licenses/>.
19 */
20
21#ifndef WEBSITE_H
22#define WEBSITE_H
23
24#include "CoverFetcher.h"
25#include "Utils/Pimpl.h"
26
27#include <QString>
28
29namespace Cover::Fetcher
30{
40 class Website :
42 {
43 PIMPL(Website)
44
45 private:
46 QString privateIdentifier() const override;
47
48 public:
49 Website(const QString& url=QString());
50 ~Website() override;
51
52 bool canFetchCoverDirectly() const override;
53 QStringList parseAddresses(const QByteArray& website) const override;
54
55 int estimatedSize() const override;
56 bool isWebserviceFetcher() const override;
57
64 QString fulltextSearchAddress(const QString& address) const override;
65
66 virtual void setWebsite(const QString& website);
67 };
68}
69
70#endif // WEBSITE_H
The CoverFetcherInterface interface.
Definition CoverFetcher.h:35
QString fulltextSearchAddress(const QString &address) const override
will always return the website which has been set by set_website(const QString&)
QStringList parseAddresses(const QByteArray &website) const override
Get addresses from the downloaded website. If can_fetch_cover_directly returns true,...
bool canFetchCoverDirectly() const override
Can the cover be fetched from the adress without starting a two-stage query?
int estimatedSize() const override
get_estimated_size. Rough image size of the CoverFetchInterface