| 
									
										
										
										
											2018-10-01 12:37:52 +01: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 21:19:21 +01:00
										 |  |  | class QNetworkAccessManager; | 
					
						
							| 
									
										
										
										
											2018-10-01 12:37:52 +01:00
										 |  |  | 
 | 
					
						
							|  |  |  | //
 | 
					
						
							|  |  |  | // LotWUsers - Lookup Logbook of the World users
 | 
					
						
							|  |  |  | //
 | 
					
						
							|  |  |  | class LotWUsers final | 
					
						
							|  |  |  |   : public QObject | 
					
						
							|  |  |  | { | 
					
						
							|  |  |  |   Q_OBJECT | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | public: | 
					
						
							| 
									
										
										
										
											2018-10-17 00:26:04 +01:00
										 |  |  |   explicit LotWUsers (QNetworkAccessManager *, QObject * parent = 0); | 
					
						
							| 
									
										
										
										
											2018-10-01 12:37:52 +01:00
										 |  |  |   ~LotWUsers (); | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-10-17 00:26:04 +01:00
										 |  |  |   void set_local_file_path (QString const&); | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-03-02 13:22:42 +00:00
										 |  |  |   Q_SLOT void load (QString const& url, bool fetch = true, bool force_download = false); | 
					
						
							| 
									
										
										
										
											2018-10-17 00:26:04 +01:00
										 |  |  |   Q_SLOT void set_age_constraint (qint64 uploaded_since_days); | 
					
						
							| 
									
										
										
										
											2018-10-01 21:19:21 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-10-01 12:37:52 +01:00
										 |  |  |   // returns true if the specified call sign 'call' has uploaded their
 | 
					
						
							| 
									
										
										
										
											2018-10-17 00:26:04 +01:00
										 |  |  |   // log to LotW in the last 'age_constraint_days' days
 | 
					
						
							|  |  |  |   bool user (QString const& call) const; | 
					
						
							| 
									
										
										
										
											2018-10-01 12:37:52 +01:00
										 |  |  | 
 | 
					
						
							|  |  |  |   Q_SIGNAL void LotW_users_error (QString const& reason) const; | 
					
						
							| 
									
										
										
										
											2023-03-15 20:42:03 -07:00
										 |  |  |   Q_SIGNAL void progress (QString const& reason) const; | 
					
						
							| 
									
										
										
										
											2018-10-17 00:26:04 +01:00
										 |  |  |   Q_SIGNAL void load_finished () const; | 
					
						
							| 
									
										
										
										
											2018-10-01 12:37:52 +01:00
										 |  |  | 
 | 
					
						
							|  |  |  | private: | 
					
						
							|  |  |  |   class impl; | 
					
						
							|  |  |  |   pimpl<impl> m_; | 
					
						
							|  |  |  | }; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | #endif
 |