Kodi Development
22.0
for Binary and Script based Add-Ons
Loading...
Searching...
No Matches
WsgiResponse.h
1
/*
2
* Copyright (C) 2015-2018 Team Kodi
3
* This file is part of Kodi - https://kodi.tv
4
*
5
* SPDX-License-Identifier: GPL-2.0-or-later
6
* See LICENSES/README.md for more information.
7
*/
8
9
#pragma once
10
11
#include "interfaces/legacy/AddonClass.h"
12
#include "interfaces/legacy/Tuple.h"
13
#include "interfaces/legacy/wsgi/WsgiResponseBody.h"
14
#include "network/httprequesthandler/python/HTTPPythonRequest.h"
15
16
#include <vector>
17
18
namespace
XBMCAddon
19
{
20
namespace
xbmcwsgi
21
{
22
typedef
Tuple<String, String> WsgiHttpHeader;
23
33
class
WsgiResponse
:
public
AddonClass
34
{
35
public
:
36
WsgiResponse
();
37
~WsgiResponse
()
override
;
38
39
#ifdef DOXYGEN_SHOULD_USE_THIS
58
operator
(...);
59
#else
60
WsgiResponseBody
* operator()(
const
String& status,
const
std::vector<WsgiHttpHeader>& response_headers,
void
* exc_info = NULL);
61
#endif
62
63
#ifndef SWIG
64
void
Append(
const
std::string& data);
65
66
bool
Finalize(HTTPPythonRequest* request)
const
;
67
68
private
:
69
bool
m_called =
false
;
70
int
m_status = MHD_HTTP_INTERNAL_SERVER_ERROR;
71
std::multimap<std::string, std::string> m_responseHeaders;
72
73
WsgiResponseBody
m_body;
74
#endif
75
};
76
}
77
}
XBMCAddon::xbmcwsgi::WsgiResponseBody
Definition
WsgiResponseBody.h:27
XBMCAddon::xbmcwsgi::WsgiResponse
Definition
WsgiResponse.h:34
XBMCAddon::xbmcwsgi::WsgiResponse::operator
operator(...)
interfaces
legacy
wsgi
WsgiResponse.h
Generated by
1.12.0