#include <qtransportauth_qws.h>
|
virtual QString | analyze (QByteArray *) |
| Analzye the data in themsgQueue according to some protocol and produce a request string for policy analysis. More...
|
|
Definition at line 175 of file qtransportauth_qws.h.
◆ RequestAnalyzer()
RequestAnalyzer::RequestAnalyzer |
( |
| ) |
|
◆ ~RequestAnalyzer()
RequestAnalyzer::~RequestAnalyzer |
( |
| ) |
|
|
virtual |
◆ analyze()
Analzye the data in themsgQueue according to some protocol and produce a request string for policy analysis.
If enough data is in the queue for analysis of a complete message, return a non-null string, and set a flag so requireMoreData() will return false; otherwise return a null string and requireMoreData() return true.
The amount of bytes analyzed is then available via bytesAnalyzed().
A null string is also returned in the case where the message was corrupt and could not be analyzed. In this case requireMoreData() returns false.
Note: this method will modify the msgQueue and pull off the data deemed to be corrupt, in the case of corrupt data.
In all other cases the msgQueue is left alone. The calling code should then pull off the analyzed data. Use bytesAnalzyed() to find how much data to pull off the queue.
Definition at line 819 of file qtransportauth_qws.cpp.
830 if ( command == NULL )
832 *msgQueue = msgQueue->
mid(
sizeof(
int) );
837 if ( !command->
read( &cmdBuf ))
static QWSCommand * factory(int type)
int qws_read_uint(QIODevice *socket)
QLatin1String(DBUS_INTERFACE_DBUS))) Q_GLOBAL_STATIC_WITH_ARGS(QString
The QBuffer class provides a QIODevice interface for a QByteArray.
The QString class provides a Unicode character string.
QByteArray mid(int index, int len=-1) const
Returns a byte array containing len bytes from this byte array, starting at position pos...
QString arg(qlonglong a, int fieldwidth=0, int base=10, const QChar &fillChar=QLatin1Char(' ')) const Q_REQUIRED_RESULT
#define QWS_PROTOCOL_ITEM_SIZE(item)
static QString fromLatin1(const char *, int size=-1)
Returns a QString initialized with the first size characters of the Latin-1 string str...
const char * qws_getCommandTypeString(QWSCommand::Type tp)
#define Q_UNUSED(x)
Indicates to the compiler that the parameter with the specified name is not used in the body of a fun...
◆ bytesAnalyzed()
qint64 RequestAnalyzer::bytesAnalyzed |
( |
| ) |
const |
|
inline |
◆ operator()()
Definition at line 180 of file qtransportauth_qws.h.
virtual QString analyze(QByteArray *)
Analzye the data in themsgQueue according to some protocol and produce a request string for policy an...
◆ requireMoreData()
bool RequestAnalyzer::requireMoreData |
( |
| ) |
const |
|
inline |
◆ dataSize
qint64 RequestAnalyzer::dataSize |
|
protected |
◆ moreData
bool RequestAnalyzer::moreData |
|
protected |
The documentation for this class was generated from the following files: