| 
									
										
										
										
											2020-06-21 01:36:30 +01:00
										 |  |  | #ifndef PSK_REPORTER_HPP_
 | 
					
						
							|  |  |  | #define PSK_REPORTER_HPP_
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | #include <QObject>
 | 
					
						
							|  |  |  | #include "Radio.hpp"
 | 
					
						
							|  |  |  | #include "pimpl_h.hpp"
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | class QString; | 
					
						
							|  |  |  | class Configuration; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-06-21 02:15:31 +01:00
										 |  |  | class PSKReporter final | 
					
						
							| 
									
										
										
										
											2020-06-21 01:36:30 +01:00
										 |  |  |   : public QObject | 
					
						
							|  |  |  | { | 
					
						
							|  |  |  |   Q_OBJECT | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | public: | 
					
						
							| 
									
										
										
										
											2020-06-21 02:15:31 +01:00
										 |  |  |   explicit PSKReporter (Configuration const *, QString const& program_info); | 
					
						
							|  |  |  |   ~PSKReporter (); | 
					
						
							| 
									
										
										
										
											2020-06-21 01:36:30 +01:00
										 |  |  | 
 | 
					
						
							|  |  |  |   void reconnect (); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   void setLocalStation (QString const& call, QString const& grid, QString const& antenna); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   //
 | 
					
						
							|  |  |  |   // Returns false if PSK Reporter connection is not available
 | 
					
						
							|  |  |  |   //
 | 
					
						
							|  |  |  |   bool addRemoteStation (QString const& call, QString const& grid, Radio::Frequency freq, QString const& mode, int snr); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   //
 | 
					
						
							|  |  |  |   // Flush any pending spots to PSK Reporter
 | 
					
						
							|  |  |  |   //
 | 
					
						
							| 
									
										
										
										
											2020-08-16 00:38:19 +01:00
										 |  |  |   void sendReport (bool last = false); | 
					
						
							| 
									
										
										
										
											2020-06-21 01:36:30 +01:00
										 |  |  | 
 | 
					
						
							|  |  |  |   Q_SIGNAL void errorOccurred (QString const& reason); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | private: | 
					
						
							|  |  |  |   class impl; | 
					
						
							|  |  |  |   pimpl<impl> m_; | 
					
						
							|  |  |  | }; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | #endif
 |