QGIS API Documentation
2.0.1-Dufour
|
Multipart QNetworkReply parser. More...
#include <qgsnetworkreplyparser.h>
Public Types | |
typedef QMap< QByteArray, QByteArray > | RawHeaderMap |
Public Member Functions | |
QgsNetworkReplyParser (QNetworkReply *reply) | |
Constructor. | |
bool | isValid () const |
Indicates if successfully parsed. | |
int | parts () const |
Get number of parts. | |
QByteArray | rawHeader (int part, const QByteArray &headerName) const |
Get part header. | |
QList< RawHeaderMap > | headers () const |
Get headers. | |
QByteArray | body (int part) const |
Get part part body. | |
QList< QByteArray > | bodies () const |
Get bodies. | |
QString | error () const |
Parsing error. |
Static Public Member Functions | |
static bool | isMultipart (QNetworkReply *reply) |
Test if reply is multipart. |
Private Attributes | |
QNetworkReply * | mReply |
bool | mValid |
QString | mError |
QList< RawHeaderMap > | mHeaders |
QList< QByteArray > | mBodies |
Multipart QNetworkReply parser.
It seams that Qt does not have currently support for multipart reply and it is not even possible to create QNetworkReply from raw data so we need a class for multipart QNetworkReply parsing.
Definition at line 33 of file qgsnetworkreplyparser.h.
typedef QMap<QByteArray, QByteArray> QgsNetworkReplyParser::RawHeaderMap |
Definition at line 38 of file qgsnetworkreplyparser.h.
QgsNetworkReplyParser::QgsNetworkReplyParser | ( | QNetworkReply * | reply | ) |
Constructor.
reply |
Definition at line 28 of file qgsnetworkreplyparser.cpp.
References headers(), isMultipart(), mBodies, mError, mHeaders, mReply, mValid, QgsDebugMsg, and tr.
|
inline |
Get bodies.
Definition at line 67 of file qgsnetworkreplyparser.h.
|
inline |
Get part part body.
part | part index |
Definition at line 64 of file qgsnetworkreplyparser.h.
|
inline |
Parsing error.
Definition at line 70 of file qgsnetworkreplyparser.h.
|
inline |
Get headers.
Definition at line 59 of file qgsnetworkreplyparser.h.
Referenced by QgsNetworkReplyParser().
|
static |
Test if reply is multipart.
Definition at line 138 of file qgsnetworkreplyparser.cpp.
References QgsDebugMsg.
Referenced by QgsNetworkReplyParser().
|
inline |
Indicates if successfully parsed.
Definition at line 46 of file qgsnetworkreplyparser.h.
|
inline |
|
inline |
Get part header.
part | part index |
headerName | header name |
Definition at line 56 of file qgsnetworkreplyparser.h.
|
private |
Definition at line 87 of file qgsnetworkreplyparser.h.
Referenced by QgsNetworkReplyParser().
|
private |
Definition at line 81 of file qgsnetworkreplyparser.h.
Referenced by QgsNetworkReplyParser().
|
private |
Definition at line 84 of file qgsnetworkreplyparser.h.
Referenced by QgsNetworkReplyParser().
|
private |
Definition at line 77 of file qgsnetworkreplyparser.h.
Referenced by QgsNetworkReplyParser().
|
private |
Definition at line 79 of file qgsnetworkreplyparser.h.
Referenced by QgsNetworkReplyParser().