CFx SDK Documentation 2026 SP0
Loading...
Searching...
No Matches
FxNANetworkRequest.h
Go to the documentation of this file.
1//
2// (C) Copyright 2005-2025 by Graebert GmbH.
3//
4// Permission to use, copy, modify, and distribute this software in
5// object code form for any purpose and without fee is hereby granted,
6// provided that the above copyright notice appears in all copies and
7// that both that copyright notice and the limited warranty and
8// restricted rights notice below appear in all supporting
9// documentation.
10//
11// GRAEBERT PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS.
12// GRAEBERT SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF
13// MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. GRAEBERT GMBH
14// DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE
15// UNINTERRUPTED OR ERROR FREE.
16
17#pragma once
18
20#include "../UI/FxUIObject.h"
22#include "../Core/FxUIVariant.h"
23#include "../Core/FxUIUrl.h"
24
26template< typename T >
27using CFxNAList = std::vector< T >;
28using CFxNAUrl = CFxUIUrl;
30
31class CFxNANetworkRequestImpl;
32
33#if defined( Q_OS_IOS )
34 typedef void* FxNetworkRequestHandle;
35#elif defined( Q_OS_ANDROID )
36 // TODO implementation
37 typedef CFxJavaHandle* FxNetworkRequestHandle;
38#else
39 #if defined(XENON)
40 // TODO implementation
41 typedef void* FxNetworkRequestHandle;
42 #else
43 class QNetworkRequest;
44 typedef QNetworkRequest* FxNetworkRequestHandle;
45 #endif
46#endif
47
52{
53public:
54
70
106
112 explicit CFxNANetworkRequest( const CFxNAUrl& url = CFxNAUrl() );
113
120
127
130
133
144
153
163 void setRawHeader( const CFxNAByteArray& headerName, const CFxNAByteArray& headerValue );
164
172 CFxNAVariant rawHeader( const CFxNAByteArray& headerName ) const;
173
182
188 void setUrl( const CFxNAUrl& url );
189
195 CFxNAUrl url() const;
196
204 void setRequestTimeout( int timeoutMs );
205
211 int requestTimeout() const;
212
213private:
214 CFxNANetworkRequestImpl *m_pImpl;
215 FxNetworkRequestHandle m_pHandle;
216
217 //...
218};
#define COMMONUI_API
CFxUIByteArray CFxNAByteArray
CFxUIVariant CFxNAVariant
CFxUIUrl CFxNAUrl
std::vector< T > CFxNAList
QNetworkRequest * FxNetworkRequestHandle
CFxNAUrl url() const
void setHeader(CFxNANetworkRequest::KnownHeaders header, const CFxNAVariant &value)
void setUrl(const CFxNAUrl &url)
CFxNANetworkRequest(const CFxNANetworkRequest &other)
@ CookieHeader
Corresponds to the HTTP Cookie header and contains a CFxList CFxNetworkCookie representing the cookie...
@ ContentTypeHeader
Corresponds to the HTTP Content-Type header and contains a string containing the media (MIME) type an...
@ UserAgentHeader
The User-Agent header sent by HTTP clients.
@ ServerHeader
The Server header received by HTTP clients.
@ LocationHeader
Corresponds to the HTTP Location header and contains a URL representing the actual location of the da...
@ SetCookieHeader
Corresponds to the HTTP Set-Cookie header and contains a CFxList CFxNetworkCookie representing the co...
@ ContentDispositionHeader
Corresponds to the HTTP Content-Disposition header and contains a string containing the disposition t...
@ LastModifiedHeader
Corresponds to the HTTP Last-Modified header and contains a CFxDateTime representing the last modific...
@ ContentLengthHeader
Corresponds to the HTTP Content-Length header and contains the length in bytes of the data transmitte...
CFxNAList< CFxNAByteArray > rawHeaderList() const
void setRawHeader(const CFxNAByteArray &headerName, const CFxNAByteArray &headerValue)
@ SpdyWasUsedAttribute
Replies only, type: CFxMetaType::Bool Indicates whether SPDY was used for receiving this reply.
@ CustomVerbAttribute
Requests only, type: CFxMetaType::QByteArray Holds the value for the custom HTTP verb to send (destin...
@ HTTP2WasUsedAttribute
Replies only, type: CFxMetaType::Bool (default: false) Indicates whether HTTP/2 was used for receivin...
@ User
Special type. Additional information can be passed in QVariants with types ranging from User to UserM...
@ DoNotBufferUploadDataAttribute
Requests only, type: CFxMetaType::Bool (default: false) Indicates whether the CFxNANetworkAccessManag...
@ ConnectionEncryptedAttribute
Replies only, type: CFxMetaType::Bool (default: false) Indicates whether the data was obtained throug...
@ RedirectionTargetAttribute
Replies only, type: CFxMetaType::CFxUrl (no default) If present, it indicates that the server is redi...
@ CookieLoadControlAttribute
Requests only, type: CFxMetaType::Int (default: CFxNANetworkRequest::Automatic) Indicates whether to ...
@ HttpStatusCodeAttribute
Replies only, type: CFxMetaType::Int (no default) Indicates the HTTP status code received from the HT...
@ OriginalContentLengthAttribute
Replies only, type CFxMetaType::Int Holds the original content-length attribute before being invalida...
@ FollowRedirectsAttribute
Requests only, type: CFxMetaType::Bool (default: false) Indicates whether the Network Access API shou...
@ CookieSaveControlAttribute
Requests only, type: CFxMetaType::Int (default: CFxNANetworkRequest::Automatic) Indicates whether to ...
@ HTTP2AllowedAttribute
Requests only, type: CFxMetaType::Bool (default: false) Indicates whether the CFxNANetworkAccessManag...
@ UserMax
Special type. See User.
@ SourceIsFromCacheAttribute
Replies only, type: CFxMetaType::Bool (default: false) Indicates whether the data was obtained from c...
@ HttpReasonPhraseAttribute
Replies only, type: CFxMetaType::QByteArray (no default) Indicates the HTTP reason phrase as received...
@ EmitAllUploadProgressSignalsAttribute
Requests only, type: CFxMetaType::Bool (default: false) Indicates whether all upload signals should b...
@ BackgroundRequestAttribute
Type: CFxMetaType::Bool (default: false) Indicates that this is a background transfer,...
@ HttpPipeliningAllowedAttribute
Requests only, type: CFxMetaType::Bool (default: false) Indicates whether the CFxNANetworkAccessManag...
@ SpdyAllowedAttribute
Requests only, type: CFxMetaType::Bool (default: false) Indicates whether the CFxNANetworkAccessManag...
@ HttpPipeliningWasUsedAttribute
Replies only, type: CFxMetaType::Bool Indicates whether the HTTP pipelining was used for receiving th...
@ CacheSaveControlAttribute
Requests only, type: CFxMetaType::Bool (default: true) Controls if the data obtained should be saved ...
@ CacheLoadControlAttribute
Requests only, type: CFxMetaType::Int (default: CFxNANetworkRequest::PreferNetwork) Controls how the ...
@ RedirectPolicyAttribute
Requests only, type: CFxMetaType::Int, should be one of the CFxNANetworkRequest::RedirectPolicy value...
@ AuthenticationReuseAttribute
Requests only, type: CFxMetaType::Int (default: CFxNANetworkRequest::Automatic) Indicates whether to ...
CFxNANetworkRequest & operator=(const CFxNANetworkRequest &other)
void setRequestTimeout(int timeoutMs)
CFxNAVariant header(CFxNANetworkRequest::KnownHeaders header) const
void setHandle(FxNetworkRequestHandle handle)
FxNetworkRequestHandle getHandle() const
int requestTimeout() const
CFxNANetworkRequest(const CFxNAUrl &url=CFxNAUrl())
CFxNAVariant rawHeader(const CFxNAByteArray &headerName) const
GLsizei const GLfloat * value
Definition gles2_ext.h:302