• Skip to content
  • Skip to link menu
KDE 4.2 API Reference
  • KDE API Reference
  • kdenetwork
  • Sitemap
  • Contact Us
 

kopete/protocols/messenger/libpapillon

httptransfer.h

Go to the documentation of this file.
00001 /*
00002    httptransfer.h - HTTP transfer
00003 
00004    Copyright (c) 2006 by Michaƫl Larouche <larouche@kde.org>
00005 
00006    *************************************************************************
00007    *                                                                       *
00008    * This library is free software; you can redistribute it and/or         *
00009    * modify it under the terms of the GNU Lesser General Public            *
00010    * License as published by the Free Software Foundation; either          *
00011    * version 2 of the License, or (at your option) any later version.      *
00012    *                                                                       *
00013    *************************************************************************
00014 */
00015 #ifndef PAPILLON_HTTPTRANSFER_H
00016 #define PAPILLON_HTTPTRANSFER_H
00017 
00018 #include <Papillon/Macros>
00019 
00020 #include <QtCore/QList>
00021 #include <QtCore/QPair>
00022 
00023 class QHttpHeader;
00024 class QHttpRequestHeader;
00025 class QHttpResponseHeader;
00026 
00027 namespace Papillon
00028 {
00029 
00038 class PAPILLON_EXPORT HttpTransfer
00039 {
00040 public:
00046     enum HttpTransferType
00047     {
00048         HttpRequest,
00049         HttpResponse
00050     };
00051 
00058     HttpTransfer(HttpTransferType type = HttpRequest);
00062     ~HttpTransfer();
00063 
00068     HttpTransferType type() const;
00069 
00074     bool isValid() const;
00075 
00081     uint contentLength() const;
00082 
00087     QString contentType() const;
00093     void setContentType(const QString &contentType);
00094 
00105     void setRequest(const QString &method, const QString &path, int majorVer = 1, int minorVer = 1);
00106 
00112     void setHttpHeader(const QHttpRequestHeader &requestHeader);
00118     void setHttpHeader(const QHttpResponseHeader &responseHeader);
00119 
00124     bool hasContentLength() const;
00125 
00130     bool hasContentType() const;
00131 
00137     bool hasKey(const QString &key) const;
00138 
00144     QString value(const QString &key) const;
00145 
00150     QList<QPair<QString, QString> > values() const;
00151 
00159     void setValue(const QString &key, const QString &value);
00160 
00165     void setValues(const QList<QPair<QString, QString> > &values);
00166 
00173     int statusCode() const;
00174 
00180     QString method() const;
00181 
00187     QString path() const;
00188 
00193     QByteArray body() const;
00199     void setBody(const QByteArray &body);
00200     
00205     QByteArray toRawCommand();
00206 
00207 private:
00208     class Private;
00209     Private *d;
00210 };
00211 
00212 }
00213 #endif

kopete/protocols/messenger/libpapillon

Skip menu "kopete/protocols/messenger/libpapillon"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

kdenetwork

Skip menu "kdenetwork"
  • kget
  • kopete
  •   kopete
  •   libkopete
  •       libpapillon
  • krfb
Generated for kdenetwork by doxygen 1.5.4
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal