Eneboo - Documentación para desarrolladores
Métodos públicos | Amigas
Referencia de la Clase QNetworkOperation

The QNetworkOperation class provides common operations for network protocols.networkAn object is created to describe the operation and the current state for each operation that a network protocol should process. Más...

#include <qnetworkprotocol.h>

Diagrama de herencias de QNetworkOperation
QObject QObject Qt Qt Qt Qt

Lista de todos los miembros.

Métodos públicos

 QNetworkOperation (QNetworkProtocol::Operation operation, const QString &arg0, const QString &arg1, const QString &arg2)
 QNetworkOperation (QNetworkProtocol::Operation operation, const QByteArray &arg0, const QByteArray &arg1, const QByteArray &arg2)
 ~QNetworkOperation ()
void setState (QNetworkProtocol::State state)
void setProtocolDetail (const QString &detail)
void setErrorCode (int ec)
void setArg (int num, const QString &arg)
void setRawArg (int num, const QByteArray &arg)
QNetworkProtocol::Operation operation () const
QNetworkProtocol::State state () const
QString arg (int num) const
QByteArray rawArg (int num) const
QString protocolDetail () const
int errorCode () const
void free ()
 QNetworkOperation (QNetworkProtocol::Operation operation, const QString &arg0, const QString &arg1, const QString &arg2)
 QNetworkOperation (QNetworkProtocol::Operation operation, const QByteArray &arg0, const QByteArray &arg1, const QByteArray &arg2)
 ~QNetworkOperation ()
void setState (QNetworkProtocol::State state)
void setProtocolDetail (const QString &detail)
void setErrorCode (int ec)
void setArg (int num, const QString &arg)
void setRawArg (int num, const QByteArray &arg)
QNetworkProtocol::Operation operation () const
QNetworkProtocol::State state () const
QString arg (int num) const
QByteArray rawArg (int num) const
QString protocolDetail () const
int errorCode () const
void free ()

Amigas

class QUrlOperator

Descripción detallada

The QNetworkOperation class provides common operations for network protocols.

network

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.

Ver también:
QNetworkProtocol

Documentación del constructor y destructor

QNetworkOperation::QNetworkOperation ( QNetworkProtocol::Operation  operation,
const QString arg0,
const QString arg1,
const QString arg2 
)

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.

Ver también:
QNetworkProtocol::Operation QNetworkProtocol::State
QNetworkOperation::QNetworkOperation ( QNetworkProtocol::Operation  operation,
const QByteArray arg0,
const QByteArray arg1,
const QByteArray arg2 
)

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.

Ver también:
QNetworkProtocol::Operation QNetworkProtocol::State
QNetworkOperation::~QNetworkOperation ( )

Destructor.

QNetworkOperation::QNetworkOperation ( QNetworkProtocol::Operation  operation,
const QString arg0,
const QString arg1,
const QString arg2 
)
QNetworkOperation::QNetworkOperation ( QNetworkProtocol::Operation  operation,
const QByteArray arg0,
const QByteArray arg1,
const QByteArray arg2 
)
QNetworkOperation::~QNetworkOperation ( )

Documentación de las funciones miembro

QString QNetworkOperation::arg ( int  num) const

Returns the operation's {num}-th argument. If this argument was not already set, an empty string is returned.

QString QNetworkOperation::arg ( int  num) const
int QNetworkOperation::errorCode ( ) const

Returns the error code for the last error that occurred.

int QNetworkOperation::errorCode ( ) const
void QNetworkOperation::free ( )

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.

void QNetworkOperation::free ( )
QNetworkProtocol::Operation QNetworkOperation::operation ( ) const
QNetworkProtocol::Operation QNetworkOperation::operation ( ) const

Returns the type of the operation.

QString QNetworkOperation::protocolDetail ( ) const

Returns a detailed error message for the last error. This must have been set using setProtocolDetail().

QString QNetworkOperation::protocolDetail ( ) const
QByteArray QNetworkOperation::rawArg ( int  num) const

Returns the operation's {num}-th raw data argument. If this argument was not already set, an empty bytearray is returned.

QByteArray QNetworkOperation::rawArg ( int  num) const
void QNetworkOperation::setArg ( int  num,
const QString arg 
)
void QNetworkOperation::setArg ( int  num,
const QString arg 
)

Sets the network operation's {num}-th argument to arg.

void QNetworkOperation::setErrorCode ( int  ec)

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.

Ver también:
setProtocolDetail() QNetworkProtocol::Error
void QNetworkOperation::setErrorCode ( int  ec)
void QNetworkOperation::setProtocolDetail ( const QString detail)
void QNetworkOperation::setProtocolDetail ( const QString detail)

If the operation failed, the error message can be specified as detail.

void QNetworkOperation::setRawArg ( int  num,
const QByteArray arg 
)
void QNetworkOperation::setRawArg ( int  num,
const QByteArray arg 
)

Sets the network operation's {num}-th raw data argument to arg.

void QNetworkOperation::setState ( QNetworkProtocol::State  state)
void QNetworkOperation::setState ( QNetworkProtocol::State  state)

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.

Ver también:
QNetworkProtocol::State
QNetworkProtocol::State QNetworkOperation::state ( ) const
QNetworkProtocol::State QNetworkOperation::state ( ) const

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.


Documentación de las funciones relacionadas y clases amigas

QUrlOperator [friend]

La documentación para esta clase fue generada a partir de los siguientes ficheros:
 Todo Clases Namespaces Archivos Funciones Variables 'typedefs' Enumeraciones Valores de enumeraciones Propiedades Amigas 'defines'