MythTV
master
mythtv
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
QHostAddress
m_peerAddress
;
35
36
private
:
37
Q_DISABLE_COPY(
MythHTTPRequest
)
38
static
HTTPQueries
ParseQuery(
const
QString& Query);
39
};
40
41
#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:103
MythHTTPRequest::m_url
QUrl m_url
Definition:
mythhttprequest.h:24
HTTPData
std::shared_ptr< MythHTTPData > HTTPData
Definition:
mythhttptypes.h:37
HTTPHeaders
std::shared_ptr< HTTPMap > HTTPHeaders
Definition:
mythhttptypes.h:36
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:82
MythHTTPStatus
MythHTTPStatus
Definition:
mythhttptypes.h:105
MythHTTPRequestType
MythHTTPRequestType
Definition:
mythhttptypes.h:90
HTTPQueries
HTTPMap HTTPQueries
Definition:
mythhttptypes.h:35
HTTPConnectionClose
@ HTTPConnectionClose
Definition:
mythhttptypes.h:130
mythhttptypes.h
HTTP_SOCKET_TIMEOUT_MS
#define HTTP_SOCKET_TIMEOUT_MS
Definition:
mythhttptypes.h:25
MythHTTPRequest::m_root
QString m_root
Definition:
mythhttprequest.h:25
HTTPBadRequest
@ HTTPBadRequest
Definition:
mythhttptypes.h:113
HTTPUnknown
@ HTTPUnknown
Definition:
mythhttptypes.h:92
MythHTTPRequest::m_method
QString m_method
Definition:
mythhttprequest.h:19
MythHTTPRequest::m_path
QString m_path
Definition:
mythhttprequest.h:26
MythHTTPRequest::m_peerAddress
QHostAddress m_peerAddress
Definition:
mythhttprequest.h:34
MythHTTPRequest::m_queries
HTTPQueries m_queries
Definition:
mythhttprequest.h:28
MythHTTPConfig
Definition:
mythhttptypes.h:61
HTTPUnknownVersion
@ HTTPUnknownVersion
Definition:
mythhttptypes.h:84
MythHTTPConnection
MythHTTPConnection
Definition:
mythhttptypes.h:128
Generated on Fri Aug 29 2025 03:15:49 for MythTV by
1.8.17