15#include <QAbstractListModel>
18#include <QSharedPointer>
19#include <QSslCertificate>
24class test_RemoteDeviceModel;
25class test_RemoteDeviceFilterModel;
32 :
public QAbstractListModel
35 friend class ::test_RemoteDeviceModel;
36 friend class ::test_RemoteDeviceFilterModel;
39 QMap<QString, RemoteServiceSettings::RemoteInfo> mPairedReaders;
40 QList<RemoteDeviceModelEntry> mAllRemoteReaders;
43 bool mIsDetectingRemoteDevices;
45 bool mRemoteDetectionWasRunning;
48 [[nodiscard]]
bool indexIsValid(
const QModelIndex& pIndex)
const;
50 void updatePairedReaders();
51 void updateUnpairedReaders();
52 void removeVanishedReaders();
53 [[nodiscard]] QList<RemoteDeviceModelEntry> presentReaders()
const;
57 void onApplicationStateChanged(
bool pIsAppInForeground);
58 void onUpdateReaderList();
80 [[nodiscard]]
int rowCount(
const QModelIndex& pParent = QModelIndex())
const override;
81 [[nodiscard]] QVariant
data(
const QModelIndex& pIndex,
int pRole = Qt::DisplayRole)
const override;
82 [[nodiscard]] QHash<int, QByteArray>
roleNames()
const override;
86 [[nodiscard]]
bool isPaired(
const QModelIndex& pIndex)
const;
87 [[nodiscard]]
bool isPairing(
const QModelIndex& pIndex)
const;
88 [[nodiscard]]
bool isSupported(
const QModelIndex& pIndex)
const;
Code
Definition GlobalStatus.h:28
Definition RemoteDeviceModelEntry.h:26
Definition RemoteDeviceModel.h:33
void forgetDevice(const QModelIndex &pIndex)
Definition RemoteDeviceModel.cpp:434
void onTranslationChanged()
Definition RemoteDeviceModel.cpp:428
SettingsRemoteRoles
Definition RemoteDeviceModel.h:65
@ IS_NETWORK_VISIBLE
Definition RemoteDeviceModel.h:70
@ LAST_CONNECTED
Definition RemoteDeviceModel.h:68
@ IS_SUPPORTED
Definition RemoteDeviceModel.h:71
@ DEVICE_ID
Definition RemoteDeviceModel.h:69
@ REMOTE_DEVICE_STATUS
Definition RemoteDeviceModel.h:67
@ IS_PAIRED
Definition RemoteDeviceModel.h:72
@ IS_PAIRING
Definition RemoteDeviceModel.h:73
@ LINK_QUALITY
Definition RemoteDeviceModel.h:74
@ IS_LAST_ADDED_DEVICE
Definition RemoteDeviceModel.h:75
@ REMOTE_DEVICE_NAME
Definition RemoteDeviceModel.h:66
QHash< int, QByteArray > roleNames() const override
Definition RemoteDeviceModel.cpp:41
bool isPairing(const QModelIndex &pIndex) const
Definition RemoteDeviceModel.cpp:328
bool isPaired(const QModelIndex &pIndex) const
Definition RemoteDeviceModel.cpp:317
void onDeviceDisconnected(GlobalStatus::Code pCloseCode, const QString &pId)
Definition RemoteDeviceModel.cpp:464
int rowCount(const QModelIndex &pParent=QModelIndex()) const override
Definition RemoteDeviceModel.cpp:234
void setLastPairedReader(const QSslCertificate &pCert)
Definition RemoteDeviceModel.cpp:456
void onKnownRemoteReadersChanged()
Definition RemoteDeviceModel.cpp:374
void setDetectRemoteDevices(bool pNewStatus)
Definition RemoteDeviceModel.cpp:350
QVariant data(const QModelIndex &pIndex, int pRole=Qt::DisplayRole) const override
Definition RemoteDeviceModel.cpp:240
bool isSupported(const QModelIndex &pIndex) const
Definition RemoteDeviceModel.cpp:339
QSharedPointer< IfdListEntry > getRemoteDeviceListEntry(const QModelIndex &pIndex) const
Definition RemoteDeviceModel.cpp:292
Definition RemoteServiceSettings.h:40
Implementation of GeneralAuthenticate response APDUs.
Definition CommandApdu.h:16