SDRAngel  4.11.5
Developer docs for <a href="https://github.com/f4exb/sdrangel">SDRangel<\a>, an Open Source Qt5 / OpenGL 3.0+ SDR and signal analyzer frontend to various hardware.
httplistener.h
Go to the documentation of this file.
1 
6 #ifndef HTTPLISTENER_H
7 #define HTTPLISTENER_H
8 
9 #include <QTcpServer>
10 #include <QSettings>
11 #include <QBasicTimer>
12 #include "httpglobal.h"
13 #include "httpconnectionhandler.h"
15 #include "httprequesthandler.h"
16 #include "httplistenersettings.h"
17 
18 #include "export.h"
19 
20 namespace qtwebapp {
21 
47 class HTTPSERVER_API HttpListener : public QTcpServer {
48  Q_OBJECT
49  Q_DISABLE_COPY(HttpListener)
50 public:
51 
60  HttpListener(QSettings* settings, HttpRequestHandler* requestHandler, QObject* parent = NULL);
61 
70  HttpListener(const HttpListenerSettings& settings, HttpRequestHandler* requestHandler, QObject* parent = NULL);
71 
73  virtual ~HttpListener();
74 
78  void listen();
79 
84  void close();
85 
90  HttpListenerSettings getListenerSettings() const { return listenerSettings; }
91 
96  void setListenerSettings(const HttpListenerSettings& settings) { listenerSettings = settings; }
97 
98 protected:
99 
101  void incomingConnection(tSocketDescriptor socketDescriptor);
102 
103 private:
104 
106  QSettings* settings;
107 
110 
113 
116 
119 
120 signals:
121 
127  void handleConnection(tSocketDescriptor socketDescriptor);
128 
129 };
130 
131 } // end of namespace
132 
133 #endif // HTTPLISTENER_H
#define HTTPSERVER_API
Definition: export.h:88
void setListenerSettings(const HttpListenerSettings &settings)
Definition: httplistener.h:96
HttpConnectionHandlerPool * pool
Definition: httplistener.h:115
HttpRequestHandler * requestHandler
Definition: httplistener.h:112
HttpListenerSettings getListenerSettings() const
Definition: httplistener.h:90
HttpListenerSettings listenerSettings
Definition: httplistener.h:109