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

KIO

  • sources
  • kde-4.14
  • kdelibs
  • 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 
33 class QWidget;
34 
35 namespace KIO {
36 
73 class KIO_EXPORT AccessManager : public QNetworkAccessManager
74 {
75  Q_OBJECT
76 public:
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 
221 protected:
228  virtual QNetworkReply *createRequest(Operation op, const QNetworkRequest &req, QIODevice *outgoingData = 0);
229 
230 private:
231  class AccessManagerPrivate;
232  AccessManagerPrivate* const d;
233 };
234 
235 namespace Integration {
236 // KDE5: Move AccessManager into the KIO::Integration namespace.
237 typedef KIO::AccessManager AccessManager;
238 
245 KIO_EXPORT bool sslConfigFromMetaData(const KIO::MetaData& metadata, QSslConfiguration& sslconfig);
246 
278 class KIO_EXPORT CookieJar : public QNetworkCookieJar
279 {
280  Q_OBJECT
281 public:
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 
351 private:
352  class CookieJarPrivate;
353  CookieJarPrivate* const d;
354 };
355 
356 }
357 
358 }
359 
360 #endif // KIO_ACCESSMANAGER_H
QIODevice
QWidget
QNetworkReply
KIO::Integration::CookieJar
A KDE implementation of QNetworkCookieJar.
Definition: accessmanager.h:278
KIO::AccessManager
A KDE implementation of QNetworkAccessManager.
Definition: accessmanager.h:73
global.h
KIO::MetaData
MetaData is a simple map of key/value strings.
Definition: global.h:396
QNetworkRequest
QObject
KIO::Integration::AccessManager
KIO::AccessManager AccessManager
Definition: accessmanager.h:237
QList
QNetworkCookieJar
QSslConfiguration
QUrl
KIO::AccessManager::Attribute
Attribute
Definition: accessmanager.h:81
QNetworkAccessManager
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
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:24:52 by doxygen 1.8.7 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 API Reference

Skip menu "kdelibs 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

Search



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