KIO
accessmanager.cpp
Go to the documentation of this file.
55 static QNetworkRequest::Attribute gSynchronousNetworkRequestAttribute = QNetworkRequest::SynchronousRequestAttribute;
57 static QNetworkRequest::Attribute gSynchronousNetworkRequestAttribute = static_cast<QNetworkRequest::Attribute>(QNetworkRequest::HttpPipeliningWasUsedAttribute + 7);
213 QNetworkReply *AccessManager::createRequest(Operation op, const QNetworkRequest &req, QIODevice *outgoingData)
221 return new KDEPrivate::AccessManagerReply(op, req, QNetworkReply::ContentAccessDenied, i18n("Blocked request."), this);
289 //kDebug(7044) << "CustomOperation:" << reqUrl << "method:" << method << "outgoing data:" << outgoingData;
292 return new KDEPrivate::AccessManagerReply(op, req, QNetworkReply::ProtocolUnknownError, i18n("Unknown HTTP verb."), this);
346 reply = new KDEPrivate::AccessManagerReply(op, req, QNetworkReply::UnknownNetworkError, kioJob->errorText(), this);
373 reply = new KDEPrivate::AccessManagerReply(op, req, kioJob, d->emitReadyReadOnMetaDataChange, this);
385 void AccessManager::AccessManagerPrivate::setMetaDataForRequest(QNetworkRequest request, KIO::MetaData& metaData)
424 if (request.attribute(QNetworkRequest::AuthenticationReuseAttribute) == QNetworkRequest::Manual) {
478 bool KIO::Integration::sslConfigFromMetaData(const KIO::MetaData& metadata, QSslConfiguration& sslconfig)
483 const QSsl::SslProtocol sslProto = qSslProtocolFromString(metadata.value(QL1S("ssl_protocol_version")));
486 sslconfig.setCaCertificates(QSslCertificate::fromData(metadata.value(QL1S("ssl_peer_chain")).toUtf8()));
524 QDBusReply<QString> reply = kcookiejar.call("findDOMCookies", url.toString(QUrl::RemoveUserInfo), (qlonglong)d->windowId);
560 kcookiejar.call("addCookies", url.toString(QUrl::RemoveUserInfo), cookieHeader, (qlonglong)d->windowId);
579 KConfigGroup cfg = KSharedConfig::openConfig("kcookiejarrc", KConfig::NoGlobals)->group("Cookie Policy");
static bool isLocalRequest(const KUrl &url)
virtual void setWindow(QWidget *window)
Associate this job with a window given by window.
Definition: jobuidelegate.cpp:58
QString i18n(const char *text)
void setEmitReadyReadOnMetaDataChange(bool)
Sets the network reply object to emit readyRead when it receives meta data.
Definition: accessmanager.cpp:208
TransferJob * put(const KUrl &url, int permissions, JobFlags flags=DefaultFlags)
Put (a.k.a.
Definition: job.cpp:1716
const char header[]
static qint64 sizeFromRequest(const QNetworkRequest &req)
Definition: accessmanager.cpp:63
void setMetaData(const KIO::MetaData &metaData)
Set meta data to be sent to the slave, replacing existing meta data.
Definition: job.cpp:258
static void setJobPriority(SimpleJob *job, int priority)
Changes the priority of job; jobs of the same priority run in the order in which they were created...
Definition: scheduler.cpp:805
MimetypeJob * mimetype(const KUrl &url, JobFlags flags=DefaultFlags)
Find mimetype for one file or directory.
Definition: job.cpp:1872
void setIgnoreContentDisposition(bool on)
TransferJob * get(const KUrl &url, LoadType reload=NoReload, JobFlags flags=DefaultFlags)
Get (a.k.a.
Definition: job.cpp:1371
const char * name(StandardAction id)
static bool synchronousRun(Job *job, QWidget *window, QByteArray *data=0, KUrl *finalURL=0, QMap< QString, QString > *metaData=0)
This function executes a job in a synchronous way.
Definition: netaccess.cpp:276
StatJob * stat(const KUrl &url, JobFlags flags=DefaultFlags)
Find all details for one file or directory.
Definition: job.cpp:924
KConfigGroup group(const QByteArray &group)
QWidget * window() const
Returns the window associated with this network access manager.
Definition: accessmanager.cpp:183
A KDE implementation of QNetworkCookieJar.
Definition: accessmanager.h:278
static QDebug kDebug(bool cond, int area=KDE_DEFAULT_DEBUG_AREA)
void setExternalContentAllowed(bool allowed)
Set allowed to false if you don't want any external content to be fetched.
Definition: accessmanager.cpp:127
Used for KIO::AccessManager; KDE implementation of QNetworkReply.
Definition: accessmanagerreply_p.h:48
void reparseConfiguration()
Reparse the KDE cookiejar configuration file.
Definition: accessmanager.cpp:577
KIO::MetaData & requestMetaData()
Returns a reference to the temporary meta data container.
Definition: accessmanager.cpp:188
void putOnHold()
void setCookieJarWindowId(WId id)
Sets the cookiejar's window id to id.
Definition: accessmanager.cpp:138
void setRedirectionHandlingEnabled(bool handle)
Set handle to false to prevent the internal handling of redirections.
Definition: job.cpp:369
static QSsl::SslProtocol qSslProtocolFromString(const QString &str)
Definition: accessmanager.cpp:461
CookieJar(QObject *parent=0)
Constructs a KNetworkCookieJar with parent parent.
Definition: accessmanager.cpp:495
static int find(const QByteArray &buf, int begin, const char c1)
returns the position of the first occurrence of any of the given characters c1 or comma ('...
Definition: dataprotocol.cpp:85
virtual QNetworkReply * createRequest(Operation op, const QNetworkRequest &req, QIODevice *outgoingData=0)
Reimplemented for internal reasons, the API is not affected.
Definition: accessmanager.cpp:213
static QNetworkRequest::Attribute gSynchronousNetworkRequestAttribute
Definition: accessmanager.cpp:57
KGuiItem ok()
bool setCookiesFromUrl(const QList< QNetworkCookie > &cookieList, const QUrl &url)
Reimplemented for internal reasons, the API is not affected.
Definition: accessmanager.cpp:544
QList< QNetworkCookie > cookiesForUrl(const QUrl &url) const
Reimplemented for internal reasons, the API is not affected.
Definition: accessmanager.cpp:516
static void putReplyOnHold(QNetworkReply *reply)
Puts the ioslave associated with the given reply on hold.
Definition: accessmanager.cpp:198
bool isExternalContentAllowed() const
Returns true if external content is going to be fetched.
Definition: accessmanager.cpp:132
TransferJob * http_post(const KUrl &url, const QByteArray &postData, JobFlags flags=DefaultFlags)
HTTP POST (for form data).
Definition: job.cpp:1599
KIO::MetaData & sessionMetaData()
Returns a reference to the persistent meta data container.
Definition: accessmanager.cpp:193
QString errorString() const
Converts an error code and a non-i18n error message into an error message in the current language...
Definition: global.cpp:159
void setWindow(QWidget *widget)
Sets the window associated with this network access manager.
Definition: accessmanager.cpp:154
TransferJob * http_delete(const KUrl &url, JobFlags flags=DefaultFlags)
HTTP DELETE.
Definition: job.cpp:1653
Definition: job.h:29
static QDebug kWarning(bool cond, int area=KDE_DEFAULT_DEBUG_AREA)
bool isCookieStorageDisabled() const
Returns true if persistent caching of cookies is disabled.
Definition: accessmanager.cpp:511
bool sslConfigFromMetaData(const KIO::MetaData &metadata, QSslConfiguration &sslconfig)
Maps KIO SSL meta data into the given QSslConfiguration object.
Definition: accessmanager.cpp:478
T readEntry(const QString &key, const T &aDefault) const
QString errorText() const
void setDisableCookieStorage(bool disable)
Prevent persistent storage of cookies.
Definition: accessmanager.cpp:567
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:50:01 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:50:01 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.