Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
qnetworkcookie.cpp File Reference

(3c80e8892459f47a6261df317eb6eb4d9c790837)

#include "qnetworkcookie.h"
#include "qnetworkcookie_p.h"
#include "qnetworkrequest.h"
#include "qnetworkreply.h"
#include "QtCore/qbytearray.h"
#include "QtCore/qdatetime.h"
#include "QtCore/qdebug.h"
#include "QtCore/qlist.h"
#include "QtCore/qlocale.h"
#include <QtCore/qregularexpression.h>
#include "QtCore/qstring.h"
#include "QtCore/qstringlist.h"
#include "QtCore/qtimezone.h"
#include "QtCore/qurl.h"
#include "QtNetwork/qhostaddress.h"
#include "private/qobject_p.h"
#include "moc_qnetworkcookie.cpp"
+ Include dependency graph for qnetworkcookie.cpp:

Go to the source code of this file.

Macros

#define ADAY   1
 
#define AMONTH   2
 
#define AYEAR   4
 

Functions

static QPair< QByteArray, QByteArraynextField (QByteArrayView text, int &position, bool isNameValue)
 
static bool isNumber (char s)
 
static bool isTerminator (char c)
 
static bool isValueSeparator (char c)
 
static bool isWhitespace (char c)
 
static bool checkStaticArray (int &val, QByteArrayView dateString, int at, const char *array, int size)
 
static QDateTime parseDateString (QByteArrayView dateString)
 
QDebug operator<< (QDebug s, const QNetworkCookie &cookie)
 

Variables

static const char zones []
 
static const int zoneOffsets [] = {-8, -8, -7, -7, -6, -6, -5, -5, -4, -3, 0, 0, 0, 1, 2, 9 }
 
static const char months []
 

Macro Definition Documentation

◆ ADAY

#define ADAY   1

Definition at line 607 of file qnetworkcookie.cpp.

Referenced by parseDateString().

◆ AMONTH

#define AMONTH   2

Definition at line 608 of file qnetworkcookie.cpp.

Referenced by parseDateString().

◆ AYEAR

#define AYEAR   4

Definition at line 609 of file qnetworkcookie.cpp.

Referenced by parseDateString().

Function Documentation

◆ checkStaticArray()

static bool checkStaticArray ( int & val,
QByteArrayView dateString,
int at,
const char * array,
int size )
static

Definition at line 583 of file qnetworkcookie.cpp.

References at, i, j, and str.

Referenced by parseDateString().

+ Here is the caller graph for this function:

◆ isNumber()

static bool isNumber ( char s)
inlinestatic

Definition at line 571 of file qnetworkcookie.cpp.

Referenced by QQmlLocaleValueType::formattedDataSize(), QV4::NumberPrototype::method_isFinite(), QV4::NumberPrototype::method_isNaN(), parseDateString(), QQmlContext::setContextProperty(), and QQuick3DModel::translateMeshSource().

+ Here is the caller graph for this function:

◆ isTerminator()

static bool isTerminator ( char c)
inlinestatic

Definition at line 574 of file qnetworkcookie.cpp.

Referenced by isValueSeparator().

+ Here is the caller graph for this function:

◆ isValueSeparator()

static bool isValueSeparator ( char c)
inlinestatic

Definition at line 577 of file qnetworkcookie.cpp.

References isTerminator().

Referenced by QNetworkCookiePrivate::parseSetCookieHeaderLine().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ isWhitespace()

static bool isWhitespace ( char c)
inlinestatic

Definition at line 580 of file qnetworkcookie.cpp.

Referenced by parseDateString().

+ Here is the caller graph for this function:

◆ nextField()

static QPair< QByteArray, QByteArray > nextField ( QByteArrayView text,
int & position,
bool isNameValue )
static

Definition at line 379 of file qnetworkcookie.cpp.

References QString::indexOf(), QString::mid(), nextNonWhitespace(), position(), QByteArray(), qMakePair(), QString::size(), text, and QString::trimmed().

Referenced by QNetworkCookiePrivate::parseSetCookieHeaderLine().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ operator<<()

QDebug operator<< ( QDebug s,
const QNetworkCookie & cookie )

Definition at line 1091 of file qnetworkcookie.cpp.

References QNetworkCookie::Full, and QNetworkCookie::toRawForm().

+ Here is the call graph for this function:

◆ parseDateString()

static QDateTime parseDateString ( QByteArrayView dateString)
static

Definition at line 630 of file qnetworkcookie.cpp.

References ADAY, QDateTime::addSecs(), AMONTH, at, AYEAR, checkStaticArray(), currentValue, d, date, dateTime, QString::fromLatin1(), i, QTime::isNull(), isNumber(), QDate::isValid(), QDateTime::isValid(), isWhitespace(), j, match(), months, Q_FALLTHROUGH, qDebug, qSwap(), sign(), time, unknown, QTimeZone::UTC, zoneOffsets, and zones.

Referenced by QNetworkCookiePrivate::parseSetCookieHeaderLine().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Variable Documentation

◆ months

const char months[]
static
Initial value:
=
"jan\0"
"feb\0"
"mar\0"
"apr\0"
"may\0"
"jun\0"
"jul\0"
"aug\0"
"sep\0"
"oct\0"
"nov\0"
"dec\0"
"\0"

Definition at line 556 of file qnetworkcookie.cpp.

Referenced by parseDateString().

◆ zoneOffsets

const int zoneOffsets[] = {-8, -8, -7, -7, -6, -6, -5, -5, -4, -3, 0, 0, 0, 1, 2, 9 }
static

Definition at line 554 of file qnetworkcookie.cpp.

Referenced by parseDateString().

◆ zones

const char zones[]
static
Initial value:
=
"pst\0"
"pdt\0"
"mst\0"
"mdt\0"
"cst\0"
"cdt\0"
"est\0"
"edt\0"
"ast\0"
"nst\0"
"gmt\0"
"utc\0"
"bst\0"
"met\0"
"eet\0"
"jst\0"
"\0"

Definition at line 536 of file qnetworkcookie.cpp.

Referenced by parseDateString(), and QWasmWindowStack::windowPositionPreferenceChanged().