QGIS API Documentation  3.24.2-Tisler (13c1a02865)
Public Types | Public Member Functions | Static Public Member Functions | List of all members
QgsNetworkReplyParser Class Reference

Multipart QNetworkReply parser. More...

#include <qgsnetworkreplyparser.h>

Inheritance diagram for QgsNetworkReplyParser:
Inheritance graph
[legend]

Public Types

typedef QMap< QByteArray, QByteArray > RawHeaderMap
 

Public Member Functions

 QgsNetworkReplyParser (QNetworkReply *reply)
 Constructor. More...
 
QList< QByteArray > bodies () const
 Gets bodies. More...
 
QByteArray body (int part) const
 Gets part part body. More...
 
QString error () const
 Parsing error. More...
 
QList< RawHeaderMapheaders () const
 Gets headers. More...
 
bool isValid () const
 Indicates if successfully parsed. More...
 
int parts () const
 Gets number of parts. More...
 
QByteArray rawHeader (int part, const QByteArray &headerName) const
 Gets part header. More...
 

Static Public Member Functions

static bool isMultipart (QNetworkReply *reply)
 Test if reply is multipart. More...
 

Detailed Description

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.

Note
not available in Python bindings

Definition at line 38 of file qgsnetworkreplyparser.h.

Member Typedef Documentation

◆ RawHeaderMap

typedef QMap<QByteArray, QByteArray> QgsNetworkReplyParser::RawHeaderMap

Definition at line 43 of file qgsnetworkreplyparser.h.

Constructor & Destructor Documentation

◆ QgsNetworkReplyParser()

QgsNetworkReplyParser::QgsNetworkReplyParser ( QNetworkReply *  reply)

Constructor.

Parameters
reply

Definition at line 28 of file qgsnetworkreplyparser.cpp.

Member Function Documentation

◆ bodies()

QList<QByteArray> QgsNetworkReplyParser::bodies ( ) const
inline

Gets bodies.

Definition at line 82 of file qgsnetworkreplyparser.h.

◆ body()

QByteArray QgsNetworkReplyParser::body ( int  part) const
inline

Gets part part body.

Parameters
partpart index
Returns
part body

Definition at line 79 of file qgsnetworkreplyparser.h.

◆ error()

QString QgsNetworkReplyParser::error ( ) const
inline

Parsing error.

Definition at line 85 of file qgsnetworkreplyparser.h.

◆ headers()

QList< RawHeaderMap > QgsNetworkReplyParser::headers ( ) const
inline

Gets headers.

Definition at line 72 of file qgsnetworkreplyparser.h.

◆ isMultipart()

bool QgsNetworkReplyParser::isMultipart ( QNetworkReply *  reply)
static

Test if reply is multipart.

Returns
true if reply is multipart

Definition at line 139 of file qgsnetworkreplyparser.cpp.

◆ isValid()

bool QgsNetworkReplyParser::isValid ( ) const
inline

Indicates if successfully parsed.

Returns
true if successfully parsed

Definition at line 55 of file qgsnetworkreplyparser.h.

◆ parts()

int QgsNetworkReplyParser::parts ( ) const
inline

Gets number of parts.

Returns
number of parts

Definition at line 61 of file qgsnetworkreplyparser.h.

◆ rawHeader()

QByteArray QgsNetworkReplyParser::rawHeader ( int  part,
const QByteArray &  headerName 
) const
inline

Gets part header.

Parameters
partpart index
headerNameheader name
Returns
raw header

Definition at line 69 of file qgsnetworkreplyparser.h.


The documentation for this class was generated from the following files: