QGIS API Documentation
4.3.0-Master (16eddb2670e)
Toggle main menu visibility
Loading...
Searching...
No Matches
src
core
externalstorage
qgssimplecopyexternalstorage_p.h
Go to the documentation of this file.
1
/***************************************************************************
2
qgssimplecopyexternalstorage_p.h
3
--------------------------------------
4
Date : March 2021
5
Copyright : (C) 2021 by Julien Cabieces
6
Email : julien dot cabieces at oslandia dot com
7
***************************************************************************
8
* *
9
* This program is free software; you can redistribute it and/or modify *
10
* it under the terms of the GNU General Public License as published by *
11
* the Free Software Foundation; either version 2 of the License, or *
12
* (at your option) any later version. *
13
* *
14
***************************************************************************/
15
16
#ifndef QGSSIMPLECOPYEXTERNALSTORAGE_H
17
#define QGSSIMPLECOPYEXTERNALSTORAGE_H
18
19
#include "qgis_core.h"
20
#include "
qgis_sip.h
"
21
#include "
qgsexternalstorage.h
"
22
23
#include <QPointer>
24
25
#define SIP_NO_FILE
26
28
29
class
QgsCopyFileTask
;
30
37
class
CORE_EXPORT QgsSimpleCopyExternalStorage :
public
QgsExternalStorage
38
{
39
public
:
40
QString
type
()
const override
;
41
42
QString
displayName
()
const override
;
43
44
QgsExternalStorageStoredContent
*
doStore
(
const
QString &filePath,
const
QString &url,
const
QString &authcfg = QString() )
const override
;
45
46
QgsExternalStorageFetchedContent
*
doFetch
(
const
QString &url,
const
QString &authConfig = QString() )
const override
;
47
};
48
54
class
QgsSimpleCopyExternalStorageStoredContent :
public
QgsExternalStorageStoredContent
55
{
56
Q_OBJECT
57
58
public
:
59
QgsSimpleCopyExternalStorageStoredContent(
const
QString &filePath,
const
QString &url,
const
QString &authcfg = QString() );
60
61
void
cancel
()
override
;
62
63
QString
url
()
const override
;
64
65
void
store
()
override
;
66
67
private
:
68
QPointer<QgsCopyFileTask> mCopyTask;
69
QString mUrl;
70
};
71
77
class
QgsSimpleCopyExternalStorageFetchedContent :
public
QgsExternalStorageFetchedContent
78
{
79
Q_OBJECT
80
81
public
:
82
QgsSimpleCopyExternalStorageFetchedContent(
const
QString &filePath );
83
84
QString
filePath
()
const override
;
85
86
void
fetch
()
override
;
87
88
private
:
89
QString mFilePath;
90
QString mResultFilePath;
91
};
92
94
#endif
// QGSSIMPLECOPYEXTERNALSTORAGE_H
QgsCopyFileTask
Task to copy a file on disk.
Definition
qgscopyfiletask.h:28
QgsExternalStorageContent::cancel
virtual void cancel()
Cancels content fetching/storing.
Definition
qgsexternalstorage.h:128
QgsExternalStorageFetchedContent
Abstract base class for QgsExternalStorage fetched content.
Definition
qgsexternalstorage.h:174
QgsExternalStorageFetchedContent::filePath
virtual QString filePath() const =0
Returns fetched resource file path.
QgsExternalStorageFetchedContent::fetch
virtual void fetch()=0
Starts fetching.
QgsExternalStorageStoredContent
Abstract base class for QgsExternalStorage stored content.
Definition
qgsexternalstorage.h:203
QgsExternalStorageStoredContent::url
virtual QString url() const =0
Returns stored resource URL.
QgsExternalStorageStoredContent::store
virtual void store()=0
Starts storing.
QgsExternalStorage
Abstract interface for external storage - to be implemented by various backends and registered in Qgs...
Definition
qgsexternalstorage.h:37
QgsExternalStorage::type
virtual QString type() const =0
Unique identifier of the external storage type.
QgsExternalStorage::doFetch
virtual QgsExternalStorageFetchedContent * doFetch(const QString &url, const QString &authCfg=QString()) const =0
Fetches file from url using authCfg for this project external storage.
QgsExternalStorage::doStore
virtual QgsExternalStorageStoredContent * doStore(const QString &filePath, const QString &url, const QString &authCfg=QString()) const =0
Stores file filePath to the url using authCfg authentication for this project external storage.
QgsExternalStorage::displayName
virtual QString displayName() const =0
Returns the translated external storage name, which should be used for any user-visible display of th...
qgis_sip.h
qgsexternalstorage.h
Generated on
for QGIS API Documentation by
1.17.0