File indexing completed on 2024-04-28 04:57:51
0001 /** 0002 * \file man2html.h 0003 * 0004 * Converts man pages to HTML. This KIO worker is not part of KDE Frameworks and is 0005 * not public API. 0006 * \internal 0007 */ 0008 0009 #ifndef MAN2HTML_H 0010 #define MAN2HTML_H 0011 0012 class QByteArray; 0013 0014 /** 0015 Try to detect the encoding of given man page content 0016 and convert it to UTF-8 0017 */ 0018 char *manPageToUtf8(const QByteArray &input, const QByteArray &dirName); 0019 0020 /** call this with the buffer you have */ 0021 void scan_man_page(const char *man_page); 0022 0023 /* 0024 * Sets the path to a CSS file that should be included with the generated 0025 * HTML output. 0026 * 0027 * \param HTML-encoded path to the file to reference for stylesheets. 0028 * \since 4.1 0029 */ 0030 extern void setCssFile(const QByteArray &_cssFile); 0031 0032 /** implement this somewhere. It will be called 0033 with HTML contents 0034 */ 0035 extern void output_real(const char *insert); 0036 0037 /** 0038 * called for requested man pages. filename can be a 0039 * relative path! Return NULL on errors. The returned 0040 * char array is freed by man2html 0041 */ 0042 extern char *read_man_page(const char *filename); 0043 0044 #endif // MAN2HTML_H