1 | |
---|---|
2 | #ifdef _WIN32 |
3 | #define LIBXML_DLL_IMPORT __declspec(dllimport) |
4 | #else |
5 | extern "C"int xmlLoadExtDtdDefaultValue; |
6 | #endif |
7 | |
8 | #include "kio_help.h" |
9 | |
10 | #include <docbookxslt.h> |
11 | |
12 | #include <QDebug> |
13 | |
14 | #include <qplatformdefs.h> |
15 | |
16 | #include <libxml/HTMLtree.h> |
17 | #include <libxml/debugXML.h> |
18 | #include <libxml/parserInternals.h> |
19 | #include <libxml/xmlIO.h> |
20 | #include <libxml/xmlmemory.h> |
21 | #include <libxml/xmlversion.h> |
22 | |
23 | #include <libexslt/exslt.h> |
24 | #include <libxslt/transform.h> |
25 | #include <libxslt/xsltInternals.h> |
26 | #include <libxslt/xsltconfig.h> |
27 | #include <libxslt/xsltutils.h> |
28 | |
29 | // Pseudo plugin class to embed meta data |
30 | class KIOPluginForMetaData : public QObject |
31 | { |
32 | Q_OBJECT |
33 | Q_PLUGIN_METADATA(IID "org.kde.kio.worker.ghelp"FILE "ghelp.json") |
34 | }; |
35 | |
36 | extern "C"{ |
37 | Q_DECL_EXPORT int kdemain(int argc, char **argv) |
38 | { |
39 | KDocTools::setupStandardDirs(); |
40 | |
41 | // qDebug() << "Starting " << getpid(); |
42 | |
43 | if (argc != 4) { |
44 | fprintf(stderr, format: "Usage: kio_ghelp protocol domain-socket1 domain-socket2\n"); |
45 | exit(status: -1); |
46 | } |
47 | |
48 | LIBXML_TEST_VERSION |
49 | xmlSubstituteEntitiesDefault(val: 1); |
50 | xmlLoadExtDtdDefaultValue = 1; |
51 | exsltRegisterAll(); |
52 | |
53 | HelpProtocol worker(true, argv[2], argv[3]); |
54 | worker.dispatchLoop(); |
55 | |
56 | // qDebug() << "Done"; |
57 | return 0; |
58 | } |
59 | } |
60 | |
61 | // needed for JSON file embedding |
62 | #include "main_ghelp.moc" |
63 |