Skip to content

Class WebdavConnection

ClassList > WebdavConnection

More...

  • #include <webdavconnection.h>

Inherits the following classes: QObject

Public Properties

Type Name
property QStringList availablePaths
property bool isDownloadingPath
property bool isFetchingAvailablePaths
property bool isImportingPath
property bool isPasswordStored
property bool isUploadingPath
property QString lastError
property QString password
property double progress
property bool storePassword
property QString url
property QString username

Public Signals

Type Name
signal void availablePathsChanged
signal void confirmationRequested (const QString & host, const QString & username)
signal void importSuccessful (const QString & path)
signal void isDownloadingPathChanged
signal void isFetchingAvailablePathsChanged
signal void isImportingPathChanged
signal void isPasswordStoredChanged
signal void isUploadingPathChanged
signal void lastErrorChanged
signal void passwordChanged
signal void progressChanged
signal void storePasswordChanged
signal void urlChanged
signal void usernameChanged

Public Functions

Type Name
WebdavConnection (QObject * parent=nullptr)
QStringList availablePaths () const
Q_INVOKABLE void cancelRequest ()
Q_INVOKABLE void confirmRequest ()
Q_INVOKABLE void downloadPath (const QString & localPath)
Q_INVOKABLE void fetchAvailablePaths ()
Q_INVOKABLE void importPath (const QString & remotePath, const QString & localPath, QString localFolder=QString())
bool isDownloadingPath () const
bool isFetchingAvailablePaths () const
bool isImportingPath () const
bool isPasswordStored () const
bool isUploadingPath () const
QString lastError () const
QString password () const
double progress () const
void setPassword (const QString & password)
void setStorePassword (bool storePassword)
void setUrl (const QString & url)
void setUsername (const QString & username)
bool storePassword () const
Q_INVOKABLE void uploadPaths (const QStringList & localPaths)
QString url () const
QString username () const
~WebdavConnection () = default

Public Static Functions

Type Name
Q_INVOKABLE void forgetHistory (const QString & url=QString(), const QString & username=QString())
Q_INVOKABLE bool hasWebdavConfiguration (const QString & path)
Q_INVOKABLE QVariantMap importHistory ()

Detailed Description

The webdav connection objects allows for connection to and push/pull operations of content.

Public Properties Documentation

property availablePaths [1/2]

QStringList WebdavConnection::availablePaths;

property isDownloadingPath [1/2]

bool WebdavConnection::isDownloadingPath;

property isFetchingAvailablePaths [1/2]

bool WebdavConnection::isFetchingAvailablePaths;

property isImportingPath [1/2]

bool WebdavConnection::isImportingPath;

property isPasswordStored [1/2]

bool WebdavConnection::isPasswordStored;

property isUploadingPath [1/2]

bool WebdavConnection::isUploadingPath;

property lastError [1/2]

QString WebdavConnection::lastError;

property password [1/2]

QString WebdavConnection::password;

property progress [1/2]

double WebdavConnection::progress;

property storePassword [1/2]

bool WebdavConnection::storePassword;

property url [1/2]

QString WebdavConnection::url;

property username [1/2]

QString WebdavConnection::username;

Public Signals Documentation

signal availablePathsChanged

void WebdavConnection::availablePathsChanged;

signal confirmationRequested

void WebdavConnection::confirmationRequested;

signal importSuccessful

void WebdavConnection::importSuccessful;

signal isDownloadingPathChanged

void WebdavConnection::isDownloadingPathChanged;

signal isFetchingAvailablePathsChanged

void WebdavConnection::isFetchingAvailablePathsChanged;

signal isImportingPathChanged

void WebdavConnection::isImportingPathChanged;

signal isPasswordStoredChanged

void WebdavConnection::isPasswordStoredChanged;

signal isUploadingPathChanged

void WebdavConnection::isUploadingPathChanged;

signal lastErrorChanged

void WebdavConnection::lastErrorChanged;

signal passwordChanged

void WebdavConnection::passwordChanged;

signal progressChanged

void WebdavConnection::progressChanged;

signal storePasswordChanged

void WebdavConnection::storePasswordChanged;

signal urlChanged

void WebdavConnection::urlChanged;

signal usernameChanged

void WebdavConnection::usernameChanged;

Public Functions Documentation

function WebdavConnection

explicit WebdavConnection::WebdavConnection (
    QObject * parent=nullptr
) 

function availablePaths [2/2]

inline QStringList WebdavConnection::availablePaths () const

Returns a list of fetched available paths.

See also: fetchAvailablePaths


function cancelRequest

Q_INVOKABLE void WebdavConnection::cancelRequest () 

Cancels a requested download or upload operation.

See also: confirmationRequested

See also: isDownloadingPath

See also: isUploadingPath


function confirmRequest

Q_INVOKABLE void WebdavConnection::confirmRequest () 

Launches a requested download or upload operation.

See also: confirmationRequested

See also: isDownloadingPath

See also: isUploadingPath


function downloadPath

Q_INVOKABLE void WebdavConnection::downloadPath (
    const QString & localPath
) 

Download new and modified files from an imported remote path. localPath the local path within which a remote path was imported into

Note:

This is not a synchronization process; files removed remotely will not be removed locally. Furthermore, all files modified remotely will overwrite locally-stored files.


function fetchAvailablePaths

Q_INVOKABLE void WebdavConnection::fetchAvailablePaths () 

Fetches available remote paths from the current WebDAV endpoint.


function importPath

Q_INVOKABLE void WebdavConnection::importPath (
    const QString & remotePath,
    const QString & localPath,
    QString localFolder=QString()
) 

Imports a remote path into a local path stored on the device. remotePath the remote path on the WebDAV endpoint. localPath the local path localFolder the local folder name containing the imported remote path content


function isDownloadingPath [2/2]

inline bool WebdavConnection::isDownloadingPath () const

Returns TRUE if the WebDAV connection is conducting a download operation.


function isFetchingAvailablePaths [2/2]

inline bool WebdavConnection::isFetchingAvailablePaths () const

Returns TRUE if the WebDAV connection is conducting a fetching of available remote paths.


function isImportingPath [2/2]

inline bool WebdavConnection::isImportingPath () const

Returns TRUE if the WebDAV connection is conducting an import operation.


function isPasswordStored [2/2]

inline bool WebdavConnection::isPasswordStored () const

Returns TRUE if a password has been stored for a given pair of username and WebDAV URL endpoint.


function isUploadingPath [2/2]

inline bool WebdavConnection::isUploadingPath () const

Returns TRUE if the WebDAV connection is conducting an upload operation.


function lastError [2/2]

inline QString WebdavConnection::lastError () const

Returns the last error string captured by the WebDAV connection.


function password [2/2]

inline QString WebdavConnection::password () const

Returns the authentication password.


function progress [2/2]

double WebdavConnection::progress () const

Returns the progress of an ongoing import, download, or upload operation.

Note:

The returned value's range is 0.0 to 1.0.


function setPassword

void WebdavConnection::setPassword (
    const QString & password
) 

Sets the authentication password.


function setStorePassword

void WebdavConnection::setStorePassword (
    bool storePassword
) 

Sets whether the current authentication password will be saved upon successful list or file transfer operation

Parameters:

  • storePassword set to TRUE to store the current authentication password.

function setUrl

void WebdavConnection::setUrl (
    const QString & url
) 

Sets the WebDAV URL endpoint used to connect, list, and transfer files.

Parameters:

  • url the URL endpoint string

function setUsername

void WebdavConnection::setUsername (
    const QString & username
) 

Sets the authentication username.


function storePassword [2/2]

inline bool WebdavConnection::storePassword () const

Returns TRUE if the current authentication password will be saved upon successful list or file transfer operation.


function uploadPaths

Q_INVOKABLE void WebdavConnection::uploadPaths (
    const QStringList & localPaths
) 

Upload one or more file and/or folder to a WebDAV endpoint tied to the imported remote path. localPaths a list of files and folder parented to a local path within which a remote path was imported into

Note:

This is not a synchronization process; files removed locally will not be removed remotely. Furthermore, all files modified locally will overwrite remotely-stored files.


function url [2/2]

inline QString WebdavConnection::url () const

Returns the WebDAV URL endpoint used to connect, list, and transfer files.


function username [2/2]

inline QString WebdavConnection::username () const

Returns the authentication username.


function ~WebdavConnection

WebdavConnection::~WebdavConnection () = default

Public Static Functions Documentation

function forgetHistory

static Q_INVOKABLE void WebdavConnection::forgetHistory (
    const QString & url=QString(),
    const QString & username=QString()
) 

function hasWebdavConfiguration

static Q_INVOKABLE bool WebdavConnection::hasWebdavConfiguration (
    const QString & path
) 

Returns TRUE if a given path contains a WebDAV configuration JSON file or is parented to a folder containing such a file.


function importHistory

static Q_INVOKABLE QVariantMap WebdavConnection::importHistory () 

Returns a list of import history.



The documentation for this class was generated from the following file src/core/webdavconnection.h