QObexPushClient Class Reference
|
Constant | Value | Description |
---|---|---|
QObexPushClient::None | 0 | No command is being executed. |
QObexPushClient::Connect | 1 | connect() is being executed. |
QObexPushClient::Disconnect | 2 | disconnect() is being executed. |
QObexPushClient::Send | 3 | send() is being executed. |
QObexPushClient::SendBusinessCard | 4 | sendBusinessCard() is being executed. |
QObexPushClient::RequestBusinessCard | 5 | requestBusinessCard() is being executed. |
Defines the possible errors for a push client.
Constant | Value | Description |
---|---|---|
QObexPushClient::NoError | 0 | No error has occurred. |
QObexPushClient::ConnectionError | 1 | The client is unable to send data, or the client-server communication process is otherwise disrupted. In this case, the client and server are no longer synchronized with each other, so the QIODevice provided in the constructor should not be used for any more OBEX requests. |
QObexPushClient::RequestFailed | 2 | The client's request was refused by the remote service, or an error occurred while sending the request. |
QObexPushClient::Aborted | 3 | The command was aborted by a call to abort(). |
QObexPushClient::UnknownError | 100 | An error other than those specified above occurred. |
Constructs an OBEX Push client that uses device for the transport connection. The parent is the QObject parent.
The device should already be opened, or else commands will fail with ConnectionError.
Destroys the client.
Aborts the current file transfer operation and deletes all scheduled commands.
If there is a file transfer operation in progress, an Abort command will be sent to the server. When the server replies that the command is aborted, the commandFinished() signal will be emitted with the error argument set to true, and the error() function will return QObexPushClient::Aborted.
If there is no file transfer operation in progress, or the operation finishes before it can be aborted, the operation will be completed normally and the error argument for the commandFinished() signal will be set to false.
If no other commands are started after the call to abort(), there will be no scheduled commands and the done() signal will be emitted.
Deletes all pending commands from the list of scheduled commands. This does not affect the command that is being executed. If you want to stop this command as well, use abort().
See also hasPendingCommands(), currentId(), currentCommand(), and abort().
This signal is emitted when the client has finished processing the command identified by id. The error value is true if an error occurred during the processing of the command; otherwise error is false.
Note: Some OBEX Push services close the transport connection as soon as a file transfer operation is completed. In this case, if an OBEX Push client sends a file transfer request and then sends a disconnect() request, the disconnect() request will fail as the transport connection is no longer available.
See also commandStarted() and currentId().
This signal is emitted when the client has started processing the command identified by id.
See also commandFinished() and currentId().
Sends a Connect command to the OBEX server to initiate the OBEX session.
This function returns immediately. It will be executed asynchronously, and the unique identifier that is returned from this function can be used to track the the status of the command through the currentId() function and the commandStarted() and commandFinished() signals.
See also disconnect().
Returns the command that is being executed, or QObexPushClient::None if there is no command being executed.
See also currentId().
Returns the identifier of the command that is being executed, or 0 if there is no command being executed.
See also currentCommand() and hasPendingCommands().
This signal is emitted during file transfer operations to indicate the progress of the transfer. The done value is the number of bytes that have been sent or received so far, and total is the total number of bytes to be sent or received.
Sends a Disconnect command to the OBEX server to close the OBEX session.
This function returns immediately. It will be executed asynchronously, and the unique identifier that is returned from this function can be used to track the the status of the command through the currentId() function and the commandStarted() and commandFinished() signals.
Note: Some OBEX Push services close the transport connection as soon as a file transfer operation is completed. In this case, if an OBEX Push client sends a file transfer request and then sends a disconnect() request, the disconnect() request will fail as the transport connection is no longer available.
See also connect().
This signal is emitted when all pending commands have finished; it is emitted after the commandFinished() signal for the last request. The error value is true if an error occurred during the processing of the command; otherwise error is false.
Returns the last error that occurred. This is useful for finding out what happened when receiving a commandFinished() or done() signal that has the error argument set to true.
If you start a new command, the error status is reset to NoError.
Performs a business card exchange operation by sending this client's business card, given by mine, and then requesting a business card from the remote device, which will be stored in theirs.
The putId will be set to the unique identifier for the Put command that is executed when the client's business card is sent. The getId will be set to the unique identifier for Get command that is executed when the client requests the business card from the server.
Note that this method is equivalent to calling the sendBusinessCard() method and then calling the requestBusinessCard() method.
Returns true if there are any commands scheduled that have not yet been executed; otherwise returns false.
The command that is being executed is not considered as a scheduled command.
See also clearPendingCommands(), currentId(), and currentCommand().
Returns the server's response code for the last completed command.
Requests a business card from the OBEX server. The received contents will be stored in vcard.
Sends the contents of device to the OBEX server, using the given name, type and description to describe the contents to the server. If a given name, type or description value is a null string, that value will not be used in the request.
This function returns immediately. It will be executed asynchronously, and the unique identifier that is returned from this function can be used to track the the status of the command through the currentId() function and the commandStarted() and commandFinished() signals.
This is an overloaded member function, provided for convenience.
This convenience function sends the contents of array to the OBEX server, using name, type and description to describe the contents to the server. If a given name, type or description value is a null string, that value will not be used in the request.
Sends the business card stored in vcard to the OBEX server.
Returns the device used for this OBEX Push client session, as provided in the constructor.
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 qtextended4.4 | |
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 ! |
Copyright © 2000-2012 - www.developpez.com