File indexing completed on 2024-05-05 03:56:06

0001 
0002 #ifdef _WIN32
0003 #define LIBXML_DLL_IMPORT __declspec(dllimport)
0004 #else
0005 extern "C" int xmlLoadExtDtdDefaultValue;
0006 #endif
0007 
0008 #include "kio_help.h"
0009 
0010 #include <docbookxslt.h>
0011 
0012 #include <QDebug>
0013 
0014 #include <qplatformdefs.h>
0015 
0016 #include <libxml/HTMLtree.h>
0017 #include <libxml/debugXML.h>
0018 #include <libxml/parserInternals.h>
0019 #include <libxml/xmlIO.h>
0020 #include <libxml/xmlmemory.h>
0021 #include <libxml/xmlversion.h>
0022 
0023 #include <libexslt/exslt.h>
0024 #include <libxslt/transform.h>
0025 #include <libxslt/xsltInternals.h>
0026 #include <libxslt/xsltconfig.h>
0027 #include <libxslt/xsltutils.h>
0028 
0029 // Pseudo plugin class to embed meta data
0030 class KIOPluginForMetaData : public QObject
0031 {
0032     Q_OBJECT
0033     Q_PLUGIN_METADATA(IID "org.kde.kio.worker.ghelp" FILE "ghelp.json")
0034 };
0035 
0036 extern "C" {
0037 Q_DECL_EXPORT int kdemain(int argc, char **argv)
0038 {
0039     KDocTools::setupStandardDirs();
0040 
0041     // qDebug() << "Starting " << getpid();
0042 
0043     if (argc != 4) {
0044         fprintf(stderr, "Usage: kio_ghelp protocol domain-socket1 domain-socket2\n");
0045         exit(-1);
0046     }
0047 
0048     LIBXML_TEST_VERSION
0049     xmlSubstituteEntitiesDefault(1);
0050     xmlLoadExtDtdDefaultValue = 1;
0051     exsltRegisterAll();
0052 
0053     HelpProtocol worker(true, argv[2], argv[3]);
0054     worker.dispatchLoop();
0055 
0056     // qDebug() << "Done";
0057     return 0;
0058 }
0059 }
0060 
0061 // needed for JSON file embedding
0062 #include "main_ghelp.moc"