Attica

platformdependent.h
1 /*
2  This file is part of KDE.
3 
4  SPDX-FileCopyrightText: 2009 Eckhart W├Ârner <[email protected]>
5  SPDX-FileCopyrightText: 2011 Laszlo Papp <[email protected]>
6 
7  SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
8 */
9 
10 #ifndef ATTICA_PLATFORMDEPENDENT_H
11 #define ATTICA_PLATFORMDEPENDENT_H
12 
13 #include <QList>
14 #include <QtPlugin>
15 
16 class QByteArray;
17 class QIODevice;
19 class QNetworkReply;
20 class QNetworkRequest;
21 class QString;
22 class QUrl;
23 class QStringList;
24 
25 namespace Attica
26 {
27 
28 class PlatformDependent
29 {
30 public:
31  virtual ~PlatformDependent() {}
32  virtual QList<QUrl> getDefaultProviderFiles() const = 0;
33  virtual void addDefaultProviderFile(const QUrl &url) = 0;
34  virtual void removeDefaultProviderFile(const QUrl &url) = 0;
35 
39  virtual void enableProvider(const QUrl &baseUrl, bool enabled) const = 0;
40  virtual bool isEnabled(const QUrl &baseUrl) const = 0;
41 
45  virtual bool hasCredentials(const QUrl &baseUrl) const = 0;
46 
51  virtual bool loadCredentials(const QUrl &baseUrl, QString &user, QString &password) = 0;
52 
59  virtual bool askForCredentials(const QUrl &baseUrl, QString &user, QString &password) = 0;
60 
67  virtual bool saveCredentials(const QUrl &baseUrl, const QString &user, const QString &password) = 0;
68 
69  virtual QNetworkReply *get(const QNetworkRequest &request) = 0;
70  virtual QNetworkReply *post(const QNetworkRequest &request, QIODevice *data) = 0;
71  virtual QNetworkReply *post(const QNetworkRequest &request, const QByteArray &data) = 0;
72  virtual void setNam(QNetworkAccessManager *) {}
73  virtual QNetworkAccessManager *nam() = 0;
74 };
75 
76 }
77 
78 Q_DECLARE_INTERFACE(Attica::PlatformDependent, "org.kde.Attica.Internals/1.2")
79 
80 #endif
This file is part of the KDE documentation.
Documentation copyright © 1996-2021 The KDE developers.
Generated on Mon Jan 25 2021 23:06:24 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.