2018-10-01 07:37:52 -04:00
|
|
|
#ifndef LOTW_USERS_HPP_
|
|
|
|
#define LOTW_USERS_HPP_
|
|
|
|
|
|
|
|
#include <boost/core/noncopyable.hpp>
|
|
|
|
#include <QObject>
|
|
|
|
#include "pimpl_h.hpp"
|
|
|
|
|
|
|
|
class QString;
|
|
|
|
class QDate;
|
2018-10-01 16:19:21 -04:00
|
|
|
class QNetworkAccessManager;
|
2018-10-01 07:37:52 -04:00
|
|
|
|
|
|
|
//
|
|
|
|
// LotWUsers - Lookup Logbook of the World users
|
|
|
|
//
|
|
|
|
class LotWUsers final
|
|
|
|
: public QObject
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
public:
|
2018-10-16 19:26:04 -04:00
|
|
|
explicit LotWUsers (QNetworkAccessManager *, QObject * parent = 0);
|
2018-10-01 07:37:52 -04:00
|
|
|
~LotWUsers ();
|
|
|
|
|
2018-10-16 19:26:04 -04:00
|
|
|
void set_local_file_path (QString const&);
|
|
|
|
|
|
|
|
Q_SLOT void load (QString const& url, bool force_download = false);
|
|
|
|
Q_SLOT void set_age_constraint (qint64 uploaded_since_days);
|
2018-10-01 16:19:21 -04:00
|
|
|
|
2018-10-01 07:37:52 -04:00
|
|
|
// returns true if the specified call sign 'call' has uploaded their
|
2018-10-16 19:26:04 -04:00
|
|
|
// log to LotW in the last 'age_constraint_days' days
|
|
|
|
bool user (QString const& call) const;
|
2018-10-01 07:37:52 -04:00
|
|
|
|
|
|
|
Q_SIGNAL void LotW_users_error (QString const& reason) const;
|
2018-10-16 19:26:04 -04:00
|
|
|
Q_SIGNAL void load_finished () const;
|
2018-10-01 07:37:52 -04:00
|
|
|
|
|
|
|
private:
|
|
|
|
class impl;
|
|
|
|
pimpl<impl> m_;
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|