![]() |
LeechCraft
0.6.70-15082-g543737046d
Modular cross-platform feature rich live environment.
|
Interface for plugins supporting storing files on the web. More...
#include "iwebfilestorage.h"
Public Member Functions | |
virtual | ~IWebFileStorage () |
virtual QStringList | GetServiceVariants () const =0 |
Returns the list of services supported by this plugin. More... | |
virtual void | UploadFile (const QString &filename, const QString &service=QString())=0 |
Uploads the given filename to the given service. More... | |
Protected Member Functions | |
virtual void | fileUploaded (const QString &filename, const QUrl &fileUrl)=0 |
Emitted when the given filename finishes uploading. More... | |
Interface for plugins supporting storing files on the web.
Cloud storages like Google Drive and the likes also count.
A single plugin can support multiple services, and each service can be represented via multiple accounts. Each account or each accountless service (like a dumb filebin) is called a service variant. The list of all service variants is returned via GetServiceVariants() method.
Good IWebFileStorage plugins also implement IDataFilter, exposing filtering entities containing URLs to local files.
Definition at line 31 of file iwebfilestorage.h.
|
inlinevirtual |
Definition at line 34 of file iwebfilestorage.h.
|
protectedpure virtual |
Emitted when the given filename finishes uploading.
This signal should be emitted when the given filename finishes uploading. The filename should be exactly the one passed previously to the corresponding UploadFile() call that initiated the file upload process.
The URL under which the file is generally available is passed via the fileUrl parameter.
[out] | filename | The filename that has been just uploaded. |
[out] | fileUrl | The URL of under which filename is available. |
|
pure virtual |
Returns the list of services supported by this plugin.
|
pure virtual |
Uploads the given filename to the given service.
This function should initiate uploading the given filename to the given service and returns immediatelly. When the file finishes uploading, the fileUploaded() signal should be emitted.
The service is a string returned from GetServiceVariants() method. It can also be an empty string, in which case either a default service variant should be chosen, or a service choosing dialog should appear.
[in] | filename | The file to upload. |
[in] | service | The service variant to use, which may be an empty string |