Home · All Namespaces · All Classes · Grouped Classes · Modules · Functions codeless banner

DefaultObexPushService Class Reference
[QtBluetoothModule, QtInfraredModule]

The DefaultObexPushService class provides an OBEX Push server. More...

    #include <DefaultObexPushService>

Inherits QObexPushService.

Public Functions

Additional Inherited Members


Detailed Description

The DefaultObexPushService class provides an OBEX Push server.

The DefaultObexPushService provides a default implementation of an OBEX Push server. It handles Put requests in the following manner:

If the server receives a Get request for the owner's business card, the server will respond with the contents of QContactModel::personalDetails().

This class enables the BluetoothObexPushService and the IrObexPushService.

This class is part of the Qt Extended server and cannot be used by other Qt Extended applications.


Member Function Documentation

DefaultObexPushService::DefaultObexPushService ( QIODevice * socket, QObject * parent = 0 )

Constructs a Push server that will run on the specified socket and parent object parent.

DefaultObexPushService::~DefaultObexPushService ()

Destroys the service.

void DefaultObexPushService::cleanUpRequest ()

Performs clean-up for the last received request. This will automatically be done when a new request is received, but you can call this function to ensure it is done even if the service does not receive another request.

If this is called, calling currentContentId() will return QContent::InvalidId until the next request is received.

QContentId DefaultObexPushService::currentContentId () const

If the current request is a Put request that does not contain a vCard or vCalendar, and finalizeDataTransfer() has been called, this returns the QContentId for the QContent resource into which the received document has been saved. Otherwise, returns QContent::InvalidId.

Returns QContent::InvalidId if cleanUpRequest() has been called.

bool DefaultObexPushService::finalizeDataTransfer ()

Completes the processing of the transferred data. If a vCard or vCalendar was received, the file will be sent to the appropriate Qt Extended application. If any other type of file was received, the file will be saved into the Document System.

This should be called if the requestFinished() signal is emitted with error and and aborted both set to false (as there is no point in saving or passing on the file if it was not successfully received).

Returns true if the data was processed successfully. (The current implementation always returns true for business card requests.)


Copyright © 2009 Nokia Trademarks
Qt Extended 4.4.3