This class is used to define operations for network protocols and return the state, arguments, etc. More...
#include <qnetworkprotocol.h>
Inherits QObject.
For each operation, which a network protocol should process such an object is created to describe the operation and the current state.
For a detailed description about the Qt Network Architecture, and also how to implement and use network protocols in Qt, look at the Qt Network Documentation.
See also QNetworkProtocol.
Constructs a network operation object. operation is the type of the operation, arg0, arg1 and arg2 are the first three raw data arguments of the operation. The state is initialized to QNetworkProtocol::StWaiting.
Constructs a network operation object. operation is the type of the operation, arg0, arg1 and arg2 are the first three arguments of the operation. The state is initialized to QNetworkProtocol::StWaiting.
Destructor.
Returns the argument num of the operation. If this argument was not set already, an empty string is returned.
If an operation failed, you get the error code using this methode.
If this method is called the QNetworkOperation deletes itself after it has been 1 second unused, which means for 1 second no method of the QNetworkOperation has been accessed.
Because QNetworkOperation pointers are passed around a lot the QNetworkProtocol can't delete these at the correct time. So, if a QNetworkProtocol doesn't need an operation anymore and calls this method, so that it gets deleted correctly.
You should never need to call the method yourself!.
Returns the type of the operation.
If the operation failed, using this method you may get a more detailed error message.
Returns the raw data argument num of the operation. If this argument was not set already, an empty bytearray is returned.
Sets the argument num of the network operation to arg.
If the operation failed, the protocol should set an error code to describe the error more detailed. Preferable one of the error codes defined in QNetworkProtocol should be used.
If the operation failed a detailed error message can be set.
Sets the raw data argument num of the network operation to arg.
Sets the state of the operation object. This should be done by the network protocol during processing it, and at the end it should be set to QNetworkProtocol::StDone or QNetworkProtocol::StFailed depending on success or failure.
Returns the state of the operation. Using that you can find out if an operation is still waiting to get processed, if it is in process or if has been done successfully or if it failed.
Search the documentation, FAQ, qt-interest archive and more (uses
www.trolltech.com):
This file is part of the Qt toolkit, copyright © 1995-2000 Trolltech, all rights reserved.
Copyright İ 2000 Trolltech | Trademarks | Qt version 2.2.1
|