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