QBluetoothZero  2.0
QBtObjectExchangeServer Class Reference

#include <QBtObjectExchangeServer.h>

List of all members.

Public Types

enum  ErrorCode {
  QObexServerUndefined, QObexServerFailedToInitialize, QObexServerInUse, QObexServerClientAbortedTransfer,
  QObexServerAbortedTransmission, QObexServerSessionError, QObexServerSessionPutRequestProblem, QObexServerSessionCopyFileError

Public Slots

void startServer (const QBtUuid &serviceId, const QString &serviceName="My OBEX Service")
void stopServer ()


void serverStarted ()
void serverStopped ()
void error (ErrorCode code)
void receivingObjectInfo (int overalDataSize, int bytesSent)
void receivingStarted ()
void receivingStopped (const QString &receivedFileName)
void transmittingRejected ()
void transmittingObjectInfo (int overalDataSize, int byteSent)
void transmittingStarted (const QString &transmittingfileName)
void transmittingStopped (const QString &transmittingfileName)
void clientAbortedTransmittion ()

Public Member Functions

 QBtObjectExchangeServer (QObject *parent)
 ~QBtObjectExchangeServer ()
bool isConnected ()
QBtServicegetTransmittingServiceInfo ()

Protected Member Functions

void setTransmittingService (const QBtService &service)
void startAdvertisingService (const QBtService &service)
void stopAdvertisingService ()


class QBtObjectExchangeServerPrivate

Detailed Description

This class is used to create an OBEX server. After instantiation user can call startServer(const QString&) to start the server. From the serviceName argument user can specify the name of the OBEX service which is how the service will be identified by other devices. By default the name is MyOBEX.

If sever started successfully and is ready to use then serverStarted() signal is emitted. At destruction time or if user calls stopServer(),terminates the service transmittion and disconnects from any device connected and serverStopped() signal is emitted.

All the remaining signals are only for feedback in case any action that is done.

Member Enumeration Documentation


Constructor & Destructor Documentation

QBtObjectExchangeServer::QBtObjectExchangeServer ( QObject *  parent)
QBtObjectExchangeServer::~QBtObjectExchangeServer ( )

Member Function Documentation

void QBtObjectExchangeServer::clientAbortedTransmittion ( ) [signal]

Emitted if during a transmittion the client aborts it.

void QBtObjectExchangeServer::error ( ErrorCode  code) [signal]

Emitted in case of error

QBtService& QBtObjectExchangeServer::getTransmittingServiceInfo ( )

If startServer() function is already called then using this function the user can acquire the information of the transmitting service that represents this server to the outside world.

bool QBtObjectExchangeServer::isConnected ( )

Returns true if the server is connected.

void QBtObjectExchangeServer::receivingObjectInfo ( int  overalDataSize,
int  bytesSent 
) [signal]

Emitted as a feedback of the running receive status of any data (file or byte buffer)

void QBtObjectExchangeServer::receivingStarted ( ) [signal]

Emitted when the transmittion of a file or byte buffer is started from a remote client to the local device.

void QBtObjectExchangeServer::receivingStopped ( const QString &  receivedFileName) [signal]

Emitted when a receiving of a file or byte buffer is stopped, being successfull or not.

void QBtObjectExchangeServer::serverStarted ( ) [signal]

Emitted when server is successfully started and ready to use.

void QBtObjectExchangeServer::serverStopped ( ) [signal]

Emitted when server is disconnected and stopped

void QBtObjectExchangeServer::setTransmittingService ( const QBtService service) [protected]
void QBtObjectExchangeServer::startAdvertisingService ( const QBtService service) [protected]

Initializes a new advertiser and starts the transmitting of the service passed as argument.

void QBtObjectExchangeServer::startServer ( const QBtUuid serviceId,
const QString &  serviceName = "My OBEX Service" 
) [slot]

Starts OBEX server by initializing the components needed and by advertising the service by which the server will be identified by other devices.

void QBtObjectExchangeServer::stopAdvertisingService ( ) [protected]

Stops the transmittion of the service (if any)

void QBtObjectExchangeServer::stopServer ( ) [slot]

Stops the server, terminates the service transmittion and disconnects from any device connected

void QBtObjectExchangeServer::transmittingObjectInfo ( int  overalDataSize,
int  byteSent 
) [signal]

Emitted as a feedback of the running transmittion status of any data (file or byte buffer) *

void QBtObjectExchangeServer::transmittingRejected ( ) [signal]

If the server (local device) sends a request to start a transmittion to the remote client connected, the client reserves the right to deny the transmittion before it begins. In that case transmittingRejected() is emitted.

void QBtObjectExchangeServer::transmittingStarted ( const QString &  transmittingfileName) [signal]

Emitted when a transmittion is started from the local device to a remote device.

void QBtObjectExchangeServer::transmittingStopped ( const QString &  transmittingfileName) [signal]

Emitted upon successfull or not end of transmittion from the local device to a remote client.

Friends And Related Function Documentation

friend class QBtObjectExchangeServerPrivate [friend]

The documentation for this class was generated from the following file: