Viadeo Twitter Google Bookmarks ! Facebook Digg del.icio.us MySpace Yahoo MyWeb Blinklist Netvouz Reddit Simpy StumbleUpon Bookmarks Windows Live Favorites 
Logo Documentation Qt ·  Page d'accueil  ·  Toutes les classes  ·  Classes principales  ·  Annotées  ·  Classes groupées  ·  Modules  ·  Fonctions  · 

Q3NetworkOperation Class Reference
[Qt3Support module]

The Q3NetworkOperation class provides common operations for network protocols. More...

 #include <Q3NetworkOperation>

This class is part of the Qt 3 support library. It is provided to keep old source code working. We strongly advise against using it in new code. See Porting to Qt 4 for more information.

Inherits QObject.

Public Functions

  • 29 public functions inherited from QObject

Additional Inherited Members

  • 1 property inherited from QObject
  • 1 public slot inherited from QObject
  • 1 signal inherited from QObject
  • 5 static public members inherited from QObject
  • 7 protected functions inherited from QObject

Detailed Description

The Q3NetworkOperation 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.

See also Q3NetworkProtocol.


Member Function Documentation

Q3NetworkOperation::Q3NetworkOperation ( Q3NetworkProtocol::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 Q3NetworkProtocol::StWaiting.

See also Q3NetworkProtocol::Operation and Q3NetworkProtocol::State.

Q3NetworkOperation::Q3NetworkOperation ( Q3NetworkProtocol::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 Q3NetworkProtocol::StWaiting.

See also Q3NetworkProtocol::Operation and Q3NetworkProtocol::State.

Q3NetworkOperation::~Q3NetworkOperation ()

Destructor.

QString Q3NetworkOperation::arg ( int num ) const

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

See also setArg().

int Q3NetworkOperation::errorCode () const

Returns the error code for the last error that occurred.

See also setErrorCode().

void Q3NetworkOperation::free ()

Sets this object to delete itself when it hasn't been used for one second.

Because Q3NetworkOperation pointers are passed around a lot the Q3NetworkProtocol generally does not have enough knowledge to delete these at the correct time. If a Q3NetworkProtocol doesn't need an operation any more it will call this function instead.

Note: you should never need to call the method yourself.

Q3NetworkProtocol::Operation Q3NetworkOperation::operation () const

Returns the type of the operation.

QString Q3NetworkOperation::protocolDetail () const

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

See also setProtocolDetail().

QByteArray Q3NetworkOperation::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.

See also setRawArg().

void Q3NetworkOperation::setArg ( int num, const QString & arg )

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

See also arg().

void Q3NetworkOperation::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 Q3NetworkProtocol should be used.

See also errorCode(), setProtocolDetail(), and Q3NetworkProtocol::Error.

void Q3NetworkOperation::setProtocolDetail ( const QString & detail )

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

See also protocolDetail().

void Q3NetworkOperation::setRawArg ( int num, const QByteArray & arg )

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

See also rawArg().

void Q3NetworkOperation::setState ( Q3NetworkProtocol::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 Q3NetworkProtocol::StDone or Q3NetworkProtocol::StFailed, depending on success or failure.

See also state() and Q3NetworkProtocol::State.

Q3NetworkProtocol::State Q3NetworkOperation::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.

See also setState().

Publicité

Best Of

Actualités les plus lues

Semaine
Mois
Année
  1. Microsoft ouvre aux autres compilateurs C++ AMP, la spécification pour la conception d'applications parallèles C++ utilisant le GPU 22
  2. Les développeurs ignorent-ils trop les failles découvertes dans leur code ? Prenez-vous en compte les remarques des autres ? 17
  3. « Quelque chose ne va vraiment pas avec les développeurs "modernes" », un développeur à "l'ancienne" critique la multiplication des bibliothèques 17
  4. RIM : « 13 % des développeurs ont gagné plus de 100 000 $ sur l'AppWord », Qt et open-source au menu du BlackBerry DevCon Europe 0
  5. BlackBerry 10 : premières images du prochain OS de RIM qui devrait intégrer des widgets et des tuiles inspirées de Windows Phone 0
  6. Adieu qmake, bienvenue qbs : Qt Building Suite, un outil déclaratif et extensible pour la compilation de projets Qt 17
  7. Quelles nouveautés de C++11 Visual C++ doit-il rapidement intégrer ? Donnez-nous votre avis 10
Page suivante

Le blog Digia au hasard

Logo

Déploiement d'applications Qt Commercial sur les tablettes Windows 8

Le blog Digia est l'endroit privilégié pour la communication sur l'édition commerciale de Qt, où des réponses publiques sont apportées aux questions les plus posées au support. Lire l'article.

Communauté

Ressources

Liens utiles

Contact

  • Vous souhaitez rejoindre la rédaction ou proposer un tutoriel, une traduction, une question... ? Postez dans le forum Contribuez ou contactez-nous par MP ou par email (voir en bas de page).

Qt dans le magazine

Cette page est une traduction d'une page de la documentation de Qt, écrite par Nokia Corporation and/or its subsidiary(-ies). Les éventuels problèmes résultant d'une mauvaise traduction ne sont pas imputables à Nokia. Qt 4.2
Copyright © 2012 Developpez LLC. Tous droits réservés Developpez LLC. Aucune reproduction, même partielle, ne peut être faite de ce site et de l'ensemble de son contenu : textes, documents et images sans l'autorisation expresse de Developpez LLC. Sinon, vous encourez selon la loi jusqu'à 3 ans de prison et jusqu'à 300 000 E de dommages et intérêts. Cette page est déposée à la SACD.
Vous avez déniché une erreur ? Un bug ? Une redirection cassée ? Ou tout autre problème, quel qu'il soit ? Ou bien vous désirez participer à ce projet de traduction ? N'hésitez pas à nous contacter ou par MP !
 
 
 
 
Partenaires

Hébergement Web