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

KIO

accessmanagerreply_p.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 - 2010 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_ACCESSMANAGERREPLY_P_H
00025 #define KIO_ACCESSMANAGERREPLY_P_H
00026 
00027 #include <QtCore/QWeakPointer>
00028 #include <QtNetwork/QNetworkReply>
00029 
00030 namespace KIO
00031 {
00032     class Job;
00033     class SimpleJob;
00034 }
00035 class KJob;
00036 class KUrl;
00037 
00038 namespace KDEPrivate {
00039 
00047 class AccessManagerReply : public QNetworkReply
00048 {
00049     Q_OBJECT
00050 public:
00051     AccessManagerReply(const QNetworkAccessManager::Operation &op,
00052                        const QNetworkRequest &request,
00053                        KIO::SimpleJob *kioJob,
00054                        bool emitReadyReadOnMetaDataChange = false,
00055                        QObject *parent = 0);
00056 
00057     virtual ~AccessManagerReply();
00058     virtual qint64 bytesAvailable() const;
00059     virtual void abort();
00060 
00061     void setIgnoreContentDisposition(bool on);
00062     void setStatus(const QString& message, QNetworkReply::NetworkError);
00063     void putOnHold();
00064 
00065     static bool isLocalRequest(const KUrl& url);
00066 
00067 protected:
00068     virtual qint64 readData(char *data, qint64 maxSize);
00069     void readHttpResponseHeaders(KIO::Job *);
00070     int jobError(KJob *kJob);
00071     bool ignoreContentDisposition(KIO::Job* job);
00072 
00073 private Q_SLOTS:
00074     void slotData(KIO::Job *kioJob, const QByteArray &data);
00075     void slotMimeType(KIO::Job *kioJob, const QString &mimeType);
00076     void slotResult(KJob *kJob);
00077     void slotStatResult(KJob *kJob);
00078     void slotRedirection(KIO::Job *job, const KUrl &url);
00079     void slotPercent(KJob *job, unsigned long percent);
00080 
00081 private:
00082     QByteArray m_data;
00083     bool m_metaDataRead;
00084     bool m_ignoreContentDisposition;
00085     bool m_emitReadyReadOnMetaDataChange;
00086     QWeakPointer<KIO::SimpleJob> m_kioJob;
00087 };
00088 
00089 }
00090 
00091 #endif // KIO_ACCESSMANAGERREPLY_P_H
This file is part of the KDE documentation.
Documentation copyright © 1996-2012 The KDE developers.
Generated on Thu May 10 2012 20:55:18 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