Home | All Classes | Main Classes | Annotated | Grouped Classes | Functions | ![]() |
The QNetworkOperation class provides common operations for network protocols. More...
#include <QNetworkOperation>
This class is part of the Qt 3 compatibility library. It is provided to keep old source code working. We strongly advise against using it in new code.
Inherits QObject.
The QNetworkOperation class provides common operations for network protocols.
An object is created to describe the operation and the current state for each operation that a network protocol should process.
For a detailed description of the Qt Network Architecture and how to implement and use network protocols in Qt, see the Qt Network Documentation.
See also QNetworkProtocol.
Constructs a network operation object. operation is the type of the operation, and arg0, arg1 and arg2 are the first three arguments of the operation. The state is initialized to QNetworkProtocol::StWaiting.
See also QNetworkProtocol::Operation and QNetworkProtocol::State.
Constructs a network operation object. operation is the type of the operation, and arg0, arg1, and arg2 are the first three raw data arguments of the operation. The state is initialized to QNetworkProtocol::StWaiting.
See also QNetworkProtocol::Operation and QNetworkProtocol::State.
Destructor.
Returns the operation's num-th argument. If this argument was not already set, an empty string is returned.
Returns the error code for the last error that occurred.
Sets this object to delete itself when it hasn't been used for one second.
Because QNetworkOperation pointers are passed around a lot the QNetworkProtocol generally does not have enough knowledge to delete these at the correct time. If a QNetworkProtocol doesn't need an operation any more it will call this function instead.
Note: you should never need to call the method yourself.
Returns the type of the operation.
Returns a detailed error message for the last error. This must have been set using setProtocolDetail().
Returns the operation's num-th raw data argument. If this argument was not already set, an empty bytearray is returned.
Sets the network operation's num-th argument to arg.
Sets the error code to ec.
If the operation failed, the protocol should set an error code to describe the error in more detail. If possible, one of the error codes defined in QNetworkProtocol should be used.
See also setProtocolDetail() and QNetworkProtocol::Error.
If the operation failed, the error message can be specified as detail.
Sets the network operation's num-th raw data argument to arg.
Sets the state of the operation object. This should be done by the network protocol during processing; at the end it should be set to QNetworkProtocol::StDone or QNetworkProtocol::StFailed, depending on success or failure.
See also QNetworkProtocol::State.
Returns the state of the operation. You can determine whether an operation is still waiting to be processed, is being processed, has been processed successfully, or failed.
Copyright © 2004 Trolltech. | Trademarks | Qt 4.0.0-tp2 |