MythTV
master
libs
libmythbase
http
mythhttprequest.h
Go to the documentation of this file.
1
#ifndef MYTHHTTPREQUEST_H
2
#define MYTHHTTPREQUEST_H
3
4
// Qt
5
#include <QUrl>
6
7
// MythTV
8
#include "
libmythbase/http/mythhttptypes.h
"
9
10
class
QTcpSocket;
11
12
class
MBASE_PUBLIC
MythHTTPRequest
13
{
14
public
:
15
MythHTTPRequest
(
const
MythHTTPConfig
& Config, QString Method,
16
HTTPHeaders
Headers,
HTTPData
Content
, QTcpSocket* Socket =
nullptr
);
17
18
QString
m_serverName
;
19
QString
m_method
;
20
HTTPHeaders
m_headers {
nullptr
};
21
HTTPData
m_content {
nullptr
};
22
23
MythHTTPStatus
m_status {
HTTPBadRequest
};
24
QUrl
m_url
;
25
QString
m_root
;
26
QString
m_path
;
27
QString
m_fileName
;
28
HTTPQueries
m_queries
;
29
MythHTTPVersion
m_version {
HTTPUnknownVersion
};
30
MythHTTPRequestType
m_type {
HTTPUnknown
};
31
MythHTTPConnection
m_connection {
HTTPConnectionClose
};
32
std::chrono::milliseconds m_timeout {
HTTP_SOCKET_TIMEOUT_MS
};
33
int
m_allowed {
HTTP_DEFAULT_ALLOWED
};
34
35
private
:
36
Q_DISABLE_COPY(
MythHTTPRequest
)
37
static
HTTPQueries
ParseQuery(
const
QString& Query);
38
};
39
40
#endif
MythHTTPRequest
Limited parsing of HTTP method and some headers to determine validity of request.
Definition:
mythhttprequest.h:12
HTTP_DEFAULT_ALLOWED
#define HTTP_DEFAULT_ALLOWED
Definition:
mythhttptypes.h:102
MythHTTPRequest::m_url
QUrl m_url
Definition:
mythhttprequest.h:24
HTTPData
std::shared_ptr< MythHTTPData > HTTPData
Definition:
mythhttptypes.h:36
HTTPHeaders
std::shared_ptr< HTTPMap > HTTPHeaders
Definition:
mythhttptypes.h:35
MythHTTPRequest::m_serverName
QString m_serverName
Definition:
mythhttprequest.h:18
MythHTTPRequest::m_fileName
QString m_fileName
Definition:
mythhttprequest.h:27
MBASE_PUBLIC
#define MBASE_PUBLIC
Definition:
mythbaseexp.h:15
MythHTTPVersion
MythHTTPVersion
Definition:
mythhttptypes.h:81
MythHTTPStatus
MythHTTPStatus
Definition:
mythhttptypes.h:104
MythHTTPRequestType
MythHTTPRequestType
Definition:
mythhttptypes.h:89
HTTPQueries
HTTPMap HTTPQueries
Definition:
mythhttptypes.h:34
HTTPConnectionClose
@ HTTPConnectionClose
Definition:
mythhttptypes.h:129
mythhttptypes.h
HTTP_SOCKET_TIMEOUT_MS
#define HTTP_SOCKET_TIMEOUT_MS
Definition:
mythhttptypes.h:24
MythHTTPRequest::m_root
QString m_root
Definition:
mythhttprequest.h:25
HTTPBadRequest
@ HTTPBadRequest
Definition:
mythhttptypes.h:112
HTTPUnknown
@ HTTPUnknown
Definition:
mythhttptypes.h:91
MythHTTPRequest::m_method
QString m_method
Definition:
mythhttprequest.h:19
MythHTTPRequest::m_path
QString m_path
Definition:
mythhttprequest.h:26
MythHTTPRequest::m_queries
HTTPQueries m_queries
Definition:
mythhttprequest.h:28
MythHTTPConfig
Definition:
mythhttptypes.h:60
Content
Definition:
content.h:36
HTTPUnknownVersion
@ HTTPUnknownVersion
Definition:
mythhttptypes.h:83
MythHTTPConnection
MythHTTPConnection
Definition:
mythhttptypes.h:127
Generated on Mon Oct 2 2023 03:19:26 for MythTV by
1.8.17