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

KIO

accessmanager.h
Go to the documentation of this file.
00001 /*
00002  * This file is part of the KDE project.
00003  *
00004  * Copyright (C) 2008 - 2009 Urs Wolfer <uwolfer @ kde.org>
00005  * Copyright (C) 2009 - 2012 Dawit Alemayehu <adawit @ kde.org>
00006  *
00007  * This library is free software; you can redistribute it and/or
00008  * modify it under the terms of the GNU Library General Public
00009  * License as published by the Free Software Foundation; either
00010  * version 2 of the License, or (at your option) any later version.
00011  *
00012  * This library is distributed in the hope that it will be useful,
00013  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00014  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00015  * Library General Public License for more details.
00016  *
00017  * You should have received a copy of the GNU Library General Public License
00018  * along with this library; see the file COPYING.LIB.  If not, write to
00019  * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
00020  * Boston, MA 02110-1301, USA.
00021  *
00022  */
00023 
00024 #ifndef KIO_ACCESSMANAGER_H
00025 #define KIO_ACCESSMANAGER_H
00026 
00027 #include <kio/global.h>
00028 
00029 #include <QtNetwork/QNetworkAccessManager>
00030 #include <QtNetwork/QNetworkRequest>
00031 #include <QtNetwork/QNetworkCookieJar>
00032 
00033 class QWidget;
00034 
00035 namespace KIO {
00036 
00073 class KIO_EXPORT AccessManager : public QNetworkAccessManager
00074 {
00075     Q_OBJECT
00076 public:
00081     enum Attribute {
00082         MetaData = QNetworkRequest::User, 
00083         KioError 
00084     };
00085 
00089     AccessManager(QObject *parent);
00090 
00094     virtual ~AccessManager();
00095 
00100     void setExternalContentAllowed(bool allowed);
00101 
00107     bool isExternalContentAllowed() const;
00108 
00125 #ifndef KDE_NO_DEPRECATED
00126     KDE_DEPRECATED void setCookieJarWindowId(WId id);
00127 #endif
00128 
00139     void setWindow(QWidget* widget);
00140 
00153 #ifndef KDE_NO_DEPRECATED
00154     KDE_DEPRECATED WId cookieJarWindowid() const;
00155 #endif
00156 
00163     QWidget* window() const;
00164 
00175     KIO::MetaData& requestMetaData();
00176 
00191     KIO::MetaData& sessionMetaData();
00192 
00203     static void putReplyOnHold(QNetworkReply* reply);
00204 
00219     void setEmitReadyReadOnMetaDataChange(bool);
00220 
00221 protected:
00228     virtual QNetworkReply *createRequest(Operation op, const QNetworkRequest &req, QIODevice *outgoingData = 0);
00229 
00230 private:
00231     class AccessManagerPrivate;
00232     AccessManagerPrivate* const d;
00233 };
00234 
00235 namespace Integration {
00236 // KDE5: Move AccessManager into the KIO::Integration namespace.
00237 typedef KIO::AccessManager AccessManager;
00238 
00245 KIO_EXPORT bool sslConfigFromMetaData(const KIO::MetaData& metadata, QSslConfiguration& sslconfig);
00246 
00278 class KIO_EXPORT CookieJar : public QNetworkCookieJar
00279 {
00280     Q_OBJECT
00281 public:
00285     explicit CookieJar(QObject *parent = 0);
00286 
00290     ~CookieJar();
00291 
00295     WId windowId() const;
00296 
00309     void setWindowId(WId id);
00310 
00314     void reparseConfiguration();
00315 
00322     QList<QNetworkCookie> cookiesForUrl(const QUrl &url) const;
00323 
00330     bool setCookiesFromUrl(const QList<QNetworkCookie> &cookieList, const QUrl &url);
00331 
00338     bool isCookieStorageDisabled() const;
00339 
00349     void setDisableCookieStorage (bool disable);
00350 
00351 private:
00352     class CookieJarPrivate;
00353     CookieJarPrivate* const d;
00354 };
00355 
00356 }
00357 
00358 }
00359 
00360 #endif // KIO_ACCESSMANAGER_H
This file is part of the KDE documentation.
Documentation copyright © 1996-2019 The KDE developers.
Generated on Mon Jan 21 2019 12:34:57 by doxygen 1.7.5.1 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.9.5 API Reference

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