KDocTools
main.cpp
Go to the documentation of this file.
00001 #ifdef _WIN32 00002 #define LIBXML_DLL_IMPORT __declspec(dllimport) 00003 #else 00004 extern "C" int xmlLoadExtDtdDefaultValue; 00005 #endif 00006 00007 #include "kio_help.h" 00008 #include "xslt.h" 00009 00010 #include <kstandarddirs.h> 00011 #include <kcomponentdata.h> 00012 #include <kdebug.h> 00013 00014 #include <QtCore/QString> 00015 00016 #include <stdlib.h> 00017 #include <string.h> 00018 #include <sys/time.h> 00019 #include <unistd.h> 00020 00021 #include <libxml/xmlversion.h> 00022 #include <libxml/xmlmemory.h> 00023 #include <libxml/debugXML.h> 00024 #include <libxml/HTMLtree.h> 00025 #include <libxml/xmlIO.h> 00026 #include <libxml/parserInternals.h> 00027 00028 #include <libxslt/xsltconfig.h> 00029 #include <libxslt/xsltInternals.h> 00030 #include <libxslt/transform.h> 00031 #include <libxslt/xsltutils.h> 00032 #include <libexslt/exslt.h> 00033 00034 extern "C" 00035 { 00036 KDE_EXPORT int kdemain( int argc, char **argv ) 00037 { 00038 Q_ASSERT(!KGlobal::hasMainComponent()); // kdeinit is messed up if this is the case. 00039 KComponentData componentData( "kio_help", "kio_help4" ); 00040 fillInstance(componentData); 00041 (void)componentData.config(); // we need this one to make sure system globals are read 00042 00043 kDebug(7101) << "Starting " << getpid(); 00044 00045 if (argc != 4) 00046 { 00047 fprintf(stderr, "Usage: kio_help protocol domain-socket1 domain-socket2\n"); 00048 exit(-1); 00049 } 00050 00051 LIBXML_TEST_VERSION 00052 xmlSubstituteEntitiesDefault(1); 00053 xmlLoadExtDtdDefaultValue = 1; 00054 exsltRegisterAll(); 00055 00056 HelpProtocol slave(false, argv[2], argv[3]); 00057 slave.dispatchLoop(); 00058 00059 kDebug(7101) << "Done"; 00060 return 0; 00061 } 00062 } 00063 00064 00065
KDE 4.6 API Reference