• Skip to content
  • Skip to link menu
  • KDE API Reference
  • kdelibs-4.8.3 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  *
00006  * This library is free software; you can redistribute it and/or
00007  * modify it under the terms of the GNU Library General Public
00008  * License as published by the Free Software Foundation; either
00009  * version 2 of the License, or (at your option) any later version.
00010  *
00011  * This library is distributed in the hope that it will be useful,
00012  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00013  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00014  * Library General Public License for more details.
00015  *
00016  * You should have received a copy of the GNU Library General Public License
00017  * along with this library; see the file COPYING.LIB.  If not, write to
00018  * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
00019  * Boston, MA 02110-1301, USA.
00020  *
00021  */
00022 
00023 #ifndef KIO_ACCESSMANAGER_H
00024 #define KIO_ACCESSMANAGER_H
00025 
00026 #include <kio/global.h>
00027 
00028 #include <QtNetwork/QNetworkAccessManager>
00029 #include <QtNetwork/QNetworkRequest>
00030 #include <QtNetwork/QNetworkCookieJar>
00031 
00032 class QWidget;
00033 
00034 namespace KIO {
00035 
00072 class KIO_EXPORT AccessManager : public QNetworkAccessManager
00073 {
00074     Q_OBJECT
00075 public:
00080     enum Attribute {
00081         MetaData = QNetworkRequest::User, 
00082         KioError 
00083     };
00084 
00088     AccessManager(QObject *parent);
00089 
00093     virtual ~AccessManager();
00094 
00099     void setExternalContentAllowed(bool allowed);
00100 
00106     bool isExternalContentAllowed() const;
00107 
00124 #ifndef KDE_NO_DEPRECATED
00125     KDE_DEPRECATED void setCookieJarWindowId(WId id);
00126 #endif
00127 
00138     void setWindow(QWidget* widget);
00139 
00152 #ifndef KDE_NO_DEPRECATED
00153     KDE_DEPRECATED WId cookieJarWindowid() const;
00154 #endif
00155 
00162     QWidget* window() const;
00163 
00174     KIO::MetaData& requestMetaData();
00175 
00190     KIO::MetaData& sessionMetaData();
00191 
00202     static void putReplyOnHold(QNetworkReply* reply);
00203 
00218     void setEmitReadyReadOnMetaDataChange(bool);
00219 
00220 protected:
00227     virtual QNetworkReply *createRequest(Operation op, const QNetworkRequest &req, QIODevice *outgoingData = 0);
00228 
00229 private:
00230     class AccessManagerPrivate;
00231     AccessManagerPrivate* const d;
00232 };
00233 
00234 namespace Integration {
00235 // KDE5: Move AccessManager into the KIO::Integration namespace.
00236 typedef KIO::AccessManager AccessManager;
00237 
00244 KIO_EXPORT bool sslConfigFromMetaData(const KIO::MetaData& metadata, QSslConfiguration& sslconfig);
00245 
00277 class KIO_EXPORT CookieJar : public QNetworkCookieJar
00278 {
00279     Q_OBJECT
00280 public:
00284     explicit CookieJar(QObject *parent = 0);
00285 
00289     ~CookieJar();
00290 
00294     WId windowId() const;
00295 
00308     void setWindowId(WId id);
00309 
00313     void reparseConfiguration();
00314 
00321     QList<QNetworkCookie> cookiesForUrl(const QUrl &url) const;
00322 
00329     bool setCookiesFromUrl(const QList<QNetworkCookie> &cookieList, const QUrl &url);
00330 
00337     bool isCookieStorageDisabled() const;
00338 
00348     void setDisableCookieStorage (bool disable);
00349 
00350 private:
00351     class CookieJarPrivate;
00352     CookieJarPrivate* const d;
00353 };
00354 
00355 }
00356 
00357 }
00358 
00359 #endif // KIO_ACCESSMANAGER_H
This file is part of the KDE documentation.
Documentation copyright © 1996-2012 The KDE developers.
Generated on Wed May 2 2012 18:20:52 by doxygen 1.8.0 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.8.3 API Reference

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