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.
httpserver
httpsessionstore.h
Go to the documentation of this file.
1
6
#ifndef HTTPSESSIONSTORE_H
7
#define HTTPSESSIONSTORE_H
8
9
#include <QObject>
10
#include <QMap>
11
#include <QTimer>
12
#include <QMutex>
13
#include "
httpglobal.h
"
14
#include "
httpsession.h
"
15
#include "
httpresponse.h
"
16
#include "
httprequest.h
"
17
#include "
httpsessionssettings.h
"
18
19
#include "
export.h
"
20
21
namespace
qtwebapp
{
22
38
class
HTTPSERVER_API
HttpSessionStore
:
public
QObject {
39
Q_OBJECT
40
Q_DISABLE_COPY(
HttpSessionStore
)
41
public
:
42
44
HttpSessionStore
(QSettings* settings, QObject* parent=NULL);
45
47
HttpSessionStore
(
const
HttpSessionsSettings
& settings, QObject* parent=NULL);
48
50
virtual
~
HttpSessionStore
();
51
61
QByteArray getSessionId(
HttpRequest
& request,
HttpResponse
& response);
62
73
HttpSession
getSession(
HttpRequest
& request,
HttpResponse
& response,
bool
allowCreate=
true
);
74
82
HttpSession
getSession(
const
QByteArray
id
);
83
85
void
removeSession(
HttpSession
session);
86
91
HttpSessionsSettings
getListenerSettings
()
const
{
return
sessionsSettings; }
92
97
void
setListenerSettings
(
const
HttpSessionsSettings
& settings) { sessionsSettings = settings; }
98
99
protected
:
101
QMap<QByteArray,HttpSession>
sessions
;
102
103
private
:
104
106
QSettings*
settings
;
107
109
HttpSessionsSettings
sessionsSettings
;
110
112
QTimer
cleanupTimer
;
113
115
QByteArray
cookieName
;
116
118
int
expirationTime
;
119
121
QMutex
mutex
;
122
124
bool
useQtSettings
;
125
126
private
slots:
127
129
void
sessionTimerEvent();
130
};
131
132
}
// end of namespace
133
134
#endif // HTTPSESSIONSTORE_H
qtwebapp::HttpRequest
Definition:
httprequest.h:41
httprequest.h
export.h
qtwebapp::HttpSessionStore::expirationTime
int expirationTime
Definition:
httpsessionstore.h:118
HTTPSERVER_API
#define HTTPSERVER_API
Definition:
export.h:88
httpresponse.h
qtwebapp::HttpSessionStore::sessions
QMap< QByteArray, HttpSession > sessions
Definition:
httpsessionstore.h:101
qtwebapp::HttpSessionStore::getListenerSettings
HttpSessionsSettings getListenerSettings() const
Definition:
httpsessionstore.h:91
qtwebapp::HttpSessionStore::cleanupTimer
QTimer cleanupTimer
Definition:
httpsessionstore.h:112
qtwebapp::HttpSessionStore
Definition:
httpsessionstore.h:38
qtwebapp::HttpSessionStore::cookieName
QByteArray cookieName
Definition:
httpsessionstore.h:115
qtwebapp::HttpSessionsSettings
Definition:
httpsessionssettings.h:13
qtwebapp
Definition:
httpconnectionhandler.h:23
httpglobal.h
httpsession.h
qtwebapp::HttpSession
Definition:
httpsession.h:25
qtwebapp::HttpSessionStore::mutex
QMutex mutex
Definition:
httpsessionstore.h:121
qtwebapp::HttpSessionStore::settings
QSettings * settings
Definition:
httpsessionstore.h:106
qtwebapp::HttpResponse
Definition:
httpresponse.h:38
qtwebapp::HttpSessionStore::sessionsSettings
HttpSessionsSettings sessionsSettings
Definition:
httpsessionstore.h:109
qtwebapp::HttpSessionStore::useQtSettings
bool useQtSettings
Definition:
httpsessionstore.h:124
httpsessionssettings.h
qtwebapp::HttpSessionStore::setListenerSettings
void setListenerSettings(const HttpSessionsSettings &settings)
Definition:
httpsessionstore.h:97
Generated on Fri Aug 2 2019 17:56:29 for SDRAngel by
1.8.13