AmdaProvider.h
42 lines
| 1.1 KiB
| text/x-c
|
CLexer
Alexandre Leroux
|
r377 | #ifndef SCIQLOP_AMDAPROVIDER_H | ||
#define SCIQLOP_AMDAPROVIDER_H | ||||
#include "AmdaGlobal.h" | ||||
#include <Data/IDataProvider.h> | ||||
#include <QLoggingCategory> | ||||
r750 | #include <map> | |||
Alexandre Leroux
|
r377 | |||
Q_DECLARE_LOGGING_CATEGORY(LOG_AmdaProvider) | ||||
r388 | class QNetworkReply; | |||
r750 | class QNetworkRequest; | |||
r388 | ||||
Alexandre Leroux
|
r377 | /** | ||
* @brief The AmdaProvider class is an example of how a data provider can generate data | ||||
*/ | ||||
class SCIQLOP_AMDA_EXPORT AmdaProvider : public IDataProvider { | ||||
public: | ||||
explicit AmdaProvider(); | ||||
Alexandre Leroux
|
r712 | std::shared_ptr<IDataProvider> clone() const override; | ||
Alexandre Leroux
|
r377 | |||
r539 | void requestDataLoading(QUuid acqIdentifier, const DataProviderParameters ¶meters) override; | |||
Alexandre Leroux
|
r377 | |||
r539 | void requestDataAborting(QUuid acqIdentifier) override; | |||
r422 | ||||
r750 | private slots: | |||
void onReplyDownloadProgress(QUuid, const QNetworkRequest &, double progress); | ||||
Alexandre Leroux
|
r377 | private: | ||
r512 | void retrieveData(QUuid token, const SqpRange &dateTime, const QVariantHash &data); | |||
r750 | ||||
void updateRequestProgress(QUuid acqIdentifier, std::shared_ptr<QNetworkRequest> request, | ||||
double progress); | ||||
std::map<QUuid, std::map<std::shared_ptr<QNetworkRequest>, double> > | ||||
m_AcqIdToRequestProgressMap; | ||||
Alexandre Leroux
|
r377 | }; | ||
#endif // SCIQLOP_AMDAPROVIDER_H | ||||