2016-10-04 23:55:20 +02:00
|
|
|
#ifndef DATA_SYNCTHINGDEV_H
|
|
|
|
#define DATA_SYNCTHINGDEV_H
|
|
|
|
|
|
|
|
#include "./global.h"
|
|
|
|
|
|
|
|
#include <c++utilities/chrono/datetime.h>
|
|
|
|
|
|
|
|
#include <QString>
|
|
|
|
#include <QStringList>
|
|
|
|
|
|
|
|
namespace Data {
|
|
|
|
|
|
|
|
enum class SyncthingDevStatus
|
|
|
|
{
|
|
|
|
Unknown,
|
|
|
|
Disconnected,
|
|
|
|
OwnDevice,
|
|
|
|
Idle,
|
|
|
|
Synchronizing,
|
|
|
|
OutOfSync,
|
|
|
|
Rejected
|
|
|
|
};
|
|
|
|
|
|
|
|
struct LIB_SYNCTHING_CONNECTOR_EXPORT SyncthingDev
|
|
|
|
{
|
2016-11-01 17:06:31 +01:00
|
|
|
SyncthingDev(const QString &id = QString(), const QString &name = QString());
|
2016-10-04 23:55:20 +02:00
|
|
|
QString id;
|
|
|
|
QString name;
|
|
|
|
QStringList addresses;
|
|
|
|
QString compression;
|
|
|
|
QString certName;
|
|
|
|
SyncthingDevStatus status;
|
|
|
|
int progressPercentage = 0;
|
|
|
|
int progressRate = 0;
|
|
|
|
bool introducer = false;
|
|
|
|
bool paused = false;
|
2016-10-20 23:14:47 +02:00
|
|
|
uint64 totalIncomingTraffic = 0;
|
|
|
|
uint64 totalOutgoingTraffic = 0;
|
2016-10-04 23:55:20 +02:00
|
|
|
QString connectionAddress;
|
|
|
|
QString connectionType;
|
|
|
|
QString clientVersion;
|
|
|
|
ChronoUtilities::DateTime lastSeen;
|
|
|
|
};
|
|
|
|
|
2016-11-01 17:06:31 +01:00
|
|
|
inline SyncthingDev::SyncthingDev(const QString &id, const QString &name) :
|
|
|
|
id(id),
|
|
|
|
name(name)
|
|
|
|
{}
|
|
|
|
|
2016-10-04 23:55:20 +02:00
|
|
|
} // namespace Data
|
|
|
|
|
|
|
|
#endif // DATA_SYNCTHINGDEV_H
|