2019-12-01 22:27:00 +03:00
|
|
|
#ifndef IPPDISCOVERY_H
|
|
|
|
#define IPPDISCOVERY_H
|
|
|
|
#include <QStringListModel>
|
|
|
|
#include <QUdpSocket>
|
|
|
|
#include "bytestream.h"
|
|
|
|
|
|
|
|
class IppDiscovery : public QStringListModel
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
public:
|
|
|
|
IppDiscovery();
|
|
|
|
~IppDiscovery();
|
|
|
|
Q_PROPERTY(QStringList favourites MEMBER _favourites NOTIFY favouritesChanged)
|
|
|
|
Q_INVOKABLE void discover();
|
|
|
|
|
|
|
|
signals:
|
|
|
|
void favouritesChanged();
|
|
|
|
|
|
|
|
public slots:
|
|
|
|
void readPendingDatagrams();
|
|
|
|
protected:
|
|
|
|
private:
|
2020-01-02 23:05:04 +03:00
|
|
|
void sendQuery(quint16 qtype, QStringList addr);
|
|
|
|
|
|
|
|
void update();
|
|
|
|
|
|
|
|
QStringList _ipp;
|
|
|
|
QMap<QString,QString> _rps;
|
|
|
|
QMap<QString,quint16> _ports;
|
|
|
|
QMap<QString,QString> _targets;
|
|
|
|
|
|
|
|
QMultiMap<QString,QString> _AAs;
|
|
|
|
QMultiMap<QString,QString> _AAAAs;
|
|
|
|
|
2019-12-01 22:27:00 +03:00
|
|
|
QStringList _favourites;
|
|
|
|
QStringList _found;
|
|
|
|
QUdpSocket* socket;
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif // IPPDISCOVERY_H
|