| 
									
										
										
										
											2019-03-24 21:01:03 -04:00
										 |  |  | #ifndef JS8SPOTCLIENT_H
 | 
					
						
							|  |  |  | #define JS8SPOTCLIENT_H
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | #include "MessageClient.hpp"
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | #include <QObject>
 | 
					
						
							|  |  |  | #include <QHostInfo>
 | 
					
						
							|  |  |  | #include <QQueue>
 | 
					
						
							|  |  |  | #include <QTimer>
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | class SpotClient : public QObject | 
					
						
							|  |  |  | { | 
					
						
							|  |  |  |     Q_OBJECT | 
					
						
							|  |  |  | public: | 
					
						
							|  |  |  |     SpotClient(MessageClient *client, QObject *parent = nullptr); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     void prepare(); | 
					
						
							|  |  |  |     void setLocalStation(QString callsign, QString grid, QString info, QString version); | 
					
						
							|  |  |  |     void enqueueLocalSpot(QString callsign, QString grid, QString info, QString version); | 
					
						
							| 
									
										
										
										
											2019-12-14 22:53:34 -05:00
										 |  |  |     void enqueueCmd(QString cmd, QString from, QString to, QString relayPath, QString text, QString grid, QString extra, int submode, int frequency, int snr); | 
					
						
							|  |  |  |     void enqueueSpot(QString callsign, QString grid, int submode, int frequency, int snr); | 
					
						
							| 
									
										
										
										
											2019-03-24 21:01:03 -04:00
										 |  |  |     void sendRawSpot(QByteArray payload); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | public slots: | 
					
						
							|  |  |  |     void processSpots(); | 
					
						
							|  |  |  |     void dnsLookupResult(QHostInfo); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | private: | 
					
						
							| 
									
										
										
										
											2019-03-25 09:52:35 -04:00
										 |  |  |     int m_seq; | 
					
						
							| 
									
										
										
										
											2019-03-24 21:01:03 -04:00
										 |  |  |     QString m_call; | 
					
						
							|  |  |  |     QString m_grid; | 
					
						
							|  |  |  |     QString m_info; | 
					
						
							|  |  |  |     QString m_version; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     QHostAddress m_address; | 
					
						
							|  |  |  |     MessageClient *m_client; | 
					
						
							|  |  |  |     QTimer m_timer; | 
					
						
							|  |  |  |     QQueue<QByteArray> m_queue; | 
					
						
							|  |  |  | }; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | #endif // JS8SPOTCLIENT_H
 |