72 lines
1.8 KiB
C++
Executable File
72 lines
1.8 KiB
C++
Executable File
|
|
|
|
|
|
#pragma once
|
|
|
|
#include <PluginInterfaces/data_plugin_interface.h>
|
|
#include <ExerciseEventManagement/eem.hpp>
|
|
#include <QVector>
|
|
#include <QJsonObject>
|
|
|
|
#ifndef TLNDATAPLUGININTERFACE_EXPORT
|
|
# ifdef BUILD_STATIC_LIBRARIES
|
|
# define TLNDATAPLUGININTERFACE_EXPORT
|
|
# else
|
|
# if defined(MAKE_TLNDATAPLUGININTERFACE_LIB)
|
|
# define TLNDATAPLUGININTERFACE_EXPORT Q_DECL_EXPORT
|
|
# else
|
|
# define TLNDATAPLUGININTERFACE_EXPORT Q_DECL_IMPORT
|
|
# endif
|
|
# endif
|
|
#endif
|
|
|
|
namespace TimeLineManagement
|
|
{
|
|
class ForeignDataInterface;
|
|
|
|
|
|
|
|
class DataInterface : public DataPluginBase::Interface
|
|
{
|
|
public:
|
|
using DataPluginBase::Interface::Interface;
|
|
|
|
virtual std::shared_ptr<ForeignDataInterface> getForeignDataInterface() = 0;
|
|
};
|
|
|
|
|
|
class TimelineDataProviderInterface
|
|
{
|
|
public:
|
|
TimelineDataProviderInterface() = default;
|
|
virtual ~TimelineDataProviderInterface() = default;
|
|
|
|
virtual const QVector<ExerciseEventManagement::Event> &eventData() const = 0;
|
|
virtual int requestId() const = 0;
|
|
virtual void getRequestTime(qint64 &requestMin , qint64 &requestMax ) const = 0;
|
|
};
|
|
|
|
|
|
|
|
class TLNDATAPLUGININTERFACE_EXPORT ForeignDataInterface : public QObject
|
|
{
|
|
Q_OBJECT
|
|
public:
|
|
ForeignDataInterface() = default;
|
|
virtual ~ForeignDataInterface() = default;
|
|
|
|
virtual TimelineDataProviderInterface *requestData(qint64 from,
|
|
qint64 to,
|
|
const QVector<int> &eventTypeIds = QVector<int>(),
|
|
const QJsonObject &filter = QJsonObject()) = 0;
|
|
virtual QVector<ExerciseEventManagement::Event> liveHistory() const = 0;
|
|
virtual const QUrl eemUrl() const = 0;
|
|
|
|
Q_SIGNALS:
|
|
void liveEvent(const ExerciseEventManagement::Event &ev);
|
|
void requestedDataAvailable(TimelineDataProviderInterface *tldp);
|
|
};
|
|
|
|
|
|
}
|