|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.lang.Enum
com.trolltech.qt.network.QNetworkRequest.Attribute
public static final class QNetworkRequest.Attribute
Attribute codes for the QNetworkRequest
and QNetworkReply
.
Attributes are extra meta-data that are used to control the behavior of the request and to pass further information from the reply back to the application. Attributes are also extensible, allowing custom implementations to pass custom values.
The following table explains what the default attribute codes are, the QVariant
types associated, the default value if said attribute is missing and whether it's used in requests or replies.
Field Summary | |
---|---|
static QNetworkRequest.Attribute |
CacheLoadControlAttribute
Requests only, type. |
static QNetworkRequest.Attribute |
CacheSaveControlAttribute
Requests only, type. |
static QNetworkRequest.Attribute |
ConnectionEncryptedAttribute
Replies only, type. |
static QNetworkRequest.Attribute |
CustomEnum
|
static QNetworkRequest.Attribute |
HttpReasonPhraseAttribute
Replies only, type. |
static QNetworkRequest.Attribute |
HttpStatusCodeAttribute
Replies only, type. |
static QNetworkRequest.Attribute |
RedirectionTargetAttribute
Replies only, type. |
static QNetworkRequest.Attribute |
User
Special type. |
static QNetworkRequest.Attribute |
UserMax
Special type. |
Method Summary | |
---|---|
static QNetworkRequest.Attribute |
resolve(int value)
|
int |
value()
This function should return an integer value for the enum values of the enumeration that implements this interface. |
static QNetworkRequest.Attribute |
valueOf(java.lang.String name)
|
static QNetworkRequest.Attribute[] |
values()
|
Methods inherited from class java.lang.Enum |
---|
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf |
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final QNetworkRequest.Attribute HttpStatusCodeAttribute
QVariant::Int
(no default) Indicates the HTTP status code received from the HTTP server (like 200, 304, 404, 401, etc.). If the connection was not HTTP-based, this attribute will not be present.
public static final QNetworkRequest.Attribute HttpReasonPhraseAttribute
QVariant::ByteArray
(no default) Indicates the HTTP reason phrase as received from the HTTP server (like "Ok", "Found", "Not Found", "Access Denied", etc.) This is the human-readable representation of the status code (see above). If the connection was not HTTP-based, this attribute will not be present.
public static final QNetworkRequest.Attribute RedirectionTargetAttribute
QVariant::Url
(no default) If present, it indicates that the server is redirecting the request to a different URL. The Network Access API does not by default follow redirections: it's up to the application to determine if the requested redirection should be allowed, according to its security policies.
public static final QNetworkRequest.Attribute ConnectionEncryptedAttribute
QVariant::Bool
(default: false) Indicates whether the data was obtained through an encrypted (secure) connection.
public static final QNetworkRequest.Attribute CacheLoadControlAttribute
QVariant::Int
(default: QNetworkRequest::PreferNetwork
) Controls how the cache should be accessed. The possible values are those of QNetworkRequest::CacheLoadControl
. Note that the default QNetworkAccessManager
implementation does not support caching. However, this attribute may be used by certain backends to modify their requests (for example, for caching proxies).
public static final QNetworkRequest.Attribute CacheSaveControlAttribute
QVariant::Bool
(default: true) Controls if the data obtained should be saved to cache for future uses. If the value is false, the data obtained will not be automatically cached. If true, data may be cached, provided it is cacheable (what is cacheable depends on the protocol being used). Note that the default QNetworkAccessManager
implementation does not support caching, so it will ignore this attribute.
public static final QNetworkRequest.Attribute User
UserMax
. The default implementation of Network Access will ignore any request attributes in this range and it will not produce any attributes in this range in replies. The range is reserved for extensions of QNetworkAccessManager
.
public static final QNetworkRequest.Attribute UserMax
public static final QNetworkRequest.Attribute CustomEnum
Method Detail |
---|
public static QNetworkRequest.Attribute[] values()
public static QNetworkRequest.Attribute valueOf(java.lang.String name)
public int value()
value
in interface QtEnumerator
public static QNetworkRequest.Attribute resolve(int value)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |