Go to the source code of this file.
|
const char * | qws_getCommandTypeString (QWSCommand::Type tp) |
|
bool | qws_read_command (QIODevice *socket, char *&simpleData, int &simpleLen, char *&rawData, int &rawLen, int &bytesRead) |
|
void | qws_write_command (QIODevice *socket, int type, char *simpleData, int simpleLen, char *rawData, int rawLen) |
|
◆ qws_getCommandTypeString()
Definition at line 243 of file qwscommand_qws.cpp.
Referenced by RequestAnalyzer::analyze().
251 typeStr =
"Shutdown";
257 typeStr =
"RegionMove";
260 typeStr =
"RegionDestroy";
263 typeStr =
"SetProperty";
266 typeStr =
"AddProperty";
269 typeStr =
"RemoveProperty";
272 typeStr =
"GetProperty";
275 typeStr =
"SetSelectionOwner";
278 typeStr =
"ConvertSelection";
281 typeStr =
"RequestFocus";
284 typeStr =
"ChangeAltitude";
287 typeStr =
"SetOpacity";
290 typeStr =
"DefineCursor";
293 typeStr =
"SelectCursor";
296 typeStr =
"PositionCursor";
299 typeStr =
"GrabMouse";
302 typeStr =
"PlaySound";
305 typeStr =
"QCopRegisterChannel";
308 typeStr =
"QCopSend";
311 typeStr =
"RegionName";
314 typeStr =
"Identify";
317 typeStr =
"GrabKeyboard";
320 typeStr =
"RepaintRegion";
326 typeStr =
"IMUpdate";
329 typeStr =
"IMResponse";
◆ qws_read_command()
bool qws_read_command |
( |
QIODevice * |
socket, |
|
|
char *& |
simpleData, |
|
|
int & |
simpleLen, |
|
|
char *& |
rawData, |
|
|
int & |
rawLen, |
|
|
int & |
bytesRead |
|
) |
| |
Definition at line 388 of file qwscommand_qws.cpp.
Referenced by QWSProtocolItem::read().
400 if (simpleLen && !rawData) {
403 int tmp = socket->
read(simpleData, simpleLen);
410 qWarning(
"qws_read_command: Won't read command of length %d, " 411 "connection closed.", rawLen);
416 if (rawLen && !rawData) {
417 rawData =
new char[rawLen];
420 if (bytesRead < rawLen && socket->bytesAvailable())
421 bytesRead += socket->
read(rawData + bytesRead, rawLen - bytesRead);
423 return (bytesRead == rawLen);
virtual void close()
First emits aboutToClose(), then closes the device and sets its OpenMode to NotOpen.
int qws_read_uint(QIODevice *socket)
qint64 read(char *data, qint64 maxlen)
Reads at most maxSize bytes from the device into data, and returns the number of bytes read...
Q_CORE_EXPORT void qWarning(const char *,...)
virtual qint64 bytesAvailable() const
Returns the number of bytes that are available for reading.
#define Q_UNUSED(x)
Indicates to the compiler that the parameter with the specified name is not used in the body of a fun...
◆ qws_write_command()
void qws_write_command |
( |
QIODevice * |
socket, |
|
|
int |
type, |
|
|
char * |
simpleData, |
|
|
int |
simpleLen, |
|
|
char * |
rawData, |
|
|
int |
rawLen |
|
) |
| |
Definition at line 350 of file qwscommand_qws.cpp.
Referenced by QWSProtocolItem::write().
353 #ifdef QWSCOMMAND_DEBUG 354 if (simpleLen)
qDebug() <<
"WRITE simpleData " << QWSHexDump(simpleData, simpleLen);
355 if (rawLen > 0)
qDebug() <<
"WRITE rawData " << QWSHexDump(rawData, rawLen);
369 qWarning(
"qws_write_command: Message of size %d too big. " 376 if (simpleData && simpleLen)
377 socket->
write(simpleData, simpleLen);
379 if (rawLen && rawData)
380 socket->
write(rawData, rawLen);
long ASN1_INTEGER_get ASN1_INTEGER * a
Q_CORE_EXPORT void qDebug(const char *,...)
Q_CORE_EXPORT void qWarning(const char *,...)
Authenticate a message transport.
qint64 write(const char *data, qint64 len)
Writes at most maxSize bytes of data from data to the device.
void qws_write_uint(QIODevice *socket, int i)
The QIODevice class is the base interface class of all I/O devices in Qt.
QIODevice * passThroughByClient(QWSClient *) const
static QTransportAuth * getInstance()
Return a pointer to the instance of this process's QTransportAuth object.