Messagelib

remotecontentmanager.h
1/*
2 SPDX-FileCopyrightText: 2020-2024 Laurent Montel <montel@kde.org>
3
4 SPDX-License-Identifier: LGPL-2.0-or-later
5*/
6
7#pragma once
8
9#include "messageviewer_private_export.h"
10#include <QObject>
11#include <QUrl>
12namespace MessageViewer
13{
14class RemoteContentInfo;
15/**
16 * @brief The RemoteContentManager class
17 * @author Laurent Montel <montel@kde.org>
18 */
19class MESSAGEVIEWER_TESTS_EXPORT RemoteContentManager : public QObject
20{
21 Q_OBJECT
22public:
23 explicit RemoteContentManager(QObject *parent = nullptr);
24 ~RemoteContentManager() override;
25 static RemoteContentManager *self();
26 void clear();
27
28 [[nodiscard]] bool isAutorized(const QString &url) const;
29 [[nodiscard]] bool isAutorized(const QUrl &url, bool &contains) const;
30
31 void addRemoteContent(const RemoteContentInfo &info);
32 [[nodiscard]] QList<RemoteContentInfo> removeContentInfo() const;
33
34 void setRemoveContentInfo(const QList<RemoteContentInfo> &removeContentInfo);
35
36 [[nodiscard]] bool isUnique(const RemoteContentInfo &newInfo) const;
37
38 [[nodiscard]] bool isBlocked(const QUrl &url, bool &contains) const;
39
40private:
41 MESSAGEVIEWER_NO_EXPORT void loadSettings();
42 MESSAGEVIEWER_NO_EXPORT void writeSettings();
43 QList<RemoteContentInfo> mRemoveContentInfo;
44};
45}
The RemoteContentInfo class.
The RemoteContentManager class.
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:07:25 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.