xbmc
WsgiErrorStream.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 
13 #include <vector>
14 
15 struct HTTPPythonRequest;
16 
17 namespace XBMCAddon
18 {
19  namespace xbmcwsgi
20  {
21 
34  class WsgiErrorStream : public AddonClass
35  {
36  public:
38  ~WsgiErrorStream() override;
39 
40 #ifdef DOXYGEN_SHOULD_USE_THIS
41  flush();
48 #else
49  inline void flush() { }
50 #endif
51 
52 #ifdef DOXYGEN_SHOULD_USE_THIS
53  write(...);
63 #else
64  void write(const String& str);
65 #endif
66 
67 #ifdef DOXYGEN_SHOULD_USE_THIS
68  writelines(...);
77 #else
78  void writelines(const std::vector<String>& seq);
79 #endif
80 
81 #ifndef SWIG
82 
85  void SetRequest(HTTPPythonRequest* request);
86 
87  HTTPPythonRequest* m_request;
88 #endif
89  };
91  }
92 }
Definition: HTTPPythonRequest.h:18
Definition: WsgiErrorStream.h:34
Defining LOG_LIFECYCLE_EVENTS will log all instantiations, deletions and also reference countings (in...
Definition: Addon.cpp:25
void SetRequest(HTTPPythonRequest *request)
Sets the given request.
Definition: WsgiErrorStream.cpp:54
This class is the superclass for all reference counted classes in the api.
Definition: AddonClass.h:57