• Skip to content
  • Skip to link menu
  • KDE API Reference
  • kdelibs-4.14.38 API Reference
  • KDE Home
  • Contact Us
 

KIO

  • kio
  • kio
accessmanager.h
Go to the documentation of this file.
1/*
2 * This file is part of the KDE project.
3 *
4 * Copyright (C) 2008 - 2009 Urs Wolfer <uwolfer @ kde.org>
5 * Copyright (C) 2009 - 2012 Dawit Alemayehu <adawit @ kde.org>
6 *
7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Library General Public
9 * License as published by the Free Software Foundation; either
10 * version 2 of the License, or (at your option) any later version.
11 *
12 * This library 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 GNU
15 * Library General Public License for more details.
16 *
17 * You should have received a copy of the GNU Library General Public License
18 * along with this library; see the file COPYING.LIB. If not, write to
19 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
20 * Boston, MA 02110-1301, USA.
21 *
22 */
23
24#ifndef KIO_ACCESSMANAGER_H
25#define KIO_ACCESSMANAGER_H
26
27#include <kio/global.h>
28
29#include <QtNetwork/QNetworkAccessManager>
30#include <QtNetwork/QNetworkRequest>
31#include <QtNetwork/QNetworkCookieJar>
32
33class QWidget;
34
35namespace KIO {
36
73class KIO_EXPORT AccessManager : public QNetworkAccessManager
74{
75 Q_OBJECT
76public:
81 enum Attribute {
82 MetaData = QNetworkRequest::User,
83 KioError
84 };
85
89 AccessManager(QObject *parent);
90
94 virtual ~AccessManager();
95
100 void setExternalContentAllowed(bool allowed);
101
107 bool isExternalContentAllowed() const;
108
125#ifndef KDE_NO_DEPRECATED
126 KDE_DEPRECATED void setCookieJarWindowId(WId id);
127#endif
128
139 void setWindow(QWidget* widget);
140
153#ifndef KDE_NO_DEPRECATED
154 KDE_DEPRECATED WId cookieJarWindowid() const;
155#endif
156
163 QWidget* window() const;
164
175 KIO::MetaData& requestMetaData();
176
191 KIO::MetaData& sessionMetaData();
192
203 static void putReplyOnHold(QNetworkReply* reply);
204
219 void setEmitReadyReadOnMetaDataChange(bool);
220
221protected:
228 virtual QNetworkReply *createRequest(Operation op, const QNetworkRequest &req, QIODevice *outgoingData = 0);
229
230private:
231 class AccessManagerPrivate;
232 AccessManagerPrivate* const d;
233};
234
235namespace Integration {
236// KDE5: Move AccessManager into the KIO::Integration namespace.
237typedef KIO::AccessManager AccessManager;
238
245KIO_EXPORT bool sslConfigFromMetaData(const KIO::MetaData& metadata, QSslConfiguration& sslconfig);
246
278class KIO_EXPORT CookieJar : public QNetworkCookieJar
279{
280 Q_OBJECT
281public:
285 explicit CookieJar(QObject *parent = 0);
286
290 ~CookieJar();
291
295 WId windowId() const;
296
309 void setWindowId(WId id);
310
314 void reparseConfiguration();
315
322 QList<QNetworkCookie> cookiesForUrl(const QUrl &url) const;
323
330 bool setCookiesFromUrl(const QList<QNetworkCookie> &cookieList, const QUrl &url);
331
338 bool isCookieStorageDisabled() const;
339
349 void setDisableCookieStorage (bool disable);
350
351private:
352 class CookieJarPrivate;
353 CookieJarPrivate* const d;
354};
355
356}
357
358}
359
360#endif // KIO_ACCESSMANAGER_H
KIO::AccessManager
A KDE implementation of QNetworkAccessManager.
Definition: accessmanager.h:74
KIO::AccessManager::Attribute
Attribute
Definition: accessmanager.h:81
KIO::Integration::CookieJar
A KDE implementation of QNetworkCookieJar.
Definition: accessmanager.h:279
KIO::MetaData
MetaData is a simple map of key/value strings.
Definition: global.h:397
QIODevice
QList
QNetworkAccessManager
QNetworkCookieJar
QNetworkReply
QObject
QUrl
QWidget
global.h
KIO::Integration::AccessManager
KIO::AccessManager AccessManager
Definition: accessmanager.h:237
KIO::Integration::sslConfigFromMetaData
bool sslConfigFromMetaData(const KIO::MetaData &metadata, QSslConfiguration &sslconfig)
Maps KIO SSL meta data into the given QSslConfiguration object.
Definition: accessmanager.cpp:478
KIO
A namespace for KIO globals.
Definition: kbookmarkmenu.h:55
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Mon Feb 20 2023 00:00:00 by doxygen 1.9.6 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

KIO

Skip menu "KIO"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

kdelibs-4.14.38 API Reference

Skip menu "kdelibs-4.14.38 API Reference"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDEWebKit
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver
Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal