| Home · All Classes · Annotated · Functions |
The QBluetoothObexSender class allows sending files over Bluetooth OBEX Push. More...
#include <QBluetoothObexSender>
Inherits QObject.
The QBluetoothObexSender class allows sending files over Bluetooth OBEX Push.
The QBluetoothObexSender class can be used to send a single file to an OBEX Bluetooth Push server. The file sent can either be a business card (vCard), calendar (vCal), or any other file type.
Defines the Errors states that the object can be in.
enum Error { NoError, ConnectionError, RequestError, LinkError, UnknownError };
| Constant | Value | Description |
|---|---|---|
| QBluetoothObexSender::NoError | 0 | No error has occurred. |
| QBluetoothObexSender::ConnectionError | 1 | Error during the connection attempt. |
| QBluetoothObexSender::RequestError | 2 | Error during a request |
| QBluetoothObexSender::LinkError | 3 | A connection link has been interrupted. |
| QBluetoothObexSender::UnknownError | 4 | Something unknown happened that caused the connection to be terminated. |
Defines the States that the object can be in.
| Constant | Value | Description |
|---|---|---|
| QBluetoothObexSender::Unconnected | 0 | The object is not connected to the server. |
| QBluetoothObexSender::Connecting | 1 | An OBEX CMD_CONNECT has been sent. |
| QBluetoothObexSender::Ready | 2 | CMD_CONNECT has been accepted by the server, ready to send. |
| QBluetoothObexSender::Streaming | 3 | Sending a file to the server. |
| QBluetoothObexSender::Disconnecting | 4 | Sending a CMD_DISCONNECT to the OBEX server. |
Constructs a new Bluetooth OBEX Sender object. The local argument is used to determine which local device will perform the request. This can be either a valid local bluetooth device address or the special value QBluetoothAddress::any. In which case the initiating device is chosen randomly. The remote argument specifies the address of the remote OBEX Push server. The rfcomm_channel argument specifies the channel number of the remote OBEX Push server. The parent parameter specifies the QObject parent of the sender.
Deconstructs a Bluetooth OBEX Sender.
Attempts to abort the file send operation. This operation has no effect if no request is currently in progress.
This signal is emitted whenever the current sender object is about to delete itself. This will only happen if the autoDelete property is set.
See also setAutoDelete() and autoDelete().
Returns whether autoDelete property is enabled.
See also setAutoDelete().
This signal is emitted whenever a request is completed. The error parameter reports whether an error occurred during a request.
Returns the current error state of the object
Returns the address of the local device specified during construction.
This signal is emitted reports the progress of the file send operation. The completed parameter reports how many bytes were sent, and total parameter reports the total number of bytes to send.
Returns the address of the remote device the sender will attempt to connect to.
Initiates a new send request. The sender will connect to the server specified in the constructor, and will push a file specified by filename. If the mimetype is not provided (empty) then the mimetype will be guessed based on the file extension.
This method returns true if the request could be started successfully, and false otherwise (for instance, request already in progress.) Once the request finishes, if the object is set to autoDelete, the sender will delete itself.
Sets the object autoDelete property to enable. If autoDelete is enabled, then the sender object will automatically delete itself once it completes its request or is aborted. If autoDelete is disabled, the programmer has to manually handle the destruction of the object.
See also autoDelete().
Returns the current state of the object
This signal is emitted whenever a sender object changes state. The state parameter holds the current state.
| Copyright © 2006 Trolltech | Trademarks | Qtopia 4.1.7 |