mirror of
https://github.com/f4exb/sdrangel.git
synced 2026-06-01 13:47:01 -04:00
HttpServer: use settings structures in place of QSettings
This commit is contained in:
@@ -42,6 +42,8 @@ namespace qtwebapp {
|
||||
received a related HTTP request.
|
||||
*/
|
||||
|
||||
class HttpDocrootSettings;
|
||||
|
||||
class DECLSPEC StaticFileController : public HttpRequestHandler {
|
||||
Q_OBJECT
|
||||
Q_DISABLE_COPY(StaticFileController)
|
||||
@@ -50,6 +52,9 @@ public:
|
||||
/** Constructor */
|
||||
StaticFileController(QSettings* settings, QObject* parent = NULL);
|
||||
|
||||
/** Constructor */
|
||||
StaticFileController(HttpDocrootSettings* settings, QObject* parent = NULL);
|
||||
|
||||
/** Generates the response */
|
||||
void service(HttpRequest& request, HttpResponse& response);
|
||||
|
||||
@@ -82,6 +87,9 @@ private:
|
||||
/** Used to synchronize cache access for threads */
|
||||
QMutex mutex;
|
||||
|
||||
/** Settings flag */
|
||||
bool useQtSettings;
|
||||
|
||||
/** Set a content-type header in the response depending on the ending of the filename */
|
||||
void setContentType(QString file, HttpResponse& response) const;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user