1 /*
2  * SessionHTMLPreview.hpp
3  *
4  * Copyright (C) 2021 by RStudio, PBC
5  *
6  * Unless you have received this program directly from RStudio pursuant
7  * to the terms of a commercial license agreement with RStudio, then
8  * this program is licensed to you under the terms of version 3 of the
9  * GNU Affero General Public License. This program is distributed WITHOUT
10  * ANY EXPRESS OR IMPLIED WARRANTY, INCLUDING THOSE OF NON-INFRINGEMENT,
11  * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Please refer to the
12  * AGPL (http://www.gnu.org/licenses/agpl-3.0.txt) for more details.
13  *
14  */
15 
16 #ifndef SESSION_HTML_PREVIEW_HPP
17 #define SESSION_HTML_PREVIEW_HPP
18 
19 #define kQtMathJaxConfigScript "<script type=\"text/x-mathjax-config\">" \
20    "MathJax.Hub.Config({" \
21    "  \"HTML-CSS\": { minScaleAdjust: 125, availableFonts: [] } " \
22    " });" \
23    "</script>"
24 
25 #include <shared_core/json/Json.hpp>
26 
27 namespace rstudio {
28 namespace core {
29    class Error;
30    class FilePath;
31    namespace http {
32       class Response;
33    }
34 }
35 }
36 
37 namespace rstudio {
38 namespace session {
39 namespace modules {
40 namespace html_preview {
41 
42 core::json::Object capabilitiesAsJson();
43 void addFileSpecificHeaders(const core::FilePath& filePath,
44                             core::http::Response* pResponse);
45 
46 core::Error initialize();
47 
48 } // namespace html_preview
49 } // namespace modules
50 } // namespace session
51 } // namespace rstudio
52 
53 #endif // SESSION_HTML_PREVIEW_HPP
54