BluezQt 5.109.0
Public Member Functions | List of all members
BluezQt::ObexFileTransfer

OBEX file transfer. More...

#include <BluezQt/ObexFileTransfer>

Public Member Functions

 ObexFileTransfer (const QDBusObjectPath &path, QObject *parent=nullptr)
 Creates a new ObexFileTransfer object.
 
 ~ObexFileTransfer () override
 Destroys an ObexFileTransfer object.
 
PendingCallchangeFolder (const QString &folder)
 Changes the current folder.
 
PendingCallcopyFile (const QString &sourceFileName, const QString &targetFileName)
 Copies a file within the remote device.
 
PendingCallcreateFolder (const QString &folder)
 Creates a new folder.
 
PendingCalldeleteFile (const QString &fileName)
 Deletes a file/folder within the remote device.
 
PendingCallgetFile (const QString &targetFileName, const QString &sourceFileName)
 Gets the file from the remote device.
 
PendingCalllistFolder ()
 Lists a current folder.
 
PendingCallmoveFile (const QString &sourceFileName, const QString &targetFileName)
 Moves a file within the remote device.
 
QDBusObjectPath objectPath () const
 D-Bus object path of the file transfer session.
 
PendingCallputFile (const QString &sourceFileName, const QString &targetFileName)
 Puts the file to the remote device.
 

Detailed Description

OBEX file transfer.

This class represents an OBEX file transfer interface.

Constructor & Destructor Documentation

◆ ObexFileTransfer()

BluezQt::ObexFileTransfer::ObexFileTransfer ( const QDBusObjectPath &  path,
QObject *  parent = nullptr 
)
explicit

Creates a new ObexFileTransfer object.

This class will be typically used with a path from result of ObexManager::createSession().

Parameters
pathpath of session
parent

◆ ~ObexFileTransfer()

BluezQt::ObexFileTransfer::~ObexFileTransfer ( )
override

Destroys an ObexFileTransfer object.

Member Function Documentation

◆ changeFolder()

PendingCall * BluezQt::ObexFileTransfer::changeFolder ( const QString &  folder)

Changes the current folder.

Possible errors: PendingCall::InvalidArguments, PendingCall::Failed

Parameters
folderfolder to be changed
Returns
void pending call

◆ copyFile()

PendingCall * BluezQt::ObexFileTransfer::copyFile ( const QString &  sourceFileName,
const QString &  targetFileName 
)

Copies a file within the remote device.

Possible errors: PendingCall::InvalidArguments, PendingCall::Failed

Parameters
sourceFileNamesource within the remote device
targetFileNametarget file within the remote device
Returns
void pending call

◆ createFolder()

PendingCall * BluezQt::ObexFileTransfer::createFolder ( const QString &  folder)

Creates a new folder.

Possible errors: PendingCall::InvalidArguments, PendingCall::Failed

Parameters
foldername of new folder
Returns
void pending call

◆ deleteFile()

PendingCall * BluezQt::ObexFileTransfer::deleteFile ( const QString &  fileName)

Deletes a file/folder within the remote device.

Possible errors: PendingCall::InvalidArguments, PendingCall::Failed

Parameters
fileNamefile within the remote device
Returns
void pending call

◆ getFile()

PendingCall * BluezQt::ObexFileTransfer::getFile ( const QString &  targetFileName,
const QString &  sourceFileName 
)

Gets the file from the remote device.

If an empty targetFileName is given, a name will be automatically calculated for the temporary file.

Possible errors: PendingCall::InvalidArguments, PendingCall::Failed

Parameters
targetFileNamefull local path where the file will be saved
sourceFileNamefile within the remote device
Returns
ObexTransferPtr pending call

◆ listFolder()

PendingCall * BluezQt::ObexFileTransfer::listFolder ( )

Lists a current folder.

Possible errors: PendingCall::Failed

Returns
QList<ObexFileTransferEntry> pending call

◆ moveFile()

PendingCall * BluezQt::ObexFileTransfer::moveFile ( const QString &  sourceFileName,
const QString &  targetFileName 
)

Moves a file within the remote device.

Possible errors: PendingCall::InvalidArguments, PendingCall::Failed

Parameters
sourceFileNamesource file within the remote device
targetFileNametarget file within the remote device
Returns
void pending call

◆ objectPath()

QDBusObjectPath BluezQt::ObexFileTransfer::objectPath ( ) const

D-Bus object path of the file transfer session.

Returns
object path of session

◆ putFile()

PendingCall * BluezQt::ObexFileTransfer::putFile ( const QString &  sourceFileName,
const QString &  targetFileName 
)

Puts the file to the remote device.

If an empty targetFileName is given, a name will be automatically calculated for the temporary file.

Possible errors: PendingCall::InvalidArguments, PendingCall::Failed

Parameters
sourceFileNamefull path of the local file
targetFileNamefile to be saved within the remote device
Returns
ObexTransferPtr pending call