Qt 4.8
Public Types | Public Functions | Properties | Friends | List of all members
QHttpNetworkRequest Class Reference

#include <qhttpnetworkrequest_p.h>

Inheritance diagram for QHttpNetworkRequest:
QHttpNetworkHeader

Public Types

enum  Operation {
  Options, Get, Head, Post,
  Put, Delete, Trace, Connect,
  Custom
}
 
enum  Priority { HighPriority, NormalPriority, LowPriority }
 

Public Functions

qint64 contentLength () const
 
QByteArray customVerb () const
 
QList< QPair< QByteArray, QByteArray > > header () const
 
QByteArray headerField (const QByteArray &name, const QByteArray &defaultValue=QByteArray()) const
 
bool isPipeliningAllowed () const
 
bool isSsl () const
 
int majorVersion () const
 
int minorVersion () const
 
Operation operation () const
 
QHttpNetworkRequestoperator= (const QHttpNetworkRequest &other)
 
bool operator== (const QHttpNetworkRequest &other) const
 
Priority priority () const
 
 QHttpNetworkRequest (const QUrl &url=QUrl(), Operation operation=Get, Priority priority=NormalPriority)
 
 QHttpNetworkRequest (const QHttpNetworkRequest &other)
 
void setContentLength (qint64 length)
 
void setCustomVerb (const QByteArray &customOperation)
 
void setHeaderField (const QByteArray &name, const QByteArray &data)
 
void setOperation (Operation operation)
 
void setPipeliningAllowed (bool b)
 
void setPriority (Priority priority)
 
void setSsl (bool)
 
void setUploadByteDevice (QNonContiguousByteDevice *bd)
 
void setUrl (const QUrl &url)
 
void setWithCredentials (bool b)
 
QNonContiguousByteDeviceuploadByteDevice () const
 
QUrl url () const
 
bool withCredentials () const
 
virtual ~QHttpNetworkRequest ()
 
- Public Functions inherited from QHttpNetworkHeader
virtual ~QHttpNetworkHeader ()
 

Properties

QSharedDataPointer< QHttpNetworkRequestPrivated
 

Friends

class QHttpNetworkConnectionChannel
 
class QHttpNetworkConnectionPrivate
 
class QHttpNetworkRequestPrivate
 

Detailed Description

Definition at line 64 of file qhttpnetworkrequest_p.h.

Enumerations

◆ Operation

◆ Priority

Enumerator
HighPriority 
NormalPriority 
LowPriority 

Definition at line 79 of file qhttpnetworkrequest_p.h.

Constructors and Destructors

◆ QHttpNetworkRequest() [1/2]

QHttpNetworkRequest::QHttpNetworkRequest ( const QUrl url = QUrl(),
Operation  operation = Get,
Priority  priority = NormalPriority 
)

Definition at line 186 of file qhttpnetworkrequest.cpp.

188 {
189 }
QSharedDataPointer< QHttpNetworkRequestPrivate > d
Operation operation() const
friend class QHttpNetworkRequestPrivate

◆ QHttpNetworkRequest() [2/2]

QHttpNetworkRequest::QHttpNetworkRequest ( const QHttpNetworkRequest other)

Definition at line 191 of file qhttpnetworkrequest.cpp.

192  : QHttpNetworkHeader(other), d(other.d)
193 {
194 }
QSharedDataPointer< QHttpNetworkRequestPrivate > d

◆ ~QHttpNetworkRequest()

QHttpNetworkRequest::~QHttpNetworkRequest ( )
virtual

Definition at line 196 of file qhttpnetworkrequest.cpp.

197 {
198 }

Functions

◆ contentLength()

qint64 QHttpNetworkRequest::contentLength ( ) const
virtual

Implements QHttpNetworkHeader.

Definition at line 218 of file qhttpnetworkrequest.cpp.

Referenced by QHttpNetworkConnectionPrivate::prepareRequest(), and QHttpNetworkConnectionChannel::sendRequest().

219 {
220  return d->contentLength();
221 }
QSharedDataPointer< QHttpNetworkRequestPrivate > d

◆ customVerb()

QByteArray QHttpNetworkRequest::customVerb ( ) const

Definition at line 264 of file qhttpnetworkrequest.cpp.

Referenced by setCustomVerb().

265 {
266  return d->customVerb;
267 }
QSharedDataPointer< QHttpNetworkRequestPrivate > d

◆ header()

QList< QPair< QByteArray, QByteArray > > QHttpNetworkRequest::header ( ) const
virtual

Implements QHttpNetworkHeader.

Definition at line 228 of file qhttpnetworkrequest.cpp.

Referenced by QHttpNetworkRequestPrivate::header().

229 {
230  return d->fields;
231 }
QSharedDataPointer< QHttpNetworkRequestPrivate > d
QList< QPair< QByteArray, QByteArray > > fields

◆ headerField()

QByteArray QHttpNetworkRequest::headerField ( const QByteArray name,
const QByteArray defaultValue = QByteArray() 
) const
virtual

Implements QHttpNetworkHeader.

Definition at line 233 of file qhttpnetworkrequest.cpp.

Referenced by QHttpNetworkConnectionChannel::ensureConnection(), QHttpNetworkRequestPrivate::header(), QNetworkAccessHttpBackend::loadFromCacheIfAllowed(), and QHttpNetworkConnectionPrivate::prepareRequest().

234 {
235  return d->headerField(name, defaultValue);
236 }
QSharedDataPointer< QHttpNetworkRequestPrivate > d
QByteArray headerField(const QByteArray &name, const QByteArray &defaultValue=QByteArray()) const

◆ isPipeliningAllowed()

bool QHttpNetworkRequest::isPipeliningAllowed ( ) const

Definition at line 284 of file qhttpnetworkrequest.cpp.

Referenced by QHttpNetworkConnectionPrivate::fillPipeline().

285 {
286  return d->pipeliningAllowed;
287 }
QSharedDataPointer< QHttpNetworkRequestPrivate > d

◆ isSsl()

bool QHttpNetworkRequest::isSsl ( ) const

Definition at line 209 of file qhttpnetworkrequest.cpp.

Referenced by QHttpNetworkReply::setRequest().

210 {
211  return d->ssl;
212 }
QSharedDataPointer< QHttpNetworkRequestPrivate > d

◆ majorVersion()

int QHttpNetworkRequest::majorVersion ( ) const
virtual

Implements QHttpNetworkHeader.

Definition at line 314 of file qhttpnetworkrequest.cpp.

Referenced by QHttpNetworkRequestPrivate::header().

315 {
316  return 1;
317 }

◆ minorVersion()

int QHttpNetworkRequest::minorVersion ( ) const
virtual

Implements QHttpNetworkHeader.

Definition at line 319 of file qhttpnetworkrequest.cpp.

Referenced by QHttpNetworkRequestPrivate::header().

320 {
321  return 1;
322 }

◆ operation()

QHttpNetworkRequest::Operation QHttpNetworkRequest::operation ( ) const

Definition at line 254 of file qhttpnetworkrequest.cpp.

Referenced by QHttpNetworkReplyPrivate::expectContent(), QNetworkAccessHttpBackend::fetchCacheMetaData(), QHttpNetworkConnectionPrivate::fillPipeline(), and setOperation().

255 {
256  return d->operation;
257 }
QSharedDataPointer< QHttpNetworkRequestPrivate > d
QHttpNetworkRequest::Operation operation

◆ operator=()

QHttpNetworkRequest & QHttpNetworkRequest::operator= ( const QHttpNetworkRequest other)

Definition at line 243 of file qhttpnetworkrequest.cpp.

244 {
245  d = other.d;
246  return *this;
247 }
QSharedDataPointer< QHttpNetworkRequestPrivate > d

◆ operator==()

bool QHttpNetworkRequest::operator== ( const QHttpNetworkRequest other) const

Definition at line 249 of file qhttpnetworkrequest.cpp.

250 {
251  return d->operator==(*other.d);
252 }
QSharedDataPointer< QHttpNetworkRequestPrivate > d

◆ priority()

QHttpNetworkRequest::Priority QHttpNetworkRequest::priority ( ) const

Definition at line 274 of file qhttpnetworkrequest.cpp.

Referenced by QHttpNetworkConnectionPrivate::queueRequest(), QHttpNetworkConnectionPrivate::requeueRequest(), and setPriority().

275 {
276  return d->priority;
277 }
QSharedDataPointer< QHttpNetworkRequestPrivate > d
QHttpNetworkRequest::Priority priority

◆ setContentLength()

void QHttpNetworkRequest::setContentLength ( qint64  length)
virtual

Implements QHttpNetworkHeader.

Definition at line 223 of file qhttpnetworkrequest.cpp.

Referenced by QHttpNetworkConnectionPrivate::prepareRequest().

224 {
225  d->setContentLength(length);
226 }
QSharedDataPointer< QHttpNetworkRequestPrivate > d
void setContentLength(qint64 length)

◆ setCustomVerb()

void QHttpNetworkRequest::setCustomVerb ( const QByteArray customOperation)

Definition at line 269 of file qhttpnetworkrequest.cpp.

Referenced by QNetworkAccessHttpBackend::postRequest().

270 {
272 }
QSharedDataPointer< QHttpNetworkRequestPrivate > d
QByteArray customVerb() const

◆ setHeaderField()

void QHttpNetworkRequest::setHeaderField ( const QByteArray name,
const QByteArray data 
)
virtual

Implements QHttpNetworkHeader.

Definition at line 238 of file qhttpnetworkrequest.cpp.

Referenced by QHttpNetworkConnectionPrivate::createAuthorization(), QNetworkAccessHttpBackend::loadFromCacheIfAllowed(), QNetworkAccessHttpBackend::postRequest(), and QHttpNetworkConnectionPrivate::prepareRequest().

239 {
240  d->setHeaderField(name, data);
241 }
QSharedDataPointer< QHttpNetworkRequestPrivate > d
void setHeaderField(const QByteArray &name, const QByteArray &data)

◆ setOperation()

void QHttpNetworkRequest::setOperation ( Operation  operation)

Definition at line 259 of file qhttpnetworkrequest.cpp.

Referenced by QNetworkAccessHttpBackend::postRequest().

260 {
261  d->operation = operation;
262 }
QSharedDataPointer< QHttpNetworkRequestPrivate > d
QHttpNetworkRequest::Operation operation
Operation operation() const

◆ setPipeliningAllowed()

void QHttpNetworkRequest::setPipeliningAllowed ( bool  b)

Definition at line 289 of file qhttpnetworkrequest.cpp.

Referenced by QNetworkAccessHttpBackend::postRequest().

290 {
291  d->pipeliningAllowed = b;
292 }
QSharedDataPointer< QHttpNetworkRequestPrivate > d

◆ setPriority()

void QHttpNetworkRequest::setPriority ( Priority  priority)

Definition at line 279 of file qhttpnetworkrequest.cpp.

Referenced by QNetworkAccessHttpBackend::postRequest().

280 {
281  d->priority = priority;
282 }
QSharedDataPointer< QHttpNetworkRequestPrivate > d
QHttpNetworkRequest::Priority priority

◆ setSsl()

void QHttpNetworkRequest::setSsl ( bool  s)

Definition at line 213 of file qhttpnetworkrequest.cpp.

Referenced by QNetworkAccessHttpBackend::postRequest().

214 {
215  d->ssl = s;
216 }
QSharedDataPointer< QHttpNetworkRequestPrivate > d

◆ setUploadByteDevice()

void QHttpNetworkRequest::setUploadByteDevice ( QNonContiguousByteDevice bd)

Definition at line 304 of file qhttpnetworkrequest.cpp.

Referenced by QNetworkAccessHttpBackend::postRequest().

305 {
306  d->uploadByteDevice = bd;
307 }
QSharedDataPointer< QHttpNetworkRequestPrivate > d
QNonContiguousByteDevice * uploadByteDevice

◆ setUrl()

void QHttpNetworkRequest::setUrl ( const QUrl url)
virtual

Implements QHttpNetworkHeader.

Definition at line 204 of file qhttpnetworkrequest.cpp.

Referenced by QNetworkAccessHttpBackend::postRequest(), and QHttpNetworkConnectionChannel::sendRequest().

205 {
206  d->url = url;
207 }
QSharedDataPointer< QHttpNetworkRequestPrivate > d

◆ setWithCredentials()

void QHttpNetworkRequest::setWithCredentials ( bool  b)

Definition at line 299 of file qhttpnetworkrequest.cpp.

Referenced by QNetworkAccessHttpBackend::postRequest().

300 {
301  d->withCredentials = b;
302 }
QSharedDataPointer< QHttpNetworkRequestPrivate > d

◆ uploadByteDevice()

QNonContiguousByteDevice * QHttpNetworkRequest::uploadByteDevice ( ) const

Definition at line 309 of file qhttpnetworkrequest.cpp.

Referenced by QHttpNetworkConnectionPrivate::prepareRequest(), QHttpNetworkConnectionChannel::resetUploadData(), and QHttpNetworkConnectionChannel::sendRequest().

310 {
311  return d->uploadByteDevice;
312 }
QSharedDataPointer< QHttpNetworkRequestPrivate > d
QNonContiguousByteDevice * uploadByteDevice

◆ url()

QUrl QHttpNetworkRequest::url ( ) const
virtual

◆ withCredentials()

bool QHttpNetworkRequest::withCredentials ( ) const

Definition at line 294 of file qhttpnetworkrequest.cpp.

Referenced by QHttpNetworkConnectionPrivate::handleAuthenticateChallenge(), and QHttpNetworkConnectionChannel::sendRequest().

295 {
296  return d->withCredentials;
297 }
QSharedDataPointer< QHttpNetworkRequestPrivate > d

Friends and Related Functions

◆ QHttpNetworkConnectionChannel

Definition at line 129 of file qhttpnetworkrequest_p.h.

◆ QHttpNetworkConnectionPrivate

Definition at line 128 of file qhttpnetworkrequest_p.h.

◆ QHttpNetworkRequestPrivate

Definition at line 127 of file qhttpnetworkrequest_p.h.

Properties

◆ d

QSharedDataPointer<QHttpNetworkRequestPrivate> QHttpNetworkRequest::d
private

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