Hobrasoft httpd server
Embedded HTTP server for Qt and C++
httpsession.cpp
Go to the documentation of this file.
1 
8 #include "httpsession.h"
9 #include <QUuid>
10 #include <QDebug>
11 
12 using namespace HobrasoftHttpd;
13 
14 
15 
17  m_data = QSharedPointer<HttpSessionData>(new HttpSessionData());
18  m_data->lastAccess = QDateTime::currentDateTime();
19  m_data->id = QUuid::createUuid().toString().toUtf8();
20 }
21 
22 
24  QMutexLocker locker1(&m_mutex);
25  m_data = other.m_data;
26  if (m_data != NULL) {
27  m_data->lastAccess = QDateTime::currentDateTime();
28  }
29 }
30 
31 
33  QMutexLocker locker1(&m_mutex);
34  m_data = other.m_data;
35  if (m_data != NULL) {
36  m_data->lastAccess = QDateTime::currentDateTime();
37  }
38  return *this;
39 }
40 
HttpSession()
Constructor, should be private. Do not use in your code.
Definition: httpsession.cpp:16
QDateTime lastAccess()
Return time of last access to the session.
Definition: httpsession.h:94
Information about one session.
Definition: httpsession.h:33
HttpSession & operator=(const HttpSession &other)
Operator=(), should be private. Do not use in your code.
Definition: httpsession.cpp:32
Namespace of HTTP server.