BluezQt 5.109.0
Public Types | Properties | Signals | Public Member Functions | List of all members
BluezQt::ObexTransfer

OBEX transfer. More...

#include <BluezQt/ObexTransfer>

Public Types

enum  Status {
  Queued , Active , Suspended , Complete ,
  Error , Unknown
}
 Status of transfer. More...
 

Properties

QString fileName
 
QString name
 
quint64 size
 
Status status
 
bool suspendable
 
quint64 time
 
quint64 transferred
 
QString type
 

Signals

void fileNameChanged (const QString &fileName)
 Indicates that the name of transferred file have changed.
 
void statusChanged (Status status)
 Indicates that the status of transfer have changed.
 
void transferredChanged (quint64 transferred)
 Indicates that the number of transferred bytes have changed.
 

Public Member Functions

 ~ObexTransfer () override
 Destroys an ObexTransfer object.
 
PendingCallcancel ()
 Stops the current transfer.
 
QString fileName () const
 Returns the full name of the transferred file.
 
bool isSuspendable () const
 Returns whether the transfer is suspendable.
 
QString name () const
 Returns the name of the transferred object.
 
QDBusObjectPath objectPath () const
 D-Bus object path of the transfer.
 
PendingCallresume ()
 Resumes the current transfer.
 
quint64 size () const
 Returns the total size of the transferred object.
 
Status status () const
 Returns the status of the transfer.
 
PendingCallsuspend ()
 Suspends the current transfer.
 
quint64 time () const
 Returns the time of the transferred object.
 
ObexTransferPtr toSharedPtr () const
 Returns a shared pointer from this.
 
quint64 transferred () const
 Returns the number of bytes transferred.
 
QString type () const
 Returns the type of the transferred object.
 

Detailed Description

OBEX transfer.

This class represents transfer of one file.

Member Enumeration Documentation

◆ Status

Status of transfer.

Enumerator
Queued 

Indicates that the transfer is queued.

Active 

Indicates that the transfer is active.

Suspended 

Indicates that the transfer is suspended.

Complete 

Indicates that the transfer have completed successfully.

Error 

Indicates that the transfer have failed with error.

Unknown 

Indicates that the transfer status is unknown.

Constructor & Destructor Documentation

◆ ~ObexTransfer()

BluezQt::ObexTransfer::~ObexTransfer ( )
override

Destroys an ObexTransfer object.

Member Function Documentation

◆ cancel()

PendingCall * BluezQt::ObexTransfer::cancel ( )

Stops the current transfer.

Possible errors: PendingCall::NotAuthorized, PendingCall::InProgress PendingCall::Failed

Returns
void pending call

◆ fileName()

QString BluezQt::ObexTransfer::fileName ( ) const

Returns the full name of the transferred file.

Returns
full name of transferred file

◆ fileNameChanged

void BluezQt::ObexTransfer::fileNameChanged ( const QString &  fileName)
signal

Indicates that the name of transferred file have changed.

◆ isSuspendable()

bool BluezQt::ObexTransfer::isSuspendable ( ) const

Returns whether the transfer is suspendable.

Returns
true if transfer is suspendable

◆ name()

QString BluezQt::ObexTransfer::name ( ) const

Returns the name of the transferred object.

Returns
name of transferred object

◆ objectPath()

QDBusObjectPath BluezQt::ObexTransfer::objectPath ( ) const

D-Bus object path of the transfer.

Returns
object path of transfer

◆ resume()

PendingCall * BluezQt::ObexTransfer::resume ( )

Resumes the current transfer.

Possible errors: PendingCall::NotAuthorized, PendingCall::NotInProgress

Returns
void pending call

◆ size()

quint64 BluezQt::ObexTransfer::size ( ) const

Returns the total size of the transferred object.

Returns
size of transferred object

◆ status()

Status BluezQt::ObexTransfer::status ( ) const

Returns the status of the transfer.

Returns
status of transfer

◆ statusChanged

void BluezQt::ObexTransfer::statusChanged ( Status  status)
signal

Indicates that the status of transfer have changed.

◆ suspend()

PendingCall * BluezQt::ObexTransfer::suspend ( )

Suspends the current transfer.

Only suspendable transfers can be suspended.

Possible errors: PendingCall::NotAuthorized, PendingCall::NotInProgress

See also
isSuspendable() const
Returns
void pending call

◆ time()

quint64 BluezQt::ObexTransfer::time ( ) const

Returns the time of the transferred object.

Returns
time of transferred object

◆ toSharedPtr()

ObexTransferPtr BluezQt::ObexTransfer::toSharedPtr ( ) const

Returns a shared pointer from this.

Returns
ObexTransferPtr

◆ transferred()

quint64 BluezQt::ObexTransfer::transferred ( ) const

Returns the number of bytes transferred.

Returns
number of bytes transferred

◆ transferredChanged

void BluezQt::ObexTransfer::transferredChanged ( quint64  transferred)
signal

Indicates that the number of transferred bytes have changed.

◆ type()

QString BluezQt::ObexTransfer::type ( ) const

Returns the type of the transferred object.

Returns
type of transferred object