From dfe289850f068f19ba4a83ab4e7e22a7e09c13c9 Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Sat, 26 Jan 2013 13:17:21 -0600 Subject: Rename a number of libraries and executables to avoid conflicts with KDE4 --- tdehtml/java/CMakeLists.txt | 76 ++ tdehtml/java/ChangeLog | 19 + tdehtml/java/KJAS_GRAMMAR.txt | 82 ++ tdehtml/java/Makefile.am | 37 + tdehtml/java/README | 20 + tdehtml/java/TODO | 22 + tdehtml/java/build.properties | 9 + tdehtml/java/build.xml | 49 ++ tdehtml/java/configure.in.in | 5 + tdehtml/java/cr16-action-java.png | Bin 0 -> 1051 bytes tdehtml/java/dummy/CMakeLists.txt | 30 + tdehtml/java/dummy/Makefile.am | 13 + tdehtml/java/images/animbean.gif | Bin 0 -> 4376 bytes tdehtml/java/images/beanicon.png | Bin 0 -> 569 bytes tdehtml/java/images/brokenbean.gif | Bin 0 -> 1195 bytes tdehtml/java/kjava.jar | Bin 0 -> 157645 bytes tdehtml/java/kjava.policy.in | 8 + tdehtml/java/kjavaapplet.cpp | 288 +++++++ tdehtml/java/kjavaapplet.h | 251 ++++++ tdehtml/java/kjavaappletcontext.cpp | 274 +++++++ tdehtml/java/kjavaappletcontext.h | 141 ++++ tdehtml/java/kjavaappletserver.cpp | 833 +++++++++++++++++++ tdehtml/java/kjavaappletserver.h | 180 +++++ tdehtml/java/kjavaappletviewer.cpp | 635 +++++++++++++++ tdehtml/java/kjavaappletviewer.desktop | 82 ++ tdehtml/java/kjavaappletviewer.h | 145 ++++ tdehtml/java/kjavaappletwidget.cpp | 140 ++++ tdehtml/java/kjavaappletwidget.h | 125 +++ tdehtml/java/kjavadownloader.cpp | 298 +++++++ tdehtml/java/kjavadownloader.h | 90 +++ tdehtml/java/kjavaprocess.cpp | 397 +++++++++ tdehtml/java/kjavaprocess.h | 164 ++++ tdehtml/java/kqeventutil.cpp | 200 +++++ tdehtml/java/kqeventutil.h | 34 + tdehtml/java/kxeventutil.cpp | 408 ++++++++++ tdehtml/java/kxeventutil.h | 51 ++ tdehtml/java/make-jar | 12 + tdehtml/java/netscape/javascript/JSException.java | 20 + tdehtml/java/netscape/javascript/JSObject.java | 21 + tdehtml/java/netscape/plugin/Plugin.java | 28 + .../security/ForbiddenTargetException.java | 10 + tdehtml/java/netscape/security/Principal.java | 4 + .../java/netscape/security/PrivilegeManager.java | 109 +++ tdehtml/java/netscape/security/Target.java | 4 + tdehtml/java/org/kde/javascript/JSObject.java | 183 +++++ tdehtml/java/org/kde/kjas/server/Console.java | 20 + .../org/kde/kjas/server/KJASAppletClassLoader.java | 360 +++++++++ .../org/kde/kjas/server/KJASAppletContext.java | 473 +++++++++++ .../java/org/kde/kjas/server/KJASAppletPanel.java | 113 +++ .../java/org/kde/kjas/server/KJASAppletStub.java | 807 ++++++++++++++++++ .../java/org/kde/kjas/server/KJASAudioClip.java | 98 +++ .../org/kde/kjas/server/KJASBrokenClassFixer.java | 132 +++ tdehtml/java/org/kde/kjas/server/KJASConsole.java | 93 +++ .../org/kde/kjas/server/KJASConsoleStream.java | 46 ++ .../org/kde/kjas/server/KJASProtocolHandler.java | 900 +++++++++++++++++++++ .../org/kde/kjas/server/KJASSecurityManager.java | 243 ++++++ .../java/org/kde/kjas/server/KJASSoundPlayer.java | 36 + .../java/org/kde/kjas/server/KJASSwingConsole.java | 325 ++++++++ .../kjas/server/KJASURLStreamHandlerFactory.java | 609 ++++++++++++++ tdehtml/java/org/kde/kjas/server/Main.java | 178 ++++ .../java/org/kde/kjas/server/StatusListener.java | 5 + tdehtml/java/pluginsinfo | 7 + tdehtml/java/tests/Makefile.am | 9 + tdehtml/java/tests/badapplets/BadApplet.jar | Bin 0 -> 7233 bytes tdehtml/java/tests/badapplets/BadApplet.java | 202 +++++ tdehtml/java/tests/badapplets/applet.html | 14 + tdehtml/java/tests/good_sites | 44 + tdehtml/java/tests/testkjavaappletserver.cpp | 41 + 68 files changed, 10252 insertions(+) create mode 100644 tdehtml/java/CMakeLists.txt create mode 100644 tdehtml/java/ChangeLog create mode 100644 tdehtml/java/KJAS_GRAMMAR.txt create mode 100644 tdehtml/java/Makefile.am create mode 100644 tdehtml/java/README create mode 100644 tdehtml/java/TODO create mode 100644 tdehtml/java/build.properties create mode 100644 tdehtml/java/build.xml create mode 100644 tdehtml/java/configure.in.in create mode 100644 tdehtml/java/cr16-action-java.png create mode 100644 tdehtml/java/dummy/CMakeLists.txt create mode 100644 tdehtml/java/dummy/Makefile.am create mode 100644 tdehtml/java/images/animbean.gif create mode 100644 tdehtml/java/images/beanicon.png create mode 100644 tdehtml/java/images/brokenbean.gif create mode 100644 tdehtml/java/kjava.jar create mode 100644 tdehtml/java/kjava.policy.in create mode 100644 tdehtml/java/kjavaapplet.cpp create mode 100644 tdehtml/java/kjavaapplet.h create mode 100644 tdehtml/java/kjavaappletcontext.cpp create mode 100644 tdehtml/java/kjavaappletcontext.h create mode 100644 tdehtml/java/kjavaappletserver.cpp create mode 100644 tdehtml/java/kjavaappletserver.h create mode 100644 tdehtml/java/kjavaappletviewer.cpp create mode 100644 tdehtml/java/kjavaappletviewer.desktop create mode 100644 tdehtml/java/kjavaappletviewer.h create mode 100644 tdehtml/java/kjavaappletwidget.cpp create mode 100644 tdehtml/java/kjavaappletwidget.h create mode 100644 tdehtml/java/kjavadownloader.cpp create mode 100644 tdehtml/java/kjavadownloader.h create mode 100644 tdehtml/java/kjavaprocess.cpp create mode 100644 tdehtml/java/kjavaprocess.h create mode 100644 tdehtml/java/kqeventutil.cpp create mode 100644 tdehtml/java/kqeventutil.h create mode 100644 tdehtml/java/kxeventutil.cpp create mode 100644 tdehtml/java/kxeventutil.h create mode 100755 tdehtml/java/make-jar create mode 100644 tdehtml/java/netscape/javascript/JSException.java create mode 100644 tdehtml/java/netscape/javascript/JSObject.java create mode 100644 tdehtml/java/netscape/plugin/Plugin.java create mode 100644 tdehtml/java/netscape/security/ForbiddenTargetException.java create mode 100644 tdehtml/java/netscape/security/Principal.java create mode 100644 tdehtml/java/netscape/security/PrivilegeManager.java create mode 100644 tdehtml/java/netscape/security/Target.java create mode 100644 tdehtml/java/org/kde/javascript/JSObject.java create mode 100644 tdehtml/java/org/kde/kjas/server/Console.java create mode 100644 tdehtml/java/org/kde/kjas/server/KJASAppletClassLoader.java create mode 100644 tdehtml/java/org/kde/kjas/server/KJASAppletContext.java create mode 100644 tdehtml/java/org/kde/kjas/server/KJASAppletPanel.java create mode 100644 tdehtml/java/org/kde/kjas/server/KJASAppletStub.java create mode 100644 tdehtml/java/org/kde/kjas/server/KJASAudioClip.java create mode 100644 tdehtml/java/org/kde/kjas/server/KJASBrokenClassFixer.java create mode 100644 tdehtml/java/org/kde/kjas/server/KJASConsole.java create mode 100644 tdehtml/java/org/kde/kjas/server/KJASConsoleStream.java create mode 100644 tdehtml/java/org/kde/kjas/server/KJASProtocolHandler.java create mode 100644 tdehtml/java/org/kde/kjas/server/KJASSecurityManager.java create mode 100644 tdehtml/java/org/kde/kjas/server/KJASSoundPlayer.java create mode 100644 tdehtml/java/org/kde/kjas/server/KJASSwingConsole.java create mode 100644 tdehtml/java/org/kde/kjas/server/KJASURLStreamHandlerFactory.java create mode 100644 tdehtml/java/org/kde/kjas/server/Main.java create mode 100644 tdehtml/java/org/kde/kjas/server/StatusListener.java create mode 100644 tdehtml/java/pluginsinfo create mode 100644 tdehtml/java/tests/Makefile.am create mode 100644 tdehtml/java/tests/badapplets/BadApplet.jar create mode 100644 tdehtml/java/tests/badapplets/BadApplet.java create mode 100644 tdehtml/java/tests/badapplets/applet.html create mode 100644 tdehtml/java/tests/good_sites create mode 100644 tdehtml/java/tests/testkjavaappletserver.cpp (limited to 'tdehtml/java') diff --git a/tdehtml/java/CMakeLists.txt b/tdehtml/java/CMakeLists.txt new file mode 100644 index 000000000..994763c09 --- /dev/null +++ b/tdehtml/java/CMakeLists.txt @@ -0,0 +1,76 @@ +################################################# +# +# (C) 2010 Serghei Amelian +# serghei (DOT) amelian (AT) gmail.com +# +# Improvements and feedback are welcome +# +# This file is released under GPL >= 2 +# +################################################# + +add_subdirectory( dummy ) + +include_directories( + ${TQT_INCLUDE_DIRS} + ${CMAKE_CURRENT_BINARY_DIR} + ${CMAKE_BINARY_DIR} + ${CMAKE_BINARY_DIR}/tdecore + ${CMAKE_BINARY_DIR}/kio/kssl + ${CMAKE_SOURCE_DIR} + ${CMAKE_SOURCE_DIR}/tdehtml + ${CMAKE_SOURCE_DIR}/dcop + ${CMAKE_SOURCE_DIR}/tdecore + ${CMAKE_SOURCE_DIR}/tdeui + ${CMAKE_SOURCE_DIR}/kio + ${CMAKE_SOURCE_DIR}/kio/kssl +) + +link_directories( + ${TQT_LIBRARY_DIRS} +) + + +##### configure ################################# + +set( KJAVA_POLICYPATH "${CMAKE_INSTALL_PREFIX}/${DATA_INSTALL_DIR}/kjava/-" ) +configure_file( kjava.policy.in kjava.policy @ONLY ) + + +##### install data ############################## + +install( FILES kjavaappletviewer.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) +install( FILES kjava.jar ${CMAKE_CURRENT_BINARY_DIR}/kjava.policy pluginsinfo DESTINATION ${DATA_INSTALL_DIR}/kjava ) +tde_install_icons( DESTINATION ${DATA_INSTALL_DIR}/kjava/icons ) + + +##### kjava-static ############################## + +set( target kjava ) + +set( ${target}_SRCS + kjavaapplet.cpp kjavaappletcontext.cpp kjavaappletserver.cpp + kjavaappletwidget.cpp kjavaprocess.cpp kjavadownloader.cpp +) + +tde_add_library( ${target} STATIC_PIC + SOURCES ${${target}_SRCS} + LINK ${TQT_LIBRARIES} +) + + +##### kjavaappletviewer ######################### + +set( target kjavaappletviewer ) + +set( ${target}_SRCS + kjavaapplet.cpp kjavaappletcontext.cpp + kjavaappletserver.cpp kjavaappletwidget.cpp kjavaprocess.cpp + kjavadownloader.cpp kjavaappletviewer.cpp +) + +tde_add_kpart( ${target} AUTOMOC + SOURCES ${${target}_SRCS} + LINK tdeparts-shared + DESTINATION ${PLUGIN_INSTALL_DIR} +) diff --git a/tdehtml/java/ChangeLog b/tdehtml/java/ChangeLog new file mode 100644 index 000000000..b276c27ac --- /dev/null +++ b/tdehtml/java/ChangeLog @@ -0,0 +1,19 @@ +1999-12-14 Richard Moore + + * Added a delay when you reload a class so that a race is less + likely (yuck!) + * Added a destructor to kjaw + * Still has trouble though :-( It only seems to occur whn using + KWin, KWM has no problem. + +Tue Dec 7 23:32:21 GMT 1999 + + * Many improvements to string handling + * Moved to value based collections + * Addition of a d pointer for future binary compatability + * Added some accessor methods + * Improvements to kjavaprocess + * - Now handles system property settings + * - Detects death of the server + * - Supports bidirectional comms + * Applets and contexts are destroyed properly diff --git a/tdehtml/java/KJAS_GRAMMAR.txt b/tdehtml/java/KJAS_GRAMMAR.txt new file mode 100644 index 000000000..5632f8de8 --- /dev/null +++ b/tdehtml/java/KJAS_GRAMMAR.txt @@ -0,0 +1,82 @@ +This is documentation for the updated KJAS protocol. + +KJAS Grammar +=============================================================================== + +## Commands From KAppletWidget(C++) to KJAS(Java Process) + -> + -> + -> | + | + | + | + | + | + | + | + | + | + | + | + | + + + -> <1 byte equal to 1 when cast as int> + -> <1 byte equal to 2 when cast as int> + + -> <1 byte equal to 3 when cast as int> + + + + -> <1 byte equal to 4 when cast as int> + + -> <1 byte equal to 5 when cast as int> + + -> <1 byte equal to 6 when cast as int> + + -> <1 byte equal to 7 when cast as int> + + + +## Commands from KJAS(Java Process) to KAppletWidget(C++) + -> <1 byte equal to 8 when cast as int> + + -> <1 byte equal to 9 when cast as int> + + -> <1 byte equal to 10 when cast as int> + + -> <1 byte equal to 11 when cast as int> + + -> <1 byte equal to 12 when cast as int> + + -> <1 byte equal to 13 when cast as int> + + + -> <1 byte equal to 14 when cast as int> + +## basic data types + -> + -> string + -> string + -> string + -> + -> StringNum of ParamPair + -> + -> string + -> + -> + -> string (list of jarfile names) + -> string representation of integer + -> string representation of integer + -> string +<ParamName> -> string +<ParamValue> -> string +<Host> -> string (must be a valid URL) +<URL> -> string (must be a valid URL) +<targetFrame> -> string +<WindowTitle> -> string +<END> -> <SEP> +<SEP> -> Null character- 1 byte = 0 +<StringNum> -> padded string representation of integer, 8 characters long +<ClassLoaderID> -> string +<DATA> -> byte array diff --git a/tdehtml/java/Makefile.am b/tdehtml/java/Makefile.am new file mode 100644 index 000000000..a5e46a0d5 --- /dev/null +++ b/tdehtml/java/Makefile.am @@ -0,0 +1,37 @@ +KDE_CXXFLAGS = $(WOVERLOADED_VIRTUAL) + +noinst_LTLIBRARIES = libkjava.la +libkjava_la_SOURCES = kjavaapplet.cpp kjavaappletcontext.cpp \ + kjavaappletserver.cpp kjavaappletwidget.cpp kjavaprocess.cpp \ + kjavadownloader.cpp + +noinst_HEADERS = kjavaappletwidget.h kqeventutil.h kxeventutil.h \ + kjavaapplet.h kjavaappletcontext.h \ + kjavaappletserver.h kjavaprocess.h kjavaappletviewer.h + +METASOURCES = AUTO + +libkjava_la_LDFLAGS = $(KDE_MT_LDFLAGS) -no-undefined +libkjava_la_LIBADD = $(LIB_KPARTS) + +INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/tdehtml \ + -I$(top_srcdir)/kio/kssl -I$(top_builddir)/kio/kssl \ + $(all_includes) + +kjavadata_DATA = kjava.jar kjava.policy pluginsinfo +kjavadatadir = $(kde_datadir)/kjava/ + +kjavaiconsdir = $(kde_datadir)/kjava/icons +kjavaicons_ICON = AUTO + +SUBDIRS = . tests dummy + +kde_module_LTLIBRARIES= kjavaappletviewer.la +kjavaappletviewer_la_SOURCES= kjavaapplet.cpp kjavaappletcontext.cpp \ + kjavaappletserver.cpp kjavaappletwidget.cpp kjavaprocess.cpp \ + kjavadownloader.cpp kjavaappletviewer.cpp + +kjavaappletviewer_la_LDFLAGS= $(all_libraries) -module $(KDE_PLUGIN) +kjavaappletviewer_la_LIBADD= $(LIB_KPARTS) $(LIB_QT) $(LIB_TDEUI) $(LIB_TDECORE) $(LIB_KFILE) $(top_builddir)/dcop/libDCOP.la + +kde_services_DATA= kjavaappletviewer.desktop diff --git a/tdehtml/java/README b/tdehtml/java/README new file mode 100644 index 000000000..5d64e742f --- /dev/null +++ b/tdehtml/java/README @@ -0,0 +1,20 @@ +Wynn Wilkes- November 14, 2000 +I've just completed a large update that fixes a large number of bugs. The +update also adds applet security. The security update requires a Java 2 +jvm. + +This is libkdejava, the KDE Java support library. + +Directory map: + +$CWD CPP sources for KDE binding to KJAS and some + additional utility classes. +kjava-classes.zip An *uncompressed* ZIP file containing the .class files + for the KJAS server. The files must be uncompressed to + support some crappy JVMs. +org/kde/kjas/server Java sources for KJAS server process + +You can find more information at http://developer.kde.org/language-bindings/java/ + +Richard Moore. +rich@kde.org diff --git a/tdehtml/java/TODO b/tdehtml/java/TODO new file mode 100644 index 000000000..3d707c898 --- /dev/null +++ b/tdehtml/java/TODO @@ -0,0 +1,22 @@ +Wynn Wilkes (November 14, 2000) +As of now, KJAS requires a Java 2 platform for classloading +and the default security manager. If anyone wants to implement +a Java 1.1 security manager, please feel free and we can integrate +both versions. + +- Get the keyboard focus issues fixed +- Fix tdehtml_part to have one applet context per Document +- add a context cache someplace so we can reload contexts- + this will keep us from having to restart the jvm over + and over- this is the biggest performance problem I think +- fix tdehtml_part so it will start and stop applets?? +- Implement class loading via html proxies if one is set + + +- Use of QGuardedPointer +- LiveScript support +- Custom applet types +- Better support for Java 2 + - Use a factory to create the classloader and security managers + - Use URLClassLoader- this is done +- Support for KIO URLs diff --git a/tdehtml/java/build.properties b/tdehtml/java/build.properties new file mode 100644 index 000000000..c2c0016bc --- /dev/null +++ b/tdehtml/java/build.properties @@ -0,0 +1,9 @@ +dest=. +jar=kjava +build=classes +src=. +includes=netscape/**,org/** +excludes=* +images=images +debug=true +debuglevel=lines,vars,source diff --git a/tdehtml/java/build.xml b/tdehtml/java/build.xml new file mode 100644 index 000000000..16b523588 --- /dev/null +++ b/tdehtml/java/build.xml @@ -0,0 +1,49 @@ +<?xml version="1.0"?> + +<project name="KJAS" basedir="." default="all"> + + <property file="build.properties"/> + + <target name="init"> + <mkdir dir="${build}" /> + </target> + + <target name="compile" depends="init"> + <javac srcdir="${src}" destdir="${build}" includes="${includes}" excludes="${excludes}" deprecation="true" debug="${debug}" debuglevel="${debuglevel}" source="1.3" target="1.2"/> + </target> + + <target name="images" depends="init"> + <mkdir dir="${build}/images"/> + <copy todir="${build}/images"> + <fileset dir="${images}"> + <include name="*gif"/> + </fileset> + </copy> + </target> + + <target name="jar" depends="init,images,compile"> + <jar jarfile="${jar}.jar" compress="false" basedir="${build}" /> + </target> + + <target name="all" depends="jar" description="Build everything."> + <echo message="Application built." /> + </target> + + <target name="clean" depends="init" description="Clean all build products."> + <delete file="${jar}.jar" /> + <delete dir="${build}" /> + </target> + + <target name="test-init" depends=""> + <mkdir dir="tests/classes" /> + </target> + + <target name="test" depends="test-init" description="Build the test applets"> + <javac srcdir="tests" destdir="tests/classes" debug="true" deprecation="true" source="1.3" target="1.2"/> + </target> + + <target name="test-clean" depends=""> + <delete dir="tests/classes" /> + </target> + +</project> diff --git a/tdehtml/java/configure.in.in b/tdehtml/java/configure.in.in new file mode 100644 index 000000000..2ed75f6fe --- /dev/null +++ b/tdehtml/java/configure.in.in @@ -0,0 +1,5 @@ +dnl don't remove +dnl AC_OUTPUT(tdehtml/java/kjava.policy) +KJAVA_POLICYPATH=${kde_datadir}/kjava/- +KDE_EXPAND_MAKEVAR(KJAVA_POLICYPATH, KJAVA_POLICYPATH) +AC_SUBST(KJAVA_POLICYPATH) diff --git a/tdehtml/java/cr16-action-java.png b/tdehtml/java/cr16-action-java.png new file mode 100644 index 000000000..dca85a129 Binary files /dev/null and b/tdehtml/java/cr16-action-java.png differ diff --git a/tdehtml/java/dummy/CMakeLists.txt b/tdehtml/java/dummy/CMakeLists.txt new file mode 100644 index 000000000..5828f4b83 --- /dev/null +++ b/tdehtml/java/dummy/CMakeLists.txt @@ -0,0 +1,30 @@ +################################################# +# +# (C) 2010 Serghei Amelian +# serghei (DOT) amelian (AT) gmail.com +# +# Improvements and feedback are welcome +# +# This file is released under GPL >= 2 +# +################################################# + +include_directories( + ${TQT_INCLUDE_DIRS} +) + +link_directories( + ${TQT_LIBRARY_DIRS} +) + + +##### kjava ##################################### + +configure_file( ${CMAKE_SOURCE_DIR}/cmake/modules/template_dummy_cpp.cmake dummy.cpp COPYONLY ) + +tde_add_library( kjava SHARED + SOURCES dummy.cpp + LINK ${TQT_LIBRARIES} + VERSION 1.0.0 + DESTINATION ${LIB_INSTALL_DIR} +) diff --git a/tdehtml/java/dummy/Makefile.am b/tdehtml/java/dummy/Makefile.am new file mode 100644 index 000000000..5438da6ad --- /dev/null +++ b/tdehtml/java/dummy/Makefile.am @@ -0,0 +1,13 @@ + +lib_LTLIBRARIES = libkjava.la +libkjava_la_SOURCES = dummy.cpp + +dummy.cpp: + echo "#ifdef _AIX" > $@ + echo "namespace {" >> $@ + echo "void *not_empty_file;" >> $@ + echo "}" >> $@ + echo "#endif" >> $@ + +libkjava_la_LDFLAGS = -version-info 1:0 + diff --git a/tdehtml/java/images/animbean.gif b/tdehtml/java/images/animbean.gif new file mode 100644 index 000000000..a842be25d Binary files /dev/null and b/tdehtml/java/images/animbean.gif differ diff --git a/tdehtml/java/images/beanicon.png b/tdehtml/java/images/beanicon.png new file mode 100644 index 000000000..d1632c16e Binary files /dev/null and b/tdehtml/java/images/beanicon.png differ diff --git a/tdehtml/java/images/brokenbean.gif b/tdehtml/java/images/brokenbean.gif new file mode 100644 index 000000000..9f46dc355 Binary files /dev/null and b/tdehtml/java/images/brokenbean.gif differ diff --git a/tdehtml/java/kjava.jar b/tdehtml/java/kjava.jar new file mode 100644 index 000000000..afab6884b Binary files /dev/null and b/tdehtml/java/kjava.jar differ diff --git a/tdehtml/java/kjava.policy.in b/tdehtml/java/kjava.policy.in new file mode 100644 index 000000000..72197bb2e --- /dev/null +++ b/tdehtml/java/kjava.policy.in @@ -0,0 +1,8 @@ +grant codeBase "file:@KJAVA_POLICYPATH@" +{ + permission java.security.AllPermission; +}; +grant { + permission java.AudioPermission "play"; + permission java.lang.RuntimePermission "accessClassInPackage.sun.audio"; +}; diff --git a/tdehtml/java/kjavaapplet.cpp b/tdehtml/java/kjavaapplet.cpp new file mode 100644 index 000000000..70a39afbc --- /dev/null +++ b/tdehtml/java/kjavaapplet.cpp @@ -0,0 +1,288 @@ +/* This file is part of the KDE project + * + * Copyright (C) 2000 Richard Moore <rich@kde.org> + * 2000 Wynn Wilkes <wynnw@caldera.com> + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public License + * along with this library; see the file COPYING.LIB. If not, write to + * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. + */ + +#include "kjavaappletwidget.h" +#include "kjavaappletcontext.h" + +#include <klocale.h> +#include <kdebug.h> +#include <tdeparts/browserextension.h> + + + +class KJavaAppletPrivate +{ +public: + bool reallyExists; + TQString className; + TQString appName; + TQString baseURL; + TQString codeBase; + TQString archives; + TQSize size; + TQString windowName; + KJavaApplet::AppletState state; + bool failed; + + KJavaAppletWidget* UIwidget; +}; + + +KJavaApplet::KJavaApplet( KJavaAppletWidget* _parent, + KJavaAppletContext* _context ) + : params() +{ + d = new KJavaAppletPrivate; + + d->UIwidget = _parent; + d->state = UNKNOWN; + d->failed = false; + + if( _context ) + setAppletContext( _context ); + + d->reallyExists = false; +} + +KJavaApplet::~KJavaApplet() +{ + if ( d->reallyExists ) + context->destroy( this ); + + delete d; +} + +bool KJavaApplet::isCreated() +{ + return d->reallyExists; +} + +void KJavaApplet::setAppletContext( KJavaAppletContext* _context ) +{ + context = _context; + context->registerApplet( this ); +} + +void KJavaApplet::setAppletClass( const TQString& _className ) +{ + d->className = _className; +} + +TQString& KJavaApplet::appletClass() +{ + return d->className; +} + +TQString& KJavaApplet::parameter( const TQString& name ) +{ + return params[ name ]; +} + +void KJavaApplet::setParameter( const TQString& name, const TQString& value ) +{ + params.insert( name, value ); +} + +TQMap<TQString,TQString>& KJavaApplet::getParams() +{ + return params; +} + +void KJavaApplet::setBaseURL( const TQString& baseURL ) +{ + d->baseURL = baseURL; +} + +TQString& KJavaApplet::baseURL() +{ + return d->baseURL; +} + +void KJavaApplet::setCodeBase( const TQString& codeBase ) +{ + d->codeBase = codeBase; +} + +TQString& KJavaApplet::codeBase() +{ + return d->codeBase; +} + +void KJavaApplet::setSize( TQSize size ) +{ + d->size = size; +} + +TQSize KJavaApplet::size() +{ + return d->size; +} + +void KJavaApplet::setArchives( const TQString& _archives ) +{ + d->archives = _archives; +} + +TQString& KJavaApplet::archives() +{ + return d->archives; +} + +void KJavaApplet::resizeAppletWidget( int width, int height ) +{ + kdDebug(6100) << "KJavaApplet, id = " << id << ", ::resizeAppletWidget to " << width << ", " << height << endl; + + TQStringList sl; + sl.push_back( TQString::number( 0 ) ); // applet itself has id 0 + sl.push_back( TQString( "eval" ) ); // evaluate next script + sl.push_back( TQString::number( KParts::LiveConnectExtension::TypeString ) ); + sl.push_back( TQString( "this.setAttribute('WIDTH',%1);this.setAttribute('HEIGHT',%2)" ).arg( width ).arg( height ) ); + jsData( sl ); +} + +void KJavaApplet::setAppletName( const TQString& name ) +{ + d->appName = name; +} + +void KJavaApplet::setWindowName( const TQString& title ) +{ + d->windowName = title; +} + +TQString& KJavaApplet::getWindowName() +{ + return d->windowName; +} + +TQString& KJavaApplet::appletName() +{ + return d->appName; +} + +void KJavaApplet::create( ) +{ + if ( !context->create( this ) ) + setFailed(); + d->reallyExists = true; +} + +void KJavaApplet::init() +{ + context->init( this ); +} + +void KJavaApplet::start() +{ + context->start( this ); +} + +void KJavaApplet::stop() +{ + context->stop( this ); +} + +int KJavaApplet::appletId() +{ + return id; +} + +void KJavaApplet::setAppletId( int _id ) +{ + id = _id; +} + +void KJavaApplet::stateChange( const int newStateInt ) { + AppletState newState = (AppletState)newStateInt; + bool ok = false; + if (d->failed) { + return; + } + switch ( newState ) { + case CLASS_LOADED: + ok = (d->state == UNKNOWN); + break; + case INSTANCIATED: + if (ok) { + showStatus(i18n("Initializing Applet \"%1\"...").arg(appletName())); + } + ok = (d->state == CLASS_LOADED); + break; + case INITIALIZED: + ok = (d->state == INSTANCIATED); + if (ok) { + showStatus(i18n("Starting Applet \"%1\"...").arg(appletName())); + start(); + } + break; + case STARTED: + ok = (d->state == INITIALIZED || d->state == STOPPED); + if (ok) { + showStatus(i18n("Applet \"%1\" started").arg(appletName())); + } + break; + case STOPPED: + ok = (d->state == INITIALIZED || d->state == STARTED); + if (ok) { + showStatus(i18n("Applet \"%1\" stopped").arg(appletName())); + } + break; + case DESTROYED: + ok = true; + break; + default: + break; + } + if (ok) { + d->state = newState; + } else { + kdError(6100) << "KJavaApplet::stateChange : don't want to switch from state " + << d->state << " to " << newState << endl; + } +} + +void KJavaApplet::showStatus(const TQString &msg) { + TQStringList args; + args << msg; + context->processCmd("showstatus", args); +} + +void KJavaApplet::setFailed() { + d->failed = true; +} + +bool KJavaApplet::isAlive() const { + return ( + !d->failed + && d->state >= INSTANCIATED + && d->state < STOPPED + ); +} + +KJavaApplet::AppletState KJavaApplet::state() const { + return d->state; +} + +bool KJavaApplet::failed() const { + return d->failed; +} + +#include "kjavaapplet.moc" diff --git a/tdehtml/java/kjavaapplet.h b/tdehtml/java/kjavaapplet.h new file mode 100644 index 000000000..8e02c5ba4 --- /dev/null +++ b/tdehtml/java/kjavaapplet.h @@ -0,0 +1,251 @@ +// -*- c++ -*- +/* This file is part of the KDE project + * + * Copyright (C) 2000 Richard Moore <rich@kde.org> + * 2000 Wynn Wilkes <wynnw@caldera.com> + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public License + * along with this library; see the file COPYING.LIB. If not, write to + * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. + */ + + +#ifndef KJAVAAPPLET_H +#define KJAVAAPPLET_H + +#include <kurl.h> + +#include <tqobject.h> +#include <tqstringlist.h> +#include <tqmap.h> + +/** + * @short A Java applet + * + * This class encapsulates the data the Applet Server needs to load + * the Applet class files, and set the proper size of the Applet. It also + * has an interface for applets to resize themselves. + * + * @author Richard J. Moore, rich@kde.org + * @author Wynn Wilkes, wynnw@kde.org + */ + +class KJavaApplet; +class KJavaAppletWidget; +class KJavaAppletContext; +class KJavaAppletPrivate; + + +class KJavaApplet : public TQObject +{ +Q_OBJECT + +public: + // states describing the life cycle of an applet. + // keep in sync with applet state in KJASAppletStub.java ! + typedef enum { + UNKNOWN = 0, + CLASS_LOADED = 1, + INSTANCIATED = 2, + INITIALIZED = 3, + STARTED = 4, + STOPPED = 5, + DESTROYED = 6 + } AppletState; + KJavaApplet( KJavaAppletWidget* _parent, KJavaAppletContext* _context = 0 ); + ~KJavaApplet(); + + /** + * Set the applet context'. + */ + void setAppletContext( KJavaAppletContext* _context ); + + /** + * Specify the name of the class file to run. For example 'Lake.class'. + */ + void setAppletClass( const TQString& clazzName ); + + /** + * Get the name of the Class file the applet should run + */ + TQString& appletClass(); + + /** + * Set the URL of the document embedding the applet. + */ + void setBaseURL( const TQString& base ); + + /** + * get the Base URL of the document embedding the applet + */ + TQString& baseURL(); + + /** + * Set the codebase of the applet classes. + */ + void setCodeBase( const TQString& codeBase ); + + /** + * Get the codebase of the applet classes + */ + TQString& codeBase(); + + /** + * Set the list of archives at the Applet's codebase to search in for + * class files and other resources + */ + void setArchives( const TQString& _archives ); + + /** + * Get the list of Archives that should be searched for class files + * and other resources + */ + TQString& archives(); + + /** + * Set the name the applet should be called in its context + */ + void setAppletName( const TQString& name ); + + /** + * Get the name the applet should be called in its context + */ + TQString& appletName(); + + /** + * Set the size of the applet + */ + void setSize( TQSize size ); + + /** + * Get the size of the applet + */ + TQSize size(); + + /** + * Specify a parameter to be passed to the applet. + */ + void setParameter( const TQString& name, const TQString& value ); + + /** + * Look up the parameter value for the given Parameter. Returns + * TQString::null if the name has not been set. + */ + TQString& parameter( const TQString& name ); + + /** + * Get a reference to the Paramaters and their values + */ + TQMap<TQString,TQString>& getParams(); + + /** + * Set the window title for swallowing + */ + void setWindowName( const TQString& title ); + + /** + * Get the window title this applet should use + */ + TQString& getWindowName(); + + /** + * Interface for applets to resize themselves + */ + void resizeAppletWidget( int width, int height ); + + /** + * Send message to AppletServer to create this applet's + * frame to be swallowed and download the applet classes + */ + void create(); + + /** + * Send message to AppletServer to Initialize and show + * this applet + */ + void init(); + + /** + * Returns status of applet- whether it's been created or not + */ + bool isCreated(); + + /** + * Run the applet. + */ + void start(); + + /** + * Pause the applet. + */ + void stop(); + + /** + * Returns the unique ID this applet is given + */ + int appletId(); + + /** + * Set the applet ID. + */ + void setAppletId( int id ); + + KJavaAppletContext* getContext() const { return context; } + + /** + * Get/Set the user name + */ + void setUser(const TQString & _user) { username = _user; } + const TQString & user () const { return username; } + + /** + * Get/Set the user password + */ + void setPassword(const TQString & _password) { userpassword = _password; } + const TQString & password () const { return userpassword; } + + /** + * Get/Set the auth name + */ + void setAuthName(const TQString & _auth) { authname = _auth; } + const TQString & authName () const { return authname; } + + /** + * called from the protocol engine + * changes the status according to the one on the java side. + * Do not call this yourself! + */ + void stateChange ( const int newState ); + void setFailed (); + AppletState state() const; + bool failed() const; + bool isAlive() const; + /** + * JavaScript coming from Java + **/ + void jsData (const TQStringList & args) { emit jsEvent (args); } +signals: + void jsEvent (const TQStringList & args); +private: + void showStatus( const TQString &msg); + KJavaAppletPrivate* d; + TQMap<TQString, TQString> params; + KJavaAppletContext* context; + int id; + TQString username; + TQString userpassword; + TQString authname; +}; + +#endif // KJAVAAPPLET_H diff --git a/tdehtml/java/kjavaappletcontext.cpp b/tdehtml/java/kjavaappletcontext.cpp new file mode 100644 index 000000000..76914a5dc --- /dev/null +++ b/tdehtml/java/kjavaappletcontext.cpp @@ -0,0 +1,274 @@ +/* This file is part of the KDE project + * + * Copyright (C) 2000 Richard Moore <rich@kde.org> + * 2000 Wynn Wilkes <wynnw@caldera.com> + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public License + * along with this library; see the file COPYING.LIB. If not, write to + * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. + */ + +#include "kjavaappletcontext.h" +#include "kjavaappletserver.h" +#include "kjavaprocess.h" +#include "kjavaapplet.h" +#include <klocale.h> +#include <kmessagebox.h> +#include <kdebug.h> +#include <tqmap.h> +#include <tqguardedptr.h> +#include <tqstringlist.h> +#include <tqregexp.h> + +// This file was using 6002, but kdebug.areas didn't know about that number +#define DEBUGAREA 6100 + +typedef TQMap< int, TQGuardedPtr<KJavaApplet> > AppletMap; + +// For future expansion +class KJavaAppletContextPrivate +{ +friend class KJavaAppletContext; +private: + AppletMap applets; +}; + +// Static Factory Functions +int KJavaAppletContext::contextCount = 0; + +/* Class Implementation + */ +KJavaAppletContext::KJavaAppletContext() + : TQObject() +{ + d = new KJavaAppletContextPrivate; + server = KJavaAppletServer::allocateJavaServer(); + connect(server->javaProcess(), TQT_SIGNAL(exited(int)), this, TQT_SLOT(javaProcessExited(int))); + + id = contextCount; + server->createContext( id, this ); + + ++contextCount; +} + +KJavaAppletContext::~KJavaAppletContext() +{ + server->destroyContext( id ); + KJavaAppletServer::freeJavaServer(); + delete d; +} + +int KJavaAppletContext::contextId() +{ + return id; +} + +void KJavaAppletContext::setContextId( int _id ) +{ + id = _id; +} + +void KJavaAppletContext::registerApplet( KJavaApplet* applet ) +{ + static int appletId = 0; + + applet->setAppletId( ++appletId ); + d->applets.insert( appletId, applet ); +} + +bool KJavaAppletContext::create( KJavaApplet* applet ) +{ + return server->createApplet( id, applet->appletId(), + applet->appletName(), + applet->appletClass(), + applet->baseURL(), + applet->user(), + applet->password(), + applet->authName(), + applet->codeBase(), + applet->archives(), + applet->size(), + applet->getParams(), + applet->getWindowName() ); + + +} + +void KJavaAppletContext::destroy( KJavaApplet* applet ) +{ + const int appletId = applet->appletId(); + d->applets.remove( appletId ); + + server->destroyApplet( id, appletId ); +} + +void KJavaAppletContext::init( KJavaApplet* applet ) +{ + server->initApplet( id, applet->appletId() ); +} + +void KJavaAppletContext::start( KJavaApplet* applet ) +{ + server->startApplet( id, applet->appletId() ); +} + +void KJavaAppletContext::stop( KJavaApplet* applet ) +{ + server->stopApplet( id, applet->appletId() ); +} + +void KJavaAppletContext::processCmd( TQString cmd, TQStringList args ) +{ + received( cmd, args ); +} + +void KJavaAppletContext::received( const TQString& cmd, const TQStringList& arg ) +{ + kdDebug(6100) << "KJavaAppletContext::received, cmd = >>" << cmd << "<<" << endl; + kdDebug(6100) << "arg count = " << arg.count() << endl; + + if ( cmd == TQString::fromLatin1("showstatus") + && !arg.empty() ) + { + TQString tmp = arg.first(); + tmp.replace(TQRegExp("[\n\r]"), ""); + kdDebug(6100) << "status message = " << tmp << endl; + emit showStatus( tmp ); + } + else if ( cmd == TQString::fromLatin1( "showurlinframe" ) + && arg.count() > 1 ) + { + kdDebug(6100) << "url = " << arg[0] << ", frame = " << arg[1] << endl; + emit showDocument( arg[0], arg[1] ); + } + else if ( cmd == TQString::fromLatin1( "showdocument" ) + && !arg.empty() ) + { + kdDebug(6100) << "url = " << arg.first() << endl; + emit showDocument( arg.first(), "_top" ); + } + else if ( cmd == TQString::fromLatin1( "resizeapplet" ) + && arg.count() > 2 ) + { + //arg[1] should be appletID + //arg[2] should be new width + //arg[3] should be new height + bool ok; + const int appletID = arg[0].toInt( &ok ); + const int width = arg[1].toInt( &ok ); + const int height = arg[2].toInt( &ok ); + + if( !ok ) + { + kdError(DEBUGAREA) << "could not parse out parameters for resize" << endl; + } + else + { + KJavaApplet* const tmp = d->applets[appletID]; + if (tmp) + tmp->resizeAppletWidget( width, height ); + } + } + else if (cmd.startsWith(TQString::fromLatin1("audioclip_"))) { + kdDebug(DEBUGAREA) << "process Audio command (not yet implemented): " << cmd << " " << arg[0] << endl; + } + else if ( cmd == TQString::fromLatin1( "JS_Event" ) + && arg.count() > 2 ) + { + bool ok; + const int appletID = arg.first().toInt(&ok); + KJavaApplet * applet; + if (ok && (applet = d->applets[appletID])) + { + TQStringList js_args(arg); + js_args.pop_front(); + applet->jsData(js_args); + } + else + kdError(DEBUGAREA) << "parse JS event " << arg[0] << " " << arg[1] << endl; + } + else if ( cmd == TQString::fromLatin1( "AppletStateNotification" ) ) + { + bool ok; + const int appletID = arg.first().toInt(&ok); + if (ok) + { + KJavaApplet* const applet = d->applets[appletID]; + if ( applet ) + { + const int newState = arg[1].toInt(&ok); + if (ok) + { + applet->stateChange(newState); + if (newState == KJavaApplet::INITIALIZED) { + kdDebug(DEBUGAREA) << "emit appletLoaded" << endl; + emit appletLoaded(); + } + } else + kdError(DEBUGAREA) << "AppletStateNotification: status is not numerical" << endl; + } else + kdWarning(DEBUGAREA) << "AppletStateNotification: No such Applet with ID=" << arg[0] << endl; + } else + kdError(DEBUGAREA) << "AppletStateNotification: Applet ID is not numerical" << endl; + } + else if ( cmd == TQString::fromLatin1( "AppletFailed" ) ) { + bool ok; + const int appletID = arg.first().toInt(&ok); + if (ok) + { + KJavaApplet* const applet = d->applets[appletID]; + /* + TQString errorDetail(arg[1]); + errorDetail.replace(TQRegExp(":\\s*"), ":\n"); + KMessageBox::detailedError(0L, i18n("Java error while loading applet."), errorDetail); + */ + if (applet) + applet->setFailed(); + emit appletLoaded(); + } + } +} + +void KJavaAppletContext::javaProcessExited(int) { + AppletMap::iterator it = d->applets.begin(); + const AppletMap::iterator itEnd = d->applets.end(); + for (; it != itEnd; ++it) + if (!(*it).isNull() && (*it)->isCreated() && !(*it)->failed()) { + (*it)->setFailed(); + if ((*it)->state() < KJavaApplet::INITIALIZED) + emit appletLoaded(); + } +} + +bool KJavaAppletContext::getMember(TQStringList & args, TQStringList & ret_args) { + args.push_front( TQString::number(id) ); + return server->getMember( args, ret_args ); +} + +bool KJavaAppletContext::putMember( TQStringList & args ) { + args.push_front( TQString::number(id) ); + return server->putMember( args ); +} + +bool KJavaAppletContext::callMember(TQStringList & args, TQStringList &ret_args) { + args.push_front( TQString::number(id) ); + return server->callMember( args, ret_args ); +} + +void KJavaAppletContext::derefObject( TQStringList & args ) { + args.push_front( TQString::number(id) ); + server->derefObject( args ); +} + +#include <kjavaappletcontext.moc> diff --git a/tdehtml/java/kjavaappletcontext.h b/tdehtml/java/kjavaappletcontext.h new file mode 100644 index 000000000..119699f23 --- /dev/null +++ b/tdehtml/java/kjavaappletcontext.h @@ -0,0 +1,141 @@ +// -*- c++ -*- + +/* This file is part of the KDE project + * + * Copyright (C) 2000 Richard Moore <rich@kde.org> + * 2000 Wynn Wilkes <wynnw@caldera.com> + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public License + * along with this library; see the file COPYING.LIB. If not, write to + * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. + */ + +#ifndef KJAVAAPPLETCONTEXT_H +#define KJAVAAPPLETCONTEXT_H + +#include <tqobject.h> + +/** + * @short Provides a context for KJavaAppletWidgets + * + * Applets run in a context- (see the Java documentation for more information + * on contexts). Currently, each document in KHTML creates one context, in + * which multiple applets can run. + * + * @author Richard J. Moore, rich@kde.org + * @author Wynn Wilkes, wynnw@caldera.com + */ + + +class KJavaAppletServer; +class KJavaApplet; +class KJavaAppletContextPrivate; + +class KJavaAppletContext : public TQObject +{ +Q_OBJECT + +public: + KJavaAppletContext(); + ~KJavaAppletContext(); + + /** + * Returns the ID of this context. + */ + int contextId(); + + /** + * Sets the ID of this context. + */ + void setContextId( int id ); + + /** + * registers applet + **/ + void registerApplet( KJavaApplet* ); + + /** + * Sends a message to create the applet. + */ + bool create( KJavaApplet* ); + + /** + * Sends a message to destroy the applet. + */ + void destroy( KJavaApplet* ); + + /** + * Sends a message to initialize the applet. + */ + void init( KJavaApplet* ); + + /** + * Sends a message to start the applet. + */ + void start( KJavaApplet* ); + + /** + * Sends a message to stop the applet. + */ + void stop( KJavaApplet* ); + + /** + * use this for applet call backs, the AppletServer + * calls this directly. + */ + void processCmd( TQString cmd, TQStringList args ); + + /** + * LiveConnect functions + */ + bool getMember(TQStringList & args, TQStringList & ret_args); + bool putMember(TQStringList & args); + bool callMember(TQStringList & args, TQStringList & ret_args); + void derefObject(TQStringList & args); + + KJavaAppletServer* getServer() const { return server; } +signals: + /** + * Signals the KHMTL Part to show this as the status message. + */ + void showStatus ( const TQString& txt ); + + /** + * Signals the KHTML Part to show a url in a given target + */ + void showDocument( const TQString& url, const TQString& target ); + + /** + * Signals the KHTML Part an applet is loaded + **/ + void appletLoaded(); + +protected: + //The counter to generate ID's for the contexts + static int contextCount; + + // The applet server this context is attached to. + KJavaAppletServer* server; + +protected slots: + void received( const TQString& cmd, const TQStringList& arg ); + void javaProcessExited(int); + +private: + int id; + KJavaAppletContextPrivate* d; + +}; + +#endif // KJAVAAPPLETCONTEXT_H diff --git a/tdehtml/java/kjavaappletserver.cpp b/tdehtml/java/kjavaappletserver.cpp new file mode 100644 index 000000000..b125bcc1a --- /dev/null +++ b/tdehtml/java/kjavaappletserver.cpp @@ -0,0 +1,833 @@ +/* This file is part of the KDE project + * + * Copyright (C) 2000 Richard Moore <rich@kde.org> + * 2000 Wynn Wilkes <wynnw@caldera.com> + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public License + * along with this library; see the file COPYING.LIB. If not, write to + * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. + */ + +#include <config.h> +#include "kjavaappletserver.h" +#include "kjavaappletcontext.h" +#include "kjavaprocess.h" +#include "kjavadownloader.h" + +#include <kdebug.h> +#include <kconfig.h> +#include <klocale.h> +#include <tdeparts/browserextension.h> +#include <kapplication.h> +#include <kstandarddirs.h> + +#include <kio/job.h> +#include <kio/kprotocolmanager.h> +#include <ksslcertificate.h> +#include <ksslcertchain.h> +#include <kssl.h> + +#include <tqtimer.h> +#include <tqguardedptr.h> +#include <tqvaluelist.h> +#include <tqptrlist.h> +#include <tqdir.h> +#include <tqeventloop.h> +#include <tqapplication.h> +#include <tqlabel.h> +#include <tqdialog.h> +#include <tqpushbutton.h> +#include <tqlayout.h> +#include <tqregexp.h> + +#include <stdlib.h> +#include <assert.h> + +#define KJAS_CREATE_CONTEXT (char)1 +#define KJAS_DESTROY_CONTEXT (char)2 +#define KJAS_CREATE_APPLET (char)3 +#define KJAS_DESTROY_APPLET (char)4 +#define KJAS_START_APPLET (char)5 +#define KJAS_STOP_APPLET (char)6 +#define KJAS_INIT_APPLET (char)7 +#define KJAS_SHOW_DOCUMENT (char)8 +#define KJAS_SHOW_URLINFRAME (char)9 +#define KJAS_SHOW_STATUS (char)10 +#define KJAS_RESIZE_APPLET (char)11 +#define KJAS_GET_URLDATA (char)12 +#define KJAS_URLDATA (char)13 +#define KJAS_SHUTDOWN_SERVER (char)14 +#define KJAS_JAVASCRIPT_EVENT (char)15 +#define KJAS_GET_MEMBER (char)16 +#define KJAS_CALL_MEMBER (char)17 +#define KJAS_PUT_MEMBER (char)18 +#define KJAS_DEREF_OBJECT (char)19 +#define KJAS_AUDIOCLIP_PLAY (char)20 +#define KJAS_AUDIOCLIP_LOOP (char)21 +#define KJAS_AUDIOCLIP_STOP (char)22 +#define KJAS_APPLET_STATE (char)23 +#define KJAS_APPLET_FAILED (char)24 +#define KJAS_DATA_COMMAND (char)25 +#define KJAS_PUT_URLDATA (char)26 +#define KJAS_PUT_DATA (char)27 +#define KJAS_SECURITY_CONFIRM (char)28 +#define KJAS_SHOW_CONSOLE (char)29 + + +class JSStackFrame; + +typedef TQMap< int, KJavaTDEIOJob* > TDEIOJobMap; +typedef TQMap< int, JSStackFrame* > JSStack; + +class JSStackFrame { +public: + JSStackFrame(JSStack & stack, TQStringList & a) + : jsstack(stack), args(a), ticket(counter++), ready(false), exit (false) { + jsstack.insert( ticket, this ); + } + ~JSStackFrame() { + jsstack.erase( ticket ); + } + JSStack & jsstack; + TQStringList & args; + int ticket; + bool ready : 1; + bool exit : 1; + static int counter; +}; + +int JSStackFrame::counter = 0; + +class KJavaAppletServerPrivate +{ +friend class KJavaAppletServer; +private: + KJavaAppletServerPrivate() : kssl( 0L ) {} + ~KJavaAppletServerPrivate() { + delete kssl; + } + int counter; + TQMap< int, TQGuardedPtr<KJavaAppletContext> > contexts; + TQString appletLabel; + JSStack jsstack; + TDEIOJobMap kiojobs; + bool javaProcessFailed; + bool useKIO; + KSSL * kssl; + //int locked_context; + //TQValueList<TQByteArray> java_requests; +}; + +static KJavaAppletServer* self = 0; + +KJavaAppletServer::KJavaAppletServer() +{ + d = new KJavaAppletServerPrivate; + process = new KJavaProcess(); + + connect( process, TQT_SIGNAL(received(const TQByteArray&)), + this, TQT_SLOT(slotJavaRequest(const TQByteArray&)) ); + + setupJava( process ); + + if( process->startJava() ) { + d->appletLabel = i18n( "Loading Applet" ); + d->javaProcessFailed = false; + } + else { + d->appletLabel = i18n( "Error: java executable not found" ); + d->javaProcessFailed = true; + } +} + +KJavaAppletServer::~KJavaAppletServer() +{ + quit(); + + delete process; + delete d; +} + +TQString KJavaAppletServer::getAppletLabel() +{ + if( self ) + return self->appletLabel(); + else + return TQString::null; +} + +TQString KJavaAppletServer::appletLabel() +{ + return d->appletLabel; +} + +KJavaAppletServer* KJavaAppletServer::allocateJavaServer() +{ + if( self == 0 ) + { + self = new KJavaAppletServer(); + self->d->counter = 0; + } + + ++(self->d->counter); + return self; +} + +void KJavaAppletServer::freeJavaServer() +{ + --(self->d->counter); + + if( self->d->counter == 0 ) + { + //instead of immediately quitting here, set a timer to kill us + //if there are still no servers- give us one minute + //this is to prevent repeated loading and unloading of the jvm + TDEConfig config( "konquerorrc", true ); + config.setGroup( "Java/JavaScript Settings" ); + if( config.readBoolEntry( "ShutdownAppletServer", true ) ) + { + const int value = config.readNumEntry( "AppletServerTimeout", 60 ); + TQTimer::singleShot( value*1000, self, TQT_SLOT( checkShutdown() ) ); + } + } +} + +void KJavaAppletServer::checkShutdown() +{ + if( self->d->counter == 0 ) + { + delete self; + self = 0; + } +} + +void KJavaAppletServer::setupJava( KJavaProcess *p ) +{ + TDEConfig config ( "konquerorrc", true ); + config.setGroup( "Java/JavaScript Settings" ); + + TQString jvm_path = "java"; + + TQString jPath = config.readPathEntry( "JavaPath" ); + if ( !jPath.isEmpty() && jPath != "java" ) + { + // Cut off trailing slash if any + if( jPath[jPath.length()-1] == '/' ) + jPath.remove(jPath.length()-1, 1); + + TQDir dir( jPath ); + if( dir.exists( "bin/java" ) ) + { + jvm_path = jPath + "/bin/java"; + } + else if (dir.exists( "/jre/bin/java" ) ) + { + jvm_path = jPath + "/jre/bin/java"; + } + else if( TQFile::exists(jPath) ) + { + //check here to see if they entered the whole path the java exe + jvm_path = jPath; + } + } + + //check to see if jvm_path is valid and set d->appletLabel accordingly + p->setJVMPath( jvm_path ); + + // Prepare classpath variable + TQString kjava_class = locate("data", "kjava/kjava.jar"); + kdDebug(6100) << "kjava_class = " << kjava_class << endl; + if( kjava_class.isNull() ) // Should not happen + return; + + TQDir dir( kjava_class ); + dir.cdUp(); + kdDebug(6100) << "dir = " << dir.absPath() << endl; + + const TQStringList entries = dir.entryList( "*.jar" ); + kdDebug(6100) << "entries = " << entries.join( ":" ) << endl; + + TQString classes; + { + TQStringList::ConstIterator it = entries.begin(); + const TQStringList::ConstIterator itEnd = entries.end(); + for( ; it != itEnd; ++it ) + { + if( !classes.isEmpty() ) + classes += ":"; + classes += dir.absFilePath( *it ); + } + } + p->setClasspath( classes ); + + // Fix all the extra arguments + const TQString extraArgs = config.readEntry( "JavaArgs" ); + p->setExtraArgs( extraArgs ); + + if( config.readBoolEntry( "UseSecurityManager", true ) ) + { + TQString class_file = locate( "data", "kjava/kjava.policy" ); + p->setSystemProperty( "java.security.policy", class_file ); + + p->setSystemProperty( "java.security.manager", + "org.kde.kjas.server.KJASSecurityManager" ); + } + + d->useKIO = config.readBoolEntry( "UseKio", false); + if( d->useKIO ) + { + p->setSystemProperty( "kjas.useKio", TQString::null ); + } + + //check for http proxies... + if( KProtocolManager::useProxy() ) + { + // only proxyForURL honors automatic proxy scripts + // we do not know the applet url here so we just use a dummy url + // this is a workaround for now + // FIXME + const KURL dummyURL( "http://www.kde.org/" ); + const TQString httpProxy = KProtocolManager::proxyForURL(dummyURL); + kdDebug(6100) << "httpProxy is " << httpProxy << endl; + + const KURL url( httpProxy ); + p->setSystemProperty( "http.proxyHost", url.host() ); + p->setSystemProperty( "http.proxyPort", TQString::number( url.port() ) ); + } + + //set the main class to run + p->setMainClass( "org.kde.kjas.server.Main" ); +} + +void KJavaAppletServer::createContext( int contextId, KJavaAppletContext* context ) +{ +// kdDebug(6100) << "createContext: " << contextId << endl; + if ( d->javaProcessFailed ) return; + + d->contexts.insert( contextId, context ); + + TQStringList args; + args.append( TQString::number( contextId ) ); + process->send( KJAS_CREATE_CONTEXT, args ); +} + +void KJavaAppletServer::destroyContext( int contextId ) +{ +// kdDebug(6100) << "destroyContext: " << contextId << endl; + if ( d->javaProcessFailed ) return; + d->contexts.remove( contextId ); + + TQStringList args; + args.append( TQString::number( contextId ) ); + process->send( KJAS_DESTROY_CONTEXT, args ); +} + +bool KJavaAppletServer::createApplet( int contextId, int appletId, + const TQString & name, const TQString & clazzName, + const TQString & baseURL, const TQString & user, + const TQString & password, const TQString & authname, + const TQString & codeBase, const TQString & jarFile, + TQSize size, const TQMap<TQString,TQString>& params, + const TQString & windowTitle ) +{ +// kdDebug(6100) << "createApplet: contextId = " << contextId << endl +// << " appletId = " << appletId << endl +// << " name = " << name << endl +// << " clazzName = " << clazzName << endl +// << " baseURL = " << baseURL << endl +// << " codeBase = " << codeBase << endl +// << " jarFile = " << jarFile << endl +// << " width = " << size.width() << endl +// << " height = " << size.height() << endl; + + if ( d->javaProcessFailed ) return false; + + TQStringList args; + args.append( TQString::number( contextId ) ); + args.append( TQString::number( appletId ) ); + + //it's ok if these are empty strings, I take care of it later... + args.append( name ); + args.append( clazzName ); + args.append( baseURL ); + args.append( user ); + args.append( password ); + args.append( authname ); + args.append( codeBase ); + args.append( jarFile ); + + args.append( TQString::number( size.width() ) ); + args.append( TQString::number( size.height() ) ); + + args.append( windowTitle ); + + //add on the number of parameter pairs... + const int num = params.count(); + const TQString num_params = TQString("%1").arg( num, 8 ); + args.append( num_params ); + + TQMap< TQString, TQString >::ConstIterator it = params.begin(); + const TQMap< TQString, TQString >::ConstIterator itEnd = params.end(); + + for( ; it != itEnd; ++it ) + { + args.append( it.key() ); + args.append( it.data() ); + } + + process->send( KJAS_CREATE_APPLET, args ); + + return true; +} + +void KJavaAppletServer::initApplet( int contextId, int appletId ) +{ + if ( d->javaProcessFailed ) return; + TQStringList args; + args.append( TQString::number( contextId ) ); + args.append( TQString::number( appletId ) ); + + process->send( KJAS_INIT_APPLET, args ); +} + +void KJavaAppletServer::destroyApplet( int contextId, int appletId ) +{ + if ( d->javaProcessFailed ) return; + TQStringList args; + args.append( TQString::number(contextId) ); + args.append( TQString::number(appletId) ); + + process->send( KJAS_DESTROY_APPLET, args ); +} + +void KJavaAppletServer::startApplet( int contextId, int appletId ) +{ + if ( d->javaProcessFailed ) return; + TQStringList args; + args.append( TQString::number(contextId) ); + args.append( TQString::number(appletId) ); + + process->send( KJAS_START_APPLET, args ); +} + +void KJavaAppletServer::stopApplet( int contextId, int appletId ) +{ + if ( d->javaProcessFailed ) return; + TQStringList args; + args.append( TQString::number(contextId) ); + args.append( TQString::number(appletId) ); + + process->send( KJAS_STOP_APPLET, args ); +} + +void KJavaAppletServer::showConsole() { + if ( d->javaProcessFailed ) return; + TQStringList args; + process->send( KJAS_SHOW_CONSOLE, args ); +} + +void KJavaAppletServer::sendURLData( int loaderID, int code, const TQByteArray& data ) +{ + TQStringList args; + args.append( TQString::number(loaderID) ); + args.append( TQString::number(code) ); + + process->send( KJAS_URLDATA, args, data ); +} + +void KJavaAppletServer::removeDataJob( int loaderID ) +{ + const TDEIOJobMap::iterator it = d->kiojobs.find( loaderID ); + if (it != d->kiojobs.end()) { + it.data()->deleteLater(); + d->kiojobs.erase( it ); + } +} + +void KJavaAppletServer::quit() +{ + const TQStringList args; + + process->send( KJAS_SHUTDOWN_SERVER, args ); + process->flushBuffers(); + process->wait( 10 ); +} + +void KJavaAppletServer::slotJavaRequest( const TQByteArray& qb ) +{ + // qb should be one command only without the length string, + // we parse out the command and it's meaning here... + TQString cmd; + TQStringList args; + int index = 0; + const int qb_size = qb.size(); + + //get the command code + const char cmd_code = qb[ index++ ]; + ++index; //skip the next sep + + //get contextID + TQString contextID; + while( qb[index] != 0 && index < qb_size ) + { + contextID += qb[ index++ ]; + } + bool ok; + const int ID_num = contextID.toInt( &ok ); // context id or kio job id + /*if (d->locked_context > -1 && + ID_num != d->locked_context && + (cmd_code == KJAS_JAVASCRIPT_EVENT || + cmd_code == KJAS_APPLET_STATE || + cmd_code == KJAS_APPLET_FAILED)) + { + / * Don't allow requests from other contexts if we're waiting + * on a return value that can trigger JavaScript events + * / + d->java_requests.push_back(qb); + return; + }*/ + ++index; //skip the sep + + if (cmd_code == KJAS_PUT_DATA) { + // rest of the data is for kio put + if (ok) { + TDEIOJobMap::iterator it = d->kiojobs.find( ID_num ); + if (ok && it != d->kiojobs.end()) { + TQByteArray qba; + qba.setRawData(qb.data() + index, qb.size() - index - 1); + it.data()->data(qba); + qba.resetRawData(qb.data() + index, qb.size() - index - 1); + } + kdDebug(6100) << "PutData(" << ID_num << ") size=" << qb.size() - index << endl; + } else + kdError(6100) << "PutData error " << ok << endl; + return; + } + //now parse out the arguments + while( index < qb_size ) + { + int sep_pos = qb.find( 0, index ); + if (sep_pos < 0) { + kdError(6100) << "Missing separation byte" << endl; + sep_pos = qb_size; + } + //kdDebug(6100) << "KJavaAppletServer::slotJavaRequest: "<< TQString::fromLocal8Bit( qb.data() + index, sep_pos - index ) << endl; + args.append( TQString::fromLocal8Bit( qb.data() + index, sep_pos - index ) ); + index = sep_pos + 1; //skip the sep + } + //here I should find the context and call the method directly + //instead of emitting signals + switch( cmd_code ) + { + case KJAS_SHOW_DOCUMENT: + cmd = TQString::fromLatin1( "showdocument" ); + break; + + case KJAS_SHOW_URLINFRAME: + cmd = TQString::fromLatin1( "showurlinframe" ); + break; + + case KJAS_SHOW_STATUS: + cmd = TQString::fromLatin1( "showstatus" ); + break; + + case KJAS_RESIZE_APPLET: + cmd = TQString::fromLatin1( "resizeapplet" ); + break; + + case KJAS_GET_URLDATA: + if (ok && !args.empty() ) { + d->kiojobs.insert(ID_num, new KJavaDownloader(ID_num, args.first())); + kdDebug(6100) << "GetURLData(" << ID_num << ") url=" << args.first() << endl; + } else + kdError(6100) << "GetURLData error " << ok << " args:" << args.size() << endl; + return; + case KJAS_PUT_URLDATA: + if (ok && !args.empty()) { + KJavaUploader* const job = new KJavaUploader(ID_num, args.first()); + d->kiojobs.insert(ID_num, job); + job->start(); + kdDebug(6100) << "PutURLData(" << ID_num << ") url=" << args.first() << endl; + } else + kdError(6100) << "PutURLData error " << ok << " args:" << args.size() << endl; + return; + case KJAS_DATA_COMMAND: + if (ok && !args.empty()) { + const int cmd = args.first().toInt( &ok ); + TDEIOJobMap::iterator it = d->kiojobs.find( ID_num ); + if (ok && it != d->kiojobs.end()) + it.data()->jobCommand( cmd ); + kdDebug(6100) << "KIO Data command: " << ID_num << " " << args.first() << endl; + } else + kdError(6100) << "KIO Data command error " << ok << " args:" << args.size() << endl; + return; + case KJAS_JAVASCRIPT_EVENT: + cmd = TQString::fromLatin1( "JS_Event" ); + kdDebug(6100) << "Javascript request: "<< contextID + << " code: " << args[0] << endl; + break; + case KJAS_GET_MEMBER: + case KJAS_PUT_MEMBER: + case KJAS_CALL_MEMBER: { + const int ticket = args[0].toInt(); + JSStack::iterator it = d->jsstack.find(ticket); + if (it != d->jsstack.end()) { + kdDebug(6100) << "slotJavaRequest: " << ticket << endl; + args.pop_front(); + it.data()->args.operator=(args); // just in case .. + it.data()->ready = true; + it.data()->exit = true; + } else + kdDebug(6100) << "Error: Missed return member data" << endl; + return; + } + case KJAS_AUDIOCLIP_PLAY: + cmd = TQString::fromLatin1( "audioclip_play" ); + kdDebug(6100) << "Audio Play: url=" << args[0] << endl; + break; + case KJAS_AUDIOCLIP_LOOP: + cmd = TQString::fromLatin1( "audioclip_loop" ); + kdDebug(6100) << "Audio Loop: url=" << args[0] << endl; + break; + case KJAS_AUDIOCLIP_STOP: + cmd = TQString::fromLatin1( "audioclip_stop" ); + kdDebug(6100) << "Audio Stop: url=" << args[0] << endl; + break; + case KJAS_APPLET_STATE: + kdDebug(6100) << "Applet State Notification for Applet " << args[0] << ". New state=" << args[1] << endl; + cmd = TQString::fromLatin1( "AppletStateNotification" ); + break; + case KJAS_APPLET_FAILED: + kdDebug(6100) << "Applet " << args[0] << " Failed: " << args[1] << endl; + cmd = TQString::fromLatin1( "AppletFailed" ); + break; + case KJAS_SECURITY_CONFIRM: { + if (KSSL::doesSSLWork() && !d->kssl) + d->kssl = new KSSL; + TQStringList sl; + TQCString answer( "invalid" ); + + if (!d->kssl) { + answer = "nossl"; + } else if (args.size() > 2) { + const int certsnr = args[1].toInt(); + TQString text; + TQPtrList<KSSLCertificate> certs; + certs.setAutoDelete( true ); + for (int i = certsnr; i >= 0; --i) { + KSSLCertificate * cert = KSSLCertificate::fromString(args[i+2].ascii()); + if (cert) { + certs.prepend(cert); + if (cert->isSigner()) + text += i18n("Signed by (validation: "); + else + text += i18n("Certificate (validation: "); + switch (cert->validate()) { + case KSSLCertificate::Ok: + text += i18n("Ok"); break; + case KSSLCertificate::NoCARoot: + text += i18n("NoCARoot"); break; + case KSSLCertificate::InvalidPurpose: + text += i18n("InvalidPurpose"); break; + case KSSLCertificate::PathLengthExceeded: + text += i18n("PathLengthExceeded"); break; + case KSSLCertificate::InvalidCA: + text += i18n("InvalidCA"); break; + case KSSLCertificate::Expired: + text += i18n("Expired"); break; + case KSSLCertificate::SelfSigned: + text += i18n("SelfSigned"); break; + case KSSLCertificate::ErrorReadingRoot: + text += i18n("ErrorReadingRoot"); break; + case KSSLCertificate::Revoked: + text += i18n("Revoked"); break; + case KSSLCertificate::Untrusted: + text += i18n("Untrusted"); break; + case KSSLCertificate::SignatureFailed: + text += i18n("SignatureFailed"); break; + case KSSLCertificate::Rejected: + text += i18n("Rejected"); break; + case KSSLCertificate::PrivateKeyFailed: + text += i18n("PrivateKeyFailed"); break; + case KSSLCertificate::InvalidHost: + text += i18n("InvalidHost"); break; + case KSSLCertificate::Unknown: + default: + text += i18n("Unknown"); break; + } + text += TQString(")\n"); + TQString subject = cert->getSubject() + TQChar('\n'); + TQRegExp reg(TQString("/[A-Z]+=")); + int pos = 0; + while ((pos = subject.find(reg, pos)) > -1) + subject.replace(pos, 1, TQString("\n ")); + text += subject.mid(1); + } + } + kdDebug(6100) << "Security confirm " << args.first() << certs.count() << endl; + if ( !certs.isEmpty() ) { + KSSLCertChain chain; + chain.setChain( certs ); + if ( chain.isValid() ) + answer = PermissionDialog( TQT_TQWIDGET(tqApp->activeWindow()) ).exec( text, args[0] ); + } + } + sl.push_front( TQString(answer) ); + sl.push_front( TQString::number(ID_num) ); + process->send( KJAS_SECURITY_CONFIRM, sl ); + return; + } + default: + return; + break; + } + + + if( !ok ) + { + kdError(6100) << "could not parse out contextID to call command on" << endl; + return; + } + + KJavaAppletContext* const context = d->contexts[ ID_num ]; + if( context ) + context->processCmd( cmd, args ); + else if (cmd != "AppletStateNotification") + kdError(6100) << "no context object for this id" << endl; +} + +void KJavaAppletServer::endWaitForReturnData() { + kdDebug(6100) << "KJavaAppletServer::endWaitForReturnData" << endl; + killTimers(); + JSStack::iterator it = d->jsstack.begin(); + JSStack::iterator itEnd = d->jsstack.end(); + for (; it != itEnd; ++it) + it.data()->exit = true; +} + +void KJavaAppletServer::timerEvent(TQTimerEvent *) { + endWaitForReturnData(); + kdDebug(6100) << "KJavaAppletServer::timerEvent timeout" << endl; +} + +void KJavaAppletServer::waitForReturnData(JSStackFrame * frame) { + kdDebug(6100) << ">KJavaAppletServer::waitForReturnData" << endl; + killTimers(); + startTimer(15000); + while (!frame->exit) + kapp->eventLoop()->processEvents (TQEventLoop::AllEvents | TQEventLoop::WaitForMore); + if (d->jsstack.size() <= 1) + killTimers(); + kdDebug(6100) << "<KJavaAppletServer::waitForReturnData stacksize:" << d->jsstack.size() << endl; +} + +bool KJavaAppletServer::getMember(TQStringList & args, TQStringList & ret_args) { + JSStackFrame frame( d->jsstack, ret_args ); + args.push_front( TQString::number(frame.ticket) ); + + process->send( KJAS_GET_MEMBER, args ); + waitForReturnData( &frame ); + + return frame.ready; +} + +bool KJavaAppletServer::putMember( TQStringList & args ) { + TQStringList ret_args; + JSStackFrame frame( d->jsstack, ret_args ); + args.push_front( TQString::number(frame.ticket) ); + + process->send( KJAS_PUT_MEMBER, args ); + waitForReturnData( &frame ); + + return frame.ready && ret_args.count() > 0 && ret_args[0].toInt(); +} + +bool KJavaAppletServer::callMember(TQStringList & args, TQStringList & ret_args) { + JSStackFrame frame( d->jsstack, ret_args ); + args.push_front( TQString::number(frame.ticket) ); + + process->send( KJAS_CALL_MEMBER, args ); + waitForReturnData( &frame ); + + return frame.ready; +} + +void KJavaAppletServer::derefObject( TQStringList & args ) { + process->send( KJAS_DEREF_OBJECT, args ); +} + +bool KJavaAppletServer::usingKIO() { + return d->useKIO; +} + + +PermissionDialog::PermissionDialog( TQWidget* parent ) + : TQObject(parent), m_button("no") +{} + +TQCString PermissionDialog::exec( const TQString & cert, const TQString & perm ) { + TQGuardedPtr<TQDialog> dialog = new TQDialog( TQT_TQWIDGET(parent()), "PermissionDialog"); + + dialog->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)1, (TQSizePolicy::SizeType)1, 0, 0, dialog->sizePolicy().hasHeightForWidth() ) ); + dialog->setModal( true ); + dialog->setCaption( i18n("Security Alert") ); + + TQVBoxLayout* const dialogLayout = new TQVBoxLayout( dialog, 11, 6, "dialogLayout"); + + dialogLayout->addWidget( new TQLabel( i18n("Do you grant Java applet with certificate(s):"), dialog ) ); + dialogLayout->addWidget( new TQLabel( cert, dialog, "message" ) ); + dialogLayout->addWidget( new TQLabel( i18n("the following permission"), dialog, "message" ) ); + dialogLayout->addWidget( new TQLabel( perm, dialog, "message" ) ); + TQSpacerItem* const spacer2 = new TQSpacerItem( 20, 40, TQSizePolicy::Minimum, TQSizePolicy::Expanding ); + dialogLayout->addItem( spacer2 ); + + TQHBoxLayout* const buttonLayout = new TQHBoxLayout( 0, 0, 6, "buttonLayout"); + + TQPushButton* const no = new TQPushButton( i18n("&No"), dialog, "no" ); + no->setDefault( true ); + buttonLayout->addWidget( no ); + + TQPushButton* const reject = new TQPushButton( i18n("&Reject All"), dialog, "reject" ); + buttonLayout->addWidget( reject ); + + TQPushButton* const yes = new TQPushButton( i18n("&Yes"), dialog, "yes" ); + buttonLayout->addWidget( yes ); + + TQPushButton* const grant = new TQPushButton( i18n("&Grant All"), dialog, "grant" ); + buttonLayout->addWidget( grant ); + dialogLayout->addLayout( buttonLayout ); + dialog->resize( dialog->minimumSizeHint() ); + //clearWState( WState_Polished ); + + connect( no, TQT_SIGNAL( clicked() ), this, TQT_SLOT( clicked() ) ); + connect( reject, TQT_SIGNAL( clicked() ), this, TQT_SLOT( clicked() ) ); + connect( yes, TQT_SIGNAL( clicked() ), this, TQT_SLOT( clicked() ) ); + connect( grant, TQT_SIGNAL( clicked() ), this, TQT_SLOT( clicked() ) ); + + dialog->exec(); + delete dialog; + + return m_button; +} + +PermissionDialog::~PermissionDialog() +{} + +void PermissionDialog::clicked() +{ + m_button = TQT_TQOBJECT_CONST(sender())->name(); + static_cast<const TQWidget*>(sender())->parentWidget()->close(); +} + +#include "kjavaappletserver.moc" diff --git a/tdehtml/java/kjavaappletserver.h b/tdehtml/java/kjavaappletserver.h new file mode 100644 index 000000000..63463b040 --- /dev/null +++ b/tdehtml/java/kjavaappletserver.h @@ -0,0 +1,180 @@ +// -*- c++ -*- + +/* This file is part of the KDE project + * + * Copyright (C) 2000 Richard Moore <rich@kde.org> + * 2000 Wynn Wilkes <wynnw@caldera.com> + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public License + * along with this library; see the file COPYING.LIB. If not, write to + * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. + */ + +#ifndef KJAVAAPPLETSERVER_H +#define KJAVAAPPLETSERVER_H + +#include "kjavaprocess.h" +#include <tqobject.h> +#include <tqmap.h> + + +/** + * @short Communicates with a KJAS server to display and control Java applets. + * + * @author Richard J. Moore, rich@kde.org + */ + +class KJavaAppletContext; +class KJavaAppletServerPrivate; +class JSStackFrame; + +class KJavaAppletServer : public TQObject +{ +Q_OBJECT + +public: + /** + * Create the applet server. These shouldn't be used directly, + * use allocateJavaServer instead + */ + KJavaAppletServer(); + ~KJavaAppletServer(); + + /** + * A factory method that returns the default server. This is the way this + * class is usually instantiated. + */ + static KJavaAppletServer *allocateJavaServer(); + + /** + * When you are done using your reference to the AppletServer, you must + * dereference it by calling freeJavaServer(). + */ + static void freeJavaServer(); + + /** + * This allows the KJavaAppletWidget to display some feedback in a QLabel + * while the applet is being loaded. If the java process could not be + * started, an error message is displayed instead. + */ + static TQString getAppletLabel(); + + /** + * Create an applet context with the specified id. + */ + void createContext( int contextId, KJavaAppletContext* context ); + + /** + * Destroy the applet context with the specified id. All the applets in the + * context will be destroyed as well. + */ + void destroyContext( int contextId ); + + /** + * Create an applet in the specified context with the specified id. The applet + * name, class etc. are specified in the same way as in the HTML APPLET tag. + */ + bool createApplet( int contextId, int appletId, + const TQString & name, const TQString & clazzName, + const TQString & baseURL, const TQString & user, + const TQString & password, const TQString & authname, + const TQString & codeBase, const TQString & jarFile, + TQSize size, const TQMap<TQString, TQString>& params, + const TQString & windowTitle ); + + /** + * This should be called by the KJavaAppletWidget + */ + void initApplet( int contextId, int appletId ); + + /** + * Destroy an applet in the specified context with the specified id. + */ + void destroyApplet( int contextId, int appletId ); + + /** + * Start the specified applet. + */ + void startApplet( int contextId, int appletId ); + + /** + * Stop the specified applet. + */ + void stopApplet( int contextId, int appletId ); + + /** + * Show java console. + */ + void showConsole(); + + /** + * Send data we got back from a KJavaDownloader back to the appropriate + * class loader. + */ + void sendURLData( int loaderID, int code, const TQByteArray& data ); + /** + * Removes KJavaDownloader from the list (deletes it too). + */ + void removeDataJob( int loaderID ); + + /** + * Shut down the KJAS server. + */ + void quit(); + KJavaProcess* javaProcess() { return process; } + + TQString appletLabel(); + + void waitForReturnData(JSStackFrame *); + void endWaitForReturnData(); + + bool getMember(TQStringList & args, TQStringList & ret_args); + bool putMember(TQStringList & args); + bool callMember(TQStringList & args, TQStringList & ret_args); + void derefObject(TQStringList & args); + + bool usingKIO(); +protected: + void setupJava( KJavaProcess* p ); + + KJavaProcess* process; + +protected slots: + void slotJavaRequest( const TQByteArray& qb ); + void checkShutdown(); + void timerEvent(TQTimerEvent *); + +private: + KJavaAppletServerPrivate* d; + +}; + + +class PermissionDialog : public TQObject +{ + Q_OBJECT +public: + PermissionDialog( TQWidget* ); + ~PermissionDialog(); + + TQCString exec( const TQString & cert, const TQString & perm ); + +private slots: + void clicked(); + +private: + TQCString m_button; +}; + +#endif // KJAVAAPPLETSERVER_H diff --git a/tdehtml/java/kjavaappletviewer.cpp b/tdehtml/java/kjavaappletviewer.cpp new file mode 100644 index 000000000..fce5195ff --- /dev/null +++ b/tdehtml/java/kjavaappletviewer.cpp @@ -0,0 +1,635 @@ +/* This file is part of the KDE project + * + * Copyright (C) 2003 Koos Vriezen <koos.vriezen@xs4all.nl> + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public License + * along with this library; see the file COPYING.LIB. If not, write to + * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. + */ +#include <stdio.h> + +#ifdef KDE_USE_FINAL +#undef Always +#endif +#include <tqdir.h> +#include <tqtable.h> +#include <tqpair.h> +#include <tqtimer.h> +#include <tqguardedptr.h> +#include <tqlabel.h> + +#include <klibloader.h> +#include <kaboutdata.h> +#include <kstaticdeleter.h> +#include <klocale.h> +#include <kstatusbar.h> +#include <kiconloader.h> +#include <kapplication.h> +#include <kdebug.h> +#include <kconfig.h> +#include <kio/authinfo.h> +#include <dcopclient.h> + +#include "kjavaappletwidget.h" +#include "kjavaappletviewer.h" +#include "kjavaappletserver.h" + + +K_EXPORT_COMPONENT_FACTORY (kjavaappletviewer, KJavaAppletViewerFactory) + +TDEInstance *KJavaAppletViewerFactory::s_instance = 0; + +KJavaAppletViewerFactory::KJavaAppletViewerFactory () { + s_instance = new TDEInstance ("kjava"); +} + +KJavaAppletViewerFactory::~KJavaAppletViewerFactory () { + delete s_instance; +} + +KParts::Part *KJavaAppletViewerFactory::createPartObject + (TQWidget *wparent, const char *wname, + TQObject *parent, const char * name, const char *, const TQStringList & args) { + return new KJavaAppletViewer (wparent, wname, parent, name, args); +} + +//----------------------------------------------------------------------------- + +class KJavaServerMaintainer; +static KJavaServerMaintainer * serverMaintainer = 0; + +class KJavaServerMaintainer { +public: + KJavaServerMaintainer () { } + ~KJavaServerMaintainer (); + + KJavaAppletContext * getContext (TQObject*, const TQString &); + void releaseContext (TQObject*, const TQString &); + void setServer (KJavaAppletServer * s); + TQGuardedPtr <KJavaAppletServer> server; +private: + typedef TQMap <QPair <TQObject*, TQString>, QPair <KJavaAppletContext*, int> > + ContextMap; + ContextMap m_contextmap; +}; + +KJavaServerMaintainer::~KJavaServerMaintainer () { + delete server; +} + +KJavaAppletContext * KJavaServerMaintainer::getContext (TQObject * w, const TQString & doc) { + ContextMap::key_type key = qMakePair (w, doc); + ContextMap::iterator it = m_contextmap.find (key); + if (it != m_contextmap.end ()) { + ++((*it).second); + return (*it).first; + } + KJavaAppletContext* const context = new KJavaAppletContext (); + m_contextmap.insert (key, qMakePair(context, 1)); + return context; +} + +void KJavaServerMaintainer::releaseContext (TQObject * w, const TQString & doc) { + ContextMap::iterator it = m_contextmap.find (qMakePair (w, doc)); + if (it != m_contextmap.end () && --(*it).second <= 0) { + kdDebug(6100) << "KJavaServerMaintainer::releaseContext" << endl; + (*it).first->deleteLater (); + m_contextmap.remove (it); + } +} + +inline void KJavaServerMaintainer::setServer (KJavaAppletServer * s) { + if (!server) + server = s; +} + +static KStaticDeleter <KJavaServerMaintainer> serverMaintainerDeleter; + +//----------------------------------------------------------------------------- + +AppletParameterDialog::AppletParameterDialog (KJavaAppletWidget * parent) + : KDialogBase (parent, "paramdialog", true, i18n ("Applet Parameters"), + KDialogBase::Close, KDialogBase::Close, true), + m_appletWidget (parent) { + KJavaApplet* const applet = parent->applet (); + table = new TQTable (30, 2, this); + table->setMinimumSize (TQSize (600, 400)); + table->setColumnWidth (0, 200); + table->setColumnWidth (1, 340); + TQHeader* const header = table->horizontalHeader(); + header->setLabel (0, i18n ("Parameter")); + header->setLabel (1, i18n ("Value")); + TQTableItem * tit = new TQTableItem (table, TQTableItem::Never, i18n("Class")); + table->setItem (0, 0, tit); + tit = new TQTableItem(table, TQTableItem::Always, applet->appletClass()); + table->setItem (0, 1, tit); + tit = new TQTableItem (table, TQTableItem::Never, i18n ("Base URL")); + table->setItem (1, 0, tit); + tit = new TQTableItem(table, TQTableItem::Always, applet->baseURL()); + table->setItem (1, 1, tit); + tit = new TQTableItem (table, TQTableItem::Never, i18n ("Archives")); + table->setItem (2, 0, tit); + tit = new TQTableItem(table, TQTableItem::Always, applet->archives()); + table->setItem (2, 1, tit); + TQMap<TQString,TQString>::const_iterator it = applet->getParams().begin(); + const TQMap<TQString,TQString>::const_iterator itEnd = applet->getParams().end(); + for (int count = 2; it != itEnd; ++it) { + tit = new TQTableItem (table, TQTableItem::Always, it.key ()); + table->setItem (++count, 0, tit); + tit = new TQTableItem(table, TQTableItem::Always, it.data ()); + table->setItem (count, 1, tit); + } + setMainWidget (table); +} + +void AppletParameterDialog::slotClose () { + table->selectCells (0, 0, 0, 0); + KJavaApplet* const applet = m_appletWidget->applet (); + applet->setAppletClass (table->item (0, 1)->text ()); + applet->setBaseURL (table->item (1, 1)->text ()); + applet->setArchives (table->item (2, 1)->text ()); + const int lim = table->numRows(); + for (int i = 3; i < lim; ++i) { + if (table->item (i, 0) && table->item (i, 1) && !table->item (i, 0)->text ().isEmpty ()) + applet->setParameter (table->item (i, 0)->text (), + table->item (i, 1)->text ()); + } + hide (); +} +//----------------------------------------------------------------------------- + +class CoverWidget : public TQWidget { + KJavaAppletWidget * m_appletwidget; +public: + CoverWidget (TQWidget *); + ~CoverWidget () {} + KJavaAppletWidget * appletWidget () const; +protected: + void resizeEvent (TQResizeEvent * e); +}; + +inline CoverWidget::CoverWidget (TQWidget * parent) + : TQWidget (parent, "KJavaAppletViewer Widget") +{ + m_appletwidget = new KJavaAppletWidget (this); + setFocusProxy (m_appletwidget); +} + +inline KJavaAppletWidget * CoverWidget::appletWidget () const { + return m_appletwidget; +} + +void CoverWidget::resizeEvent (TQResizeEvent * e) { + m_appletwidget->resize (e->size().width(), e->size().height()); +} + +//----------------------------------------------------------------------------- + +class StatusBarIcon : public TQLabel { +public: + StatusBarIcon (TQWidget * parent) : TQLabel (parent) { + setPixmap (SmallIcon (TQString ("java"), KJavaAppletViewerFactory::instance ())); + } +protected: + void mousePressEvent (TQMouseEvent *) { + serverMaintainer->server->showConsole (); + } +}; + +//----------------------------------------------------------------------------- + +KJavaAppletViewer::KJavaAppletViewer (TQWidget * wparent, const char *, + TQObject * parent, const char * name, const TQStringList & args) + : KParts::ReadOnlyPart (parent, name), + m_browserextension (new KJavaAppletViewerBrowserExtension (this)), + m_liveconnect (new KJavaAppletViewerLiveConnectExtension (this)), + m_statusbar (new KParts::StatusBarExtension (this)), + m_statusbar_icon (0L), + m_closed (true) +{ + if (!serverMaintainer) { + serverMaintainerDeleter.setObject (serverMaintainer, + new KJavaServerMaintainer); + } + m_view = new CoverWidget (wparent); + TQString classname, classid, codebase, tdehtml_codebase, src_param; + int width = -1; + int height = -1; + KJavaApplet* const applet = m_view->appletWidget()->applet (); + TQStringList::const_iterator it = args.begin(); + const TQStringList::const_iterator itEnd = args.end(); + for ( ; it != itEnd; ++it) { + const int equalPos = (*it).find("="); + if (equalPos > 0) { + const TQString name = (*it).left (equalPos).upper (); + TQString value = (*it).right ((*it).length () - equalPos - 1); + if (value.at(0)=='\"') + value = value.right (value.length () - 1); + if (value.at (value.length () - 1) == '\"') + value.truncate (value.length () - 1); + kdDebug(6100) << "name=" << name << " value=" << value << endl; + if (!name.isEmpty()) { + const TQString name_lower = name.lower (); + if (name == "__KHTML__PLUGINBASEURL") { + baseurl = KURL (KURL (value), TQString (".")).url (); + } else if (name == "__KHTML__CODEBASE") + tdehtml_codebase = value; + else if (name_lower == TQString::fromLatin1("codebase") || + name_lower == TQString::fromLatin1("java_codebase")) { + if (!value.isEmpty ()) + codebase = value; + } else if (name == "__KHTML__CLASSID") + //else if (name.lower()==TQString::fromLatin1("classid")) + classid = value; + else if (name_lower == TQString::fromLatin1("code") || + name_lower == TQString::fromLatin1("java_code")) + classname = value; + else if (name_lower == TQString::fromLatin1("src")) + src_param = value; + else if (name_lower == TQString::fromLatin1("archive") || + name_lower == TQString::fromLatin1("java_archive") || + name_lower.startsWith ("cache_archive")) + applet->setArchives (value); + else if (name_lower == TQString::fromLatin1("name")) + applet->setAppletName (value); + else if (name_lower == TQString::fromLatin1("width")) + width = value.toInt(); + else if (name_lower == TQString::fromLatin1("height")) + height = value.toInt(); + if (!name.startsWith ("__KHTML__")) { + applet->setParameter (name, value); + } + } + } + } + if (!classid.isEmpty ()) { + applet->setParameter ("CLSID", classid); + kdDebug(6100) << "classid=" << classid << classid.startsWith("clsid:")<< endl; + if (classid.startsWith ("clsid:")) + // codeBase contains the URL to the plugin page + tdehtml_codebase = baseurl; + else if (classname.isEmpty () && classid.startsWith ("java:")) + classname = classid.mid(5); + } + if (classname.isEmpty ()) + classname = src_param; + else if (!src_param.isEmpty ()) + applet->setParameter (TQString ("SRC"), src_param); + if (codebase.isEmpty ()) + codebase = tdehtml_codebase; + if (baseurl.isEmpty ()) { + // not embeded in tdehtml + TQString pwd = TQDir().absPath (); + if (!pwd.endsWith (TQChar (TQDir::separator ()))) + pwd += TQDir::separator (); + baseurl = KURL (KURL (pwd), codebase).url (); + } + if (width > 0 && height > 0) { + m_view->resize (width, height); + applet->setSize( TQSize( width, height ) ); + } + applet->setBaseURL (baseurl); + // check codebase first + const KURL kbaseURL( baseurl ); + const KURL newURL(kbaseURL, codebase); + if (kapp->authorizeURLAction("redirect", KURL(baseurl), newURL)) + applet->setCodeBase (newURL.url()); + applet->setAppletClass (classname); + KJavaAppletContext* const cxt = serverMaintainer->getContext (parent, baseurl); + applet->setAppletContext (cxt); + + KJavaAppletServer* const server = cxt->getServer (); + + serverMaintainer->setServer (server); + + if (!server->usingKIO ()) { + /* if this page needs authentication */ + TDEIO::AuthInfo info; + TQString errorMsg; + TQCString replyType; + TQByteArray params; + TQByteArray reply; + TDEIO::AuthInfo authResult; + + //(void) dcopClient(); // Make sure to have a dcop client. + info.url = baseurl; + info.verifyPath = true; + + TQDataStream stream(params, IO_WriteOnly); + stream << info << m_view->topLevelWidget()->winId(); + + if (!kapp->dcopClient ()->call( "kded", "kpasswdserver", "checkAuthInfo(TDEIO::AuthInfo, long int)", params, replyType, reply ) ) { + kdWarning() << "Can't communicate with kded_kpasswdserver!" << endl; + } else if ( replyType == "TDEIO::AuthInfo" ) { + TQDataStream stream2( reply, IO_ReadOnly ); + stream2 >> authResult; + applet->setUser (authResult.username); + applet->setPassword (authResult.password); + applet->setAuthName (authResult.realmValue); + } + } + + /* install event filter for close events */ + if (wparent) + wparent->topLevelWidget ()->installEventFilter (this); + + setInstance (KJavaAppletViewerFactory::instance ()); + KParts::Part::setWidget (m_view); + + connect (applet->getContext(), TQT_SIGNAL(appletLoaded()), this, TQT_SLOT(appletLoaded())); + connect (applet->getContext(), TQT_SIGNAL(showDocument(const TQString&, const TQString&)), m_browserextension, TQT_SLOT(showDocument(const TQString&, const TQString&))); + connect (applet->getContext(), TQT_SIGNAL(showStatus(const TQString &)), this, TQT_SLOT(infoMessage(const TQString &))); + connect (applet, TQT_SIGNAL(jsEvent (const TQStringList &)), m_liveconnect, TQT_SLOT(jsEvent (const TQStringList &))); +} + +bool KJavaAppletViewer::eventFilter (TQObject *o, TQEvent *e) { + if (m_liveconnect->jsSessions () > 0) { + switch (e->type()) { + case TQEvent::Destroy: + case TQEvent::Close: + case TQEvent::Quit: + return true; + default: + break; + } + } + return KParts::ReadOnlyPart::eventFilter(o,e); +} + +KJavaAppletViewer::~KJavaAppletViewer () { + m_view = 0L; + serverMaintainer->releaseContext (TQT_TQOBJECT(parent()), baseurl); + if (m_statusbar_icon) { + m_statusbar->removeStatusBarItem (m_statusbar_icon); + delete m_statusbar_icon; + } +} + +bool KJavaAppletViewer::openURL (const KURL & url) { + if (!m_view) return false; + m_closed = false; + KJavaAppletWidget* const w = m_view->appletWidget (); + KJavaApplet* const applet = w->applet (); + if (applet->isCreated ()) + applet->stop (); + if (applet->appletClass ().isEmpty ()) { + // preview without setting a class? + if (applet->baseURL ().isEmpty ()) { + applet->setAppletClass (url.fileName ()); + applet->setBaseURL (url.upURL ().url ()); + } else + applet->setAppletClass (url.url ()); + AppletParameterDialog (w).exec (); + applet->setSize (w->sizeHint()); + } + if (!m_statusbar_icon) { + KStatusBar *sb = m_statusbar->statusBar(); + if (sb) { + m_statusbar_icon = new StatusBarIcon (sb); + m_statusbar->addStatusBarItem (m_statusbar_icon, 0, false); + } + } + // delay showApplet if size is unknown and m_view not shown + if (applet->size().width() > 0 || m_view->isVisible()) + w->showApplet (); + else + TQTimer::singleShot (10, this, TQT_SLOT (delayedCreateTimeOut ())); + if (!applet->failed ()) + emit started (0L); + return url.isValid (); +} + +bool KJavaAppletViewer::closeURL () { + kdDebug(6100) << "closeURL" << endl; + m_closed = true; + KJavaApplet* const applet = m_view->appletWidget ()->applet (); + if (applet->isCreated ()) + applet->stop (); + applet->getContext()->getServer()->endWaitForReturnData(); + return true; +} + +bool KJavaAppletViewer::appletAlive () const { + return !m_closed && m_view && + m_view->appletWidget ()->applet () && + m_view->appletWidget ()->applet ()->isAlive (); +} + +bool KJavaAppletViewer::openFile () { + return false; +} + +void KJavaAppletViewer::delayedCreateTimeOut () { + KJavaAppletWidget* const w = m_view->appletWidget (); + if (!w->applet ()->isCreated () && !m_closed) + w->showApplet (); +} + +void KJavaAppletViewer::appletLoaded () { + if (!m_view) return; + KJavaApplet* const applet = m_view->appletWidget ()->applet (); + if (applet->isAlive() || applet->failed()) + emit completed(); +} + +void KJavaAppletViewer::infoMessage (const TQString & msg) { + m_browserextension->infoMessage(msg); +} + +TDEAboutData* KJavaAppletViewer::createAboutData () { + return new TDEAboutData("KJavaAppletViewer", I18N_NOOP("TDE Java Applet Plugin"), "1.0"); +} + +//--------------------------------------------------------------------- + +KJavaAppletViewerBrowserExtension::KJavaAppletViewerBrowserExtension (KJavaAppletViewer * parent) + : KParts::BrowserExtension (parent, "KJavaAppletViewer Browser Extension") { +} + +void KJavaAppletViewerBrowserExtension::urlChanged (const TQString & url) { + emit setLocationBarURL (url); +} + +void KJavaAppletViewerBrowserExtension::setLoadingProgress (int percentage) { + emit loadingProgress (percentage); +} + +void KJavaAppletViewerBrowserExtension::setURLArgs (const KParts::URLArgs & /*args*/) { +} + +void KJavaAppletViewerBrowserExtension::saveState (TQDataStream & stream) { + KJavaApplet* const applet = static_cast<KJavaAppletViewer*>(parent())->view()->appletWidget ()->applet (); + stream << applet->appletClass(); + stream << applet->baseURL(); + stream << applet->archives(); + stream << applet->getParams().size (); + TQMap<TQString,TQString>::const_iterator it = applet->getParams().begin(); + const TQMap<TQString,TQString>::const_iterator itEnd = applet->getParams().end(); + for ( ; it != itEnd; ++it) { + stream << it.key (); + stream << it.data (); + } +} + +void KJavaAppletViewerBrowserExtension::restoreState (TQDataStream & stream) { + KJavaAppletWidget* const w = static_cast<KJavaAppletViewer*>(parent())->view()->appletWidget(); + KJavaApplet* const applet = w->applet (); + TQString key, val; + int paramcount; + stream >> val; + applet->setAppletClass (val); + stream >> val; + applet->setBaseURL (val); + stream >> val; + applet->setArchives (val); + stream >> paramcount; + for (int i = 0; i < paramcount; ++i) { + stream >> key; + stream >> val; + applet->setParameter (key, val); + kdDebug(6100) << "restoreState key:" << key << " val:" << val << endl; + } + applet->setSize (w->sizeHint ()); + if (w->isVisible()) + w->showApplet (); +} + +void KJavaAppletViewerBrowserExtension::showDocument (const TQString & doc, + const TQString & frame) { + const KURL url (doc); + KParts::URLArgs args; + args.frameName = frame; + emit openURLRequest (url, args); +} + +//----------------------------------------------------------------------------- + +KJavaAppletViewerLiveConnectExtension::KJavaAppletViewerLiveConnectExtension(KJavaAppletViewer * parent) + : KParts::LiveConnectExtension (parent, "KJavaAppletViewer LiveConnect Extension"), m_viewer (parent) { +} + +bool KJavaAppletViewerLiveConnectExtension::get ( + const unsigned long objid, const TQString & name, + KParts::LiveConnectExtension::Type & type, + unsigned long & rid, TQString & value) +{ + if (!m_viewer->appletAlive ()) + return false; + TQStringList args, ret_args; + KJavaApplet* const applet = m_viewer->view ()->appletWidget ()->applet (); + args.append (TQString::number (applet->appletId ())); + args.append (TQString::number ((int) objid)); + args.append (name); + m_jssessions++; + const bool ret = applet->getContext()->getMember (args, ret_args); + m_jssessions--; + if (!ret || ret_args.count() != 3) return false; + bool ok; + int itype = ret_args[0].toInt (&ok); + if (!ok || itype < 0) return false; + type = (KParts::LiveConnectExtension::Type) itype; + rid = ret_args[1].toInt (&ok); + if (!ok) return false; + value = ret_args[2]; + return true; +} + +bool KJavaAppletViewerLiveConnectExtension::put(const unsigned long objid, const TQString & name, const TQString & value) +{ + if (!m_viewer->appletAlive ()) + return false; + TQStringList args; + KJavaApplet* const applet = m_viewer->view ()->appletWidget ()->applet (); + args.append (TQString::number (applet->appletId ())); + args.append (TQString::number ((int) objid)); + args.append (name); + args.append (value); + ++m_jssessions; + const bool ret = applet->getContext()->putMember (args); + --m_jssessions; + return ret; +} + +bool KJavaAppletViewerLiveConnectExtension::call( const unsigned long objid, const TQString & func, const TQStringList & fargs, KParts::LiveConnectExtension::Type & type, unsigned long & retobjid, TQString & value ) +{ + if (!m_viewer->appletAlive ()) + return false; + KJavaApplet* const applet = m_viewer->view ()->appletWidget ()->applet (); + TQStringList args, ret_args; + args.append (TQString::number (applet->appletId ())); + args.append (TQString::number ((int) objid)); + args.append (func); + args.append (TQString::number ((int) fargs.size ())); + { + TQStringList::const_iterator it = fargs.begin(); + const TQStringList::const_iterator itEnd = fargs.end(); + for ( ; it != itEnd; ++it) + args.append(*it); + } + + ++m_jssessions; + const bool ret = applet->getContext()->callMember (args, ret_args); + --m_jssessions; + if (!ret || ret_args.count () != 3) return false; + bool ok; + const int itype = ret_args[0].toInt (&ok); + if (!ok || itype < 0) return false; + type = (KParts::LiveConnectExtension::Type) itype; + retobjid = ret_args[1].toInt (&ok); + if (!ok) return false; + value = ret_args[2]; + return true; +} + +void KJavaAppletViewerLiveConnectExtension::unregister(const unsigned long objid) +{ + if (!m_viewer->view () || !m_viewer->view ()) + return; + KJavaApplet* const applet = m_viewer->view ()->appletWidget ()->applet (); + if (!applet || objid == 0) { + // typically a gc after a function call on the applet, + // no need to send to the jvm + return; + } + TQStringList args; + args.append (TQString::number (applet->appletId ())); + args.append (TQString::number ((int) objid)); + applet->getContext()->derefObject (args); +} + +void KJavaAppletViewerLiveConnectExtension::jsEvent (const TQStringList & args) { + if (args.count () < 2 || !m_viewer->appletAlive ()) + return; + bool ok; + TQStringList::ConstIterator it = args.begin(); + const TQStringList::ConstIterator itEnd = args.end(); + const unsigned long objid = (*it).toInt(&ok); + ++it; + const TQString event = (*it); + ++it; + KParts::LiveConnectExtension::ArgList arglist; + + for (; it != itEnd; ++it) { + // take a deep breath here + const TQStringList::ConstIterator prev = it++; + arglist.push_back(KParts::LiveConnectExtension::ArgList::value_type((KParts::LiveConnectExtension::Type) (*prev).toInt(), (*it))); + } + emit partEvent (objid, event, arglist); +} + +int KJavaAppletViewerLiveConnectExtension::m_jssessions = 0; + +//----------------------------------------------------------------------------- + +#include "kjavaappletviewer.moc" diff --git a/tdehtml/java/kjavaappletviewer.desktop b/tdehtml/java/kjavaappletviewer.desktop new file mode 100644 index 000000000..9a2d16355 --- /dev/null +++ b/tdehtml/java/kjavaappletviewer.desktop @@ -0,0 +1,82 @@ +[Desktop Entry] +Name=Embedded Java Applet Viewer +Name[af]=Ingelegde Java Program Bekyker +Name[az]=Daxili Java Applet Nümayişçisi +Name[be]=Унутраны праглÑдальнік аплетаў Java +Name[bg]=Вграден визуализатор на Java аплети +Name[bn]=অভà§à¦¯à¦¨à§à¦¤à¦°à§€à¦£ জাভা অà§à¦¯à¦¾à¦ªà¦²à§‡à¦Ÿ পà§à¦°à¦¦à¦°à§à¦¶à¦• +Name[br]=Lenner enframmet eus arloadigoù Java +Name[ca]=Applet encastable del visor Java +Name[cs]=Zabudovaný prohlížeÄ Java appletů +Name[csb]=Wbùdowóny przezérnik apletów Java +Name[cy]=Gwelydd Rhaglennig Java Mewnadeiladedig +Name[da]=Indlejret Java-applet fremviser +Name[de]=Eingebetteter Betrachter für Java-Programme +Name[el]=Ενσωματωμένος Ï€Ïοβολέας μικÏοεφαÏμογών Java +Name[eo]=Enkonstruita javaplikaĵrigardilo +Name[es]=Visor de applets de Java empotrables +Name[et]=Põimitav Java apleti näitaja +Name[eu]=Kapsulatutako Javaren applet-ikustailea +Name[fa]=مشاهده‌گر برنامک جاوای Ù†Ù‡ÙØªÙ‡ +Name[fi]=Upotettava Java-sovelmien näyttäjä +Name[fr]=Afficheur d'applets Java intégré +Name[fy]=yn sluten Java Applet Werjefte +Name[ga]=Amharcán Feidhmchláiríní Java Inleabaithe +Name[gl]=Visualizador de Applets de Java Incrustado +Name[he]=מציג יישומוני Java מוטבע +Name[hi]=अंतरà¥à¤¨à¤¿à¤¹à¤¿à¤¤ जावा à¤à¤ªà¤²à¥‡à¤Ÿ दरà¥à¤¶à¤• +Name[hr]=UgraÄ‘eni preglednik Java appleta +Name[hu]=Beágyazott megjelenítÅ‘program Java kisalkalmazásokhoz +Name[id]=Penampil Applet Java Tersisipkan +Name[is]=Ãvefjanlegur Java Applet skoðari +Name[it]=Visualizzatore integrato di applet Java +Name[ja]=埋ã‚込㿠Java アプレットビューア +Name[ka]=ჩáƒáƒ“გმული კáƒáƒ›áƒžáƒáƒœáƒ”ნტი Java áƒáƒžáƒšáƒ”ტების სáƒáƒ©áƒ•ენებლáƒáƒ“ +Name[kk]=Ендірілетін Java апплеттерді қарау модулі +Name[km]=កម្មវិធី​មើល​អាប់ភ្លáŸáž Java ដែលបាន​បង្កប់ +Name[ko]=ë¼ì›Œë„£ì€ ìžë°” 애플릿 보기 +Name[lb]=Agebetteten Java-Applet-Uweiser +Name[lt]=Ä®dedamas Java Applet žiÅ«riklis +Name[lv]=Iegultais Java sÄ«klietotņu (apletu) skatÄ«tÄjs +Name[mk]=Вгнезден гледач на Java аплети +Name[mn]=Суулгаж болох Жава Ðпплет Харагч +Name[ms]=Pelihat Aplet Java Terserta +Name[nb]=Innebygd Java Applet-viser +Name[nds]=Inbett Kieker för Java-Lüttprogrammen +Name[ne]=समà¥à¤®à¤¿à¤²à¤¿à¤¤ जाभा à¤à¤ªà¥à¤²à¥‡à¤Ÿ दरà¥à¤¶à¤• +Name[nl]=Ingebed Java Applet-weergaveprogramma +Name[nn]=Innebygd Java-appletvisar +Name[pa]=ਸ਼ਾਮਿਲ Java Applet ਦਰਸ਼ਕ +Name[pl]=Wbudowana przeglÄ…darka apletów Javy +Name[pt]=Visualizador Embebido de 'Applets' Java +Name[pt_BR]=Visualizador Embutido de Applets Java +Name[ro]=Vizualizor înglobat de miniaplicaÅ£ii Java +Name[ru]=Ð’Ñтраиваемый модуль проÑмотра аплетов Java +Name[rw]=Mugaragaza Java Apuleti Irimo +Name[se]=Vuojuhanláhkái JavaprográmmaÅ¡ Äájeheaddji +Name[sk]=Vložiteľný prehliadaÄ Java appletov +Name[sl]=Vgrajeni pregledovalnik vstavkov java +Name[sq]=Shikues i Ngulitur për JAVA Apletat +Name[sr]=Уграђени приказивач Java аплета +Name[sr@Latn]=UgraÄ‘eni prikazivaÄ Java apleta +Name[sv]=Inbäddningsbar visare av Javaminiprogram +Name[ta]=உடà¯à®ªà¯Šà®¤à®¿à®¨à¯à®¤ ஜாவா சிறà¯à®¨à®¿à®°à®²à¯ காடà¯à®Ÿà®¿ +Name[te]=పొదిగిన జావా ఎపలెటౠచూపరి +Name[tg]=Шоҳиди Java Applet дар Дарун Сохтан +Name[th]=ตัวà¹à¸ªà¸”งจาวาà¹à¸­à¸žà¹€à¸žà¸¥à¹‡à¸•ที่à¸à¸±à¸‡à¸­à¸¢à¸¹à¹ˆ +Name[tr]=Gömülü Java Aplet Görüntüleyici +Name[tt]=Java Applet öçen Quşılma-Kürsätkeç +Name[uk]=Вмонтований переглÑдач аплетів Java +Name[uz]=Ichki Java appletini koÊ»ruvchi +Name[uz@cyrillic]=Ички Java апплетини кўрувчи +Name[vi]=Bá»™ xem tiểu dụng Java nhúng +Name[wa]=Ravalé hÃ¥yneu d' apliketes Java +Name[zh_CN]=嵌入的 Java å°ç¨‹åºæŸ¥çœ‹å™¨ +Name[zh_TW]=Embedded Java Applet 檢視器 +X-TDE-Library=kjavaappletviewer +Icon=java +MimeType=application/x-java-applet;application/x-java; +ServiceTypes=KParts/ReadOnlyPart,Browser/View +Type=Service +InitialPreference=2 +X-TDE-BrowserView-PluginsInfo=kjava/pluginsinfo diff --git a/tdehtml/java/kjavaappletviewer.h b/tdehtml/java/kjavaappletviewer.h new file mode 100644 index 000000000..9b32e3f21 --- /dev/null +++ b/tdehtml/java/kjavaappletviewer.h @@ -0,0 +1,145 @@ +// -*- c++ -*- + +/* This file is part of the KDE project + * + * Copyright (C) 2003 Koos Vriezen <koos.vriezen@xs4all.nl> + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public License + * along with this library; see the file COPYING.LIB. If not, write to + * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. + */ + +#ifndef KJAVAAPPLETVIEWER_H +#define KJAVAAPPLETVIEWER_H + +#include <tdeparts/part.h> +#include <tdeparts/browserextension.h> +#include <tdeparts/statusbarextension.h> +#include <tdeparts/factory.h> +#include <kdialogbase.h> +#include <kurl.h> +#include <tqobject.h> +#include <tqstringlist.h> +#include <tqguardedptr.h> + +#include "kjavaappletwidget.h" + +class TQTable; +class TQLabel; +class KJavaProcess; +class KJavaAppletViewer; +class TDEAboutData; +class TDEInstance; +class TDEConfig; +class CoverWidget; + +class KJavaAppletViewerBrowserExtension : public KParts::BrowserExtension { + Q_OBJECT +public: + KJavaAppletViewerBrowserExtension (KJavaAppletViewer *parent); + void urlChanged (const TQString & url); + void setLoadingProgress (int percentage); + + void setURLArgs (const KParts::URLArgs & args); + void saveState (TQDataStream & stream); + void restoreState (TQDataStream & stream); +public slots: + void showDocument (const TQString & doc, const TQString & frame); +}; + +class KJavaAppletViewerLiveConnectExtension : public KParts::LiveConnectExtension { + Q_OBJECT +public: + KJavaAppletViewerLiveConnectExtension(KJavaAppletViewer * parent); + + bool get (const unsigned long objid, const TQString & field, KParts::LiveConnectExtension::Type & type, unsigned long & retobjid, TQString & value); + bool put(const unsigned long, const TQString & field, const TQString & value); + bool call (const unsigned long , const TQString & func, const TQStringList & args, KParts::LiveConnectExtension::Type & type, unsigned long & retobjid, TQString & value); + void unregister (const unsigned long objid); + + int jsSessions () const { return m_jssessions; } +public slots: + void jsEvent (const TQStringList & args); +signals: + virtual void partEvent (const unsigned long objid, const TQString & event, const KParts::LiveConnectExtension::ArgList & args); + +private: + KJavaAppletViewer * m_viewer; + static int m_jssessions; +}; + +class KJavaAppletViewer : public KParts::ReadOnlyPart { + Q_OBJECT +public: + KJavaAppletViewer (TQWidget * wparent, const char * wname, + TQObject * parent, const char * name, const TQStringList &args); + ~KJavaAppletViewer (); + CoverWidget * view () const { return m_view; } + static TDEAboutData* createAboutData (); + + KJavaAppletViewerBrowserExtension * browserextension() const + { return m_browserextension; } + KParts::LiveConnectExtension * liveConnectExtension () const + { return m_liveconnect; } + + bool eventFilter (TQObject *o, TQEvent *e); + + bool appletAlive () const; +public slots: + virtual bool openURL (const KURL & url); + virtual bool closeURL (); + void appletLoaded (); + void infoMessage (const TQString &); +protected: + bool openFile(); +private slots: + void delayedCreateTimeOut (); +private: + TQGuardedPtr <CoverWidget> m_view; + TDEConfig * m_config; + KJavaProcess * process; + KJavaAppletViewerBrowserExtension * m_browserextension; + KJavaAppletViewerLiveConnectExtension * m_liveconnect; + KParts::StatusBarExtension * m_statusbar; + TQGuardedPtr <TQLabel> m_statusbar_icon; + TQString baseurl; + bool m_closed; +}; + +class KJavaAppletViewerFactory : public KParts::Factory { + Q_OBJECT +public: + KJavaAppletViewerFactory (); + virtual ~KJavaAppletViewerFactory (); + virtual KParts::Part *createPartObject + (TQWidget *wparent, const char *wname, + TQObject *parent, const char *name, + const char *className, const TQStringList &args); + static TDEInstance * instance () { return s_instance; } +private: + static TDEInstance * s_instance; +}; + +class AppletParameterDialog : public KDialogBase { + Q_OBJECT +public: + AppletParameterDialog (KJavaAppletWidget * parent); +protected slots: + void slotClose (); +private: + KJavaAppletWidget * m_appletWidget; + TQTable * table; +}; + +#endif diff --git a/tdehtml/java/kjavaappletwidget.cpp b/tdehtml/java/kjavaappletwidget.cpp new file mode 100644 index 000000000..c096261cd --- /dev/null +++ b/tdehtml/java/kjavaappletwidget.cpp @@ -0,0 +1,140 @@ +/* This file is part of the KDE project + * + * Copyright (C) 2000 Richard Moore <rich@kde.org> + * 2000 Wynn Wilkes <wynnw@caldera.com> + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public License + * along with this library; see the file COPYING.LIB. If not, write to + * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. + */ + +#include "kjavaappletwidget.h" +#include "kjavaappletserver.h" + +#include <twin.h> +#include <kdebug.h> +#include <klocale.h> + +#include <tqlabel.h> + + +// For future expansion +class KJavaAppletWidgetPrivate +{ +friend class KJavaAppletWidget; +private: + TQLabel* tmplabel; +}; + +int KJavaAppletWidget::appletCount = 0; + +KJavaAppletWidget::KJavaAppletWidget( TQWidget* parent, const char* name ) + : QXEmbed ( parent, name) +{ + setProtocol(QXEmbed::XPLAIN); + + m_applet = new KJavaApplet( this ); + d = new KJavaAppletWidgetPrivate; + m_kwm = new KWinModule( TQT_TQOBJECT(this) ); + + d->tmplabel = new TQLabel( this ); + d->tmplabel->setText( KJavaAppletServer::getAppletLabel() ); + d->tmplabel->setAlignment( Qt::AlignCenter | TQt::WordBreak ); + d->tmplabel->setFrameStyle( TQFrame::StyledPanel | TQFrame::Sunken ); + d->tmplabel->show(); + + m_swallowTitle.sprintf( "KJAS Applet - Ticket number %u", appletCount++ ); + m_applet->setWindowName( m_swallowTitle ); +} + +KJavaAppletWidget::~KJavaAppletWidget() +{ + delete m_applet; + delete d; +} + +void KJavaAppletWidget::showApplet() +{ + connect( m_kwm, TQT_SIGNAL( windowAdded( WId ) ), + this, TQT_SLOT( setWindow( WId ) ) ); + + m_kwm->doNotManage( m_swallowTitle ); + + //Now we send applet info to the applet server + if ( !m_applet->isCreated() ) + m_applet->create(); +} + +void KJavaAppletWidget::setWindow( WId w ) +{ + //make sure that this window has the right name, if so, embed it... + KWin::WindowInfo w_info = KWin::windowInfo( w ); + if ( m_swallowTitle == w_info.name() || + m_swallowTitle == w_info.visibleName() ) + { + kdDebug(6100) << "swallowing our window: " << m_swallowTitle + << ", window id = " << w << endl; + delete d->tmplabel; + d->tmplabel = 0; + + // disconnect from KWM events + disconnect( m_kwm, TQT_SIGNAL( windowAdded( WId ) ), + this, TQT_SLOT( setWindow( WId ) ) ); + + + embed( w ); + setFocus(); + } +} + +TQSize KJavaAppletWidget::sizeHint() const +{ + kdDebug(6100) << "KJavaAppletWidget::sizeHint()" << endl; + TQSize rval = QXEmbed::sizeHint(); + + if( rval.width() == 0 || rval.height() == 0 ) + { + if( width() != 0 && height() != 0 ) + { + rval = TQSize( width(), height() ); + } + } + + kdDebug(6100) << "returning: (" << rval.width() << ", " << rval.height() << ")" << endl; + + return rval; +} + +void KJavaAppletWidget::resize( int w, int h ) +{ + if( d->tmplabel ) + { + d->tmplabel->resize( w, h ); + m_applet->setSize( TQSize( w, h ) ); + } + + QXEmbed::resize( w, h ); +} + +void KJavaAppletWidget::showEvent (TQShowEvent * e) { + QXEmbed::showEvent(e); + if (!applet()->isCreated() && !applet()->appletClass().isEmpty()) { + // delayed showApplet + if (applet()->size().width() <= 0) + applet()->setSize (sizeHint()); + showApplet(); + } +} + +#include "kjavaappletwidget.moc" diff --git a/tdehtml/java/kjavaappletwidget.h b/tdehtml/java/kjavaappletwidget.h new file mode 100644 index 000000000..e84f96039 --- /dev/null +++ b/tdehtml/java/kjavaappletwidget.h @@ -0,0 +1,125 @@ +// -*- c++ -*- + +/* This file is part of the KDE project + * + * Copyright (C) 2000 Richard Moore <rich@kde.org> + * 2000 Wynn Wilkes <wynnw@caldera.com> + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public License + * along with this library; see the file COPYING.LIB. If not, write to + * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. + */ + +#ifndef KJAVAAPPLETWIDGET_H +#define KJAVAAPPLETWIDGET_H + +#include <tqwidget.h> +#ifndef Q_WS_QWS //FIXME(?) I don't think this is possible with Qt Embedded +#include "java/kjavaappletcontext.h" +#include "java/kjavaapplet.h" +#include <qxembed.h> +#include <twinmodule.h> + +/** + * @short A widget for displaying Java applets + * + * KJavaAppletWidget provides support for the inclusion of Java applets + * in Qt and KDE applications. To create an applet, you must first create + * a context object in which it will run. There can be several applets and + * contexts in operation at a given time, for example in a web browser there + * would be one context object for each web page. Applets in the same context + * can communicate with each other, applets in different contexts cannot. + * Once you have created a KJavaAppletContext, you can create as many + * applets in it as you want. + * + * Once you have created the applet widget, you should access the applet() method + * to call the various setXXX methods to configure the applet, + * They correspond to the HTML tags used to embed applets in a web page. + * Once the applet is configured, call the create() method to set things in motion. + * The applet is running when it first appears, but you can start or stop it + * when you like (for example if it scrolls off the screen). + * + * This widget works by using the KJavaAppletServer, which fires off a + * Java server process with which it communicates using the + * KDE Java Applet Server (KJAS) protocol over stdin and stdout. + * The applet windows are swallowed and attached to the TQWidget, but they are + * actually running in a different process. This has the advantage of robustness + * and reusability. The details of the communication are hidden from the user + * in the KJASAppletServer class. Normally only a single server process is used for + * all of the applets in a given application, this is all sorted automatically. + * The KJAS server is 100% pure Java, and should also prove useful for people + * wishing to add java support to other systems (for example a perl/Tk binding + * is perfectly feasible). All you need to do is implement the protocol and + * (optionally) swallow the applet windows. + * + * The applet support in KDE is still dependent on the KWin Window Manager. The + * applet swallowing will not work under other Window Managers. Hopefully this + * will be fixed in the future. + * + * For a description of the KJAS protocol, please see the KJAS_GRAMMAR.txt file. + * + * @author Richard J. Moore, rich@kde.org + * @author Wynn Wilkes, wynnw@caldera.com + */ + +class KJavaAppletWidgetPrivate; + +class KJavaAppletWidget : public QXEmbed +{ + Q_OBJECT +public: + KJavaAppletWidget( TQWidget* parent=0, const char* name=0 ); + + ~KJavaAppletWidget(); + + /** + * Returns a pointer to the KJavaApplet. Use this to + * configure the applet's parameters. You can also + * use it to start and stop the Applet. + */ + KJavaApplet* applet() { return m_applet; } + + /** + * Tells the AppletServer to create, initialize, and + * show the Applet. + */ + void showApplet(); + + TQSize sizeHint() const; + void resize( int, int ); + +protected slots: + /** + * This slot is called by KWin when new windows are added. We check + * to see if the window has the title we set. If so we embed it. + */ + void setWindow( WId w ); + +protected: + //The counter to generate ID's for the applets + static int appletCount; + void showEvent (TQShowEvent *); + +private: + KJavaAppletWidgetPrivate* d; + + KJavaApplet* m_applet; + KWinModule* m_kwm; + TQString m_swallowTitle; + +}; + +#endif +#endif // KJAVAAPPLETWIDGET_H + diff --git a/tdehtml/java/kjavadownloader.cpp b/tdehtml/java/kjavadownloader.cpp new file mode 100644 index 000000000..a0a8abdd2 --- /dev/null +++ b/tdehtml/java/kjavadownloader.cpp @@ -0,0 +1,298 @@ +/* This file is part of the KDE project + * + * Copyright (C) 2000 Richard Moore <rich@kde.org> + * 2000 Wynn Wilkes <wynnw@caldera.com> + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public License + * along with this library; see the file COPYING.LIB. If not, write to + * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. + */ + +#include "kjavadownloader.h" +#include "kjavaappletserver.h" + +#include <kurl.h> +#include <kio/job.h> +#include <kio/jobclasses.h> +#include <kdebug.h> +#include <tqfile.h> + +static const int DATA = 0; +static const int FINISHED = 1; +static const int ERRORCODE = 2; +static const int HEADERS = 3; +static const int REDIRECT = 4; +static const int MIMETYPE = 5; +static const int CONNECTED = 6; +static const int REQUESTDATA = 7; + +static const int KJAS_STOP = 0; +static const int KJAS_HOLD = 1; +static const int KJAS_RESUME = 2; + +KJavaTDEIOJob::~KJavaTDEIOJob() {} + +void KJavaTDEIOJob::data( const TQByteArray& ) +{ + kdError(6100) << "Job id mixup" << endl; +} + +//----------------------------------------------------------------------------- + +class KJavaDownloaderPrivate +{ +friend class KJavaDownloader; +public: + KJavaDownloaderPrivate() : responseCode(0), isfirstdata(true) {} + ~KJavaDownloaderPrivate() + { + delete url; + if (job) job->kill(); // TDEIO::Job::kill deletes itself + } +private: + int loaderID; + KURL* url; + TQByteArray file; + TDEIO::TransferJob* job; + int responseCode; + bool isfirstdata; +}; + + +KJavaDownloader::KJavaDownloader( int ID, const TQString& url ) +{ + kdDebug(6100) << "KJavaDownloader(" << ID << ") = " << url << endl; + + d = new KJavaDownloaderPrivate; + + d->loaderID = ID; + d->url = new KURL( url ); + + d->job = TDEIO::get( *d->url, false, false ); + d->job->addMetaData("PropagateHttpHeader", "true"); + connect( d->job, TQT_SIGNAL(data( TDEIO::Job*, const TQByteArray& )), + this, TQT_SLOT(slotData( TDEIO::Job*, const TQByteArray& )) ); + connect( d->job, TQT_SIGNAL(connected(TDEIO::Job*)), + this, TQT_SLOT(slotConnected(TDEIO::Job*))); + connect( d->job, TQT_SIGNAL(mimetype(TDEIO::Job*, const TQString&)), + this, TQT_SLOT(slotMimetype(TDEIO::Job*, const TQString&))); + connect( d->job, TQT_SIGNAL(result(TDEIO::Job*)), + this, TQT_SLOT(slotResult(TDEIO::Job*)) ); +} + +KJavaDownloader::~KJavaDownloader() +{ + delete d; +} + +void KJavaDownloader::slotData( TDEIO::Job*, const TQByteArray& qb ) +{ + //kdDebug(6100) << "slotData(" << d->loaderID << ")" << endl; + + KJavaAppletServer* server = KJavaAppletServer::allocateJavaServer(); + if (d->isfirstdata) { + TQString headers = d->job->queryMetaData("HTTP-Headers"); + if (!headers.isEmpty()) { + d->file.resize( headers.length() ); + memcpy( d->file.data(), headers.ascii(), headers.length() ); + server->sendURLData( d->loaderID, HEADERS, d->file ); + d->file.resize( 0 ); + } + d->isfirstdata = false; + } + if ( qb.size() ) + server->sendURLData( d->loaderID, DATA, qb ); + KJavaAppletServer::freeJavaServer(); +} + +void KJavaDownloader::slotConnected(TDEIO::Job*) +{ + kdDebug(6100) << "slave connected" << endl; + d->responseCode = d->job->error(); +} + +void KJavaDownloader::slotMimetype(TDEIO::Job*, const TQString & type) { + kdDebug(6100) << "slave mimetype " << type << endl; +} + +void KJavaDownloader::slotResult( TDEIO::Job* ) +{ + kdDebug(6100) << "slotResult(" << d->loaderID << ")" << endl; + + KJavaAppletServer* server = KJavaAppletServer::allocateJavaServer(); + if( d->job->error()) + { + kdDebug(6100) << "slave had an error = " << d->job->errorString() << endl; + int code = d->job->error(); + if (!code) + code = 404; + TQString codestr = TQString::number(code); + d->file.resize(codestr.length()); + memcpy( d->file.data(), codestr.ascii(), codestr.length() ); + kdDebug(6100) << "slave had an error = " << code << endl; + + server->sendURLData( d->loaderID, ERRORCODE, d->file ); + d->file.resize( 0 ); + } + else + { + server->sendURLData( d->loaderID, FINISHED, d->file ); + } + d->job = 0L; // signal TDEIO::Job::result deletes itself + server->removeDataJob( d->loaderID ); // will delete this + KJavaAppletServer::freeJavaServer(); +} + +void KJavaDownloader::jobCommand( int cmd ) +{ + if (!d->job) return; + switch (cmd) { + case KJAS_STOP: { + kdDebug(6100) << "jobCommand(" << d->loaderID << ") stop" << endl; + d->job->kill(); + d->job = 0L; // TDEIO::Job::kill deletes itself + KJavaAppletServer* server = KJavaAppletServer::allocateJavaServer(); + server->removeDataJob( d->loaderID ); // will delete this + KJavaAppletServer::freeJavaServer(); + break; + } + case KJAS_HOLD: + kdDebug(6100) << "jobCommand(" << d->loaderID << ") hold" << endl; + d->job->suspend(); + break; + case KJAS_RESUME: + kdDebug(6100) << "jobCommand(" << d->loaderID << ") resume" << endl; + d->job->resume(); + break; + } +} + +//----------------------------------------------------------------------------- + +class KJavaUploaderPrivate +{ +public: + KJavaUploaderPrivate() {} + ~KJavaUploaderPrivate() + { + delete url; + if (job) job->kill(); // TDEIO::Job::kill deletes itself + } + int loaderID; + KURL* url; + TQByteArray file; + TDEIO::TransferJob* job; + bool finished; +}; + +KJavaUploader::KJavaUploader( int ID, const TQString& url ) +{ + kdDebug(6100) << "KJavaUploader(" << ID << ") = " << url << endl; + + d = new KJavaUploaderPrivate; + + d->loaderID = ID; + d->url = new KURL( url ); + d->job = 0L; + d->finished = false; +} + +void KJavaUploader::start() +{ + kdDebug(6100) << "KJavaUploader::start(" << d->loaderID << ")" << endl; + KJavaAppletServer* server = KJavaAppletServer::allocateJavaServer(); + // create a suspended job + d->job = TDEIO::put( *d->url, -1, false, false, false ); + d->job->suspend(); + connect( d->job, TQT_SIGNAL(dataReq( TDEIO::Job*, TQByteArray& )), + this, TQT_SLOT(slotDataRequest( TDEIO::Job*, TQByteArray& )) ); + connect( d->job, TQT_SIGNAL(result(TDEIO::Job*)), + this, TQT_SLOT(slotResult(TDEIO::Job*)) ); + server->sendURLData( d->loaderID, CONNECTED, d->file ); + KJavaAppletServer::freeJavaServer(); +} + +KJavaUploader::~KJavaUploader() +{ + delete d; +} + +void KJavaUploader::slotDataRequest( TDEIO::Job*, TQByteArray& qb ) +{ + // send our data and suspend + kdDebug(6100) << "slotDataRequest(" << d->loaderID << ") finished:" << d->finished << endl; + qb.resize( d->file.size() ); + KJavaAppletServer* server = KJavaAppletServer::allocateJavaServer(); + if (d->file.size() == 0) { + d->job = 0L; // eof, job deletes itself + server->removeDataJob( d->loaderID ); // will delete this + } else { + memcpy( qb.data(), d->file.data(), d->file.size() ); + d->file.resize( 0 ); + if (!d->finished) { + server->sendURLData( d->loaderID, REQUESTDATA, d->file ); + d->job->suspend(); + } + } + KJavaAppletServer::freeJavaServer(); +} + +void KJavaUploader::data( const TQByteArray& qb ) +{ + kdDebug(6100) << "KJavaUploader::data(" << d->loaderID << ")" << endl; + d->file.resize( qb.size() ); + memcpy( d->file.data(), qb.data(), qb.size() ); + d->job->resume(); +} + +void KJavaUploader::slotResult( TDEIO::Job* ) +{ + kdDebug(6100) << "slotResult(" << d->loaderID << ") job:" << d->job << endl; + + if (!d->job) + return; + KJavaAppletServer* server = KJavaAppletServer::allocateJavaServer(); + if (d->job->error()) + { + int code = d->job->error(); + TQString codestr = TQString::number(code); + d->file.resize(codestr.length()); + memcpy( d->file.data(), codestr.ascii(), codestr.length() ); + kdDebug(6100) << "slave had an error " << code << ": " << d->job->errorString() << endl; + + server->sendURLData( d->loaderID, ERRORCODE, d->file ); + d->file.resize( 0 ); + } + else // shouldn't come here + kdError(6100) << "slotResult(" << d->loaderID << ") job:" << d->job << endl; + d->job = 0L; // signal TDEIO::Job::result deletes itself + server->removeDataJob( d->loaderID ); // will delete this + KJavaAppletServer::freeJavaServer(); +} + +void KJavaUploader::jobCommand( int cmd ) +{ + if (!d->job) return; + switch (cmd) { + case KJAS_STOP: { + kdDebug(6100) << "jobCommand(" << d->loaderID << ") stop" << endl; + d->finished = true; + if (d->job->isSuspended()) + d->job->resume(); + break; + } + } +} + +#include "kjavadownloader.moc" diff --git a/tdehtml/java/kjavadownloader.h b/tdehtml/java/kjavadownloader.h new file mode 100644 index 000000000..22690824c --- /dev/null +++ b/tdehtml/java/kjavadownloader.h @@ -0,0 +1,90 @@ +/* This file is part of the KDE project + * + * Copyright (C) 2000 Wynn Wilkes <wynnw@caldera.com> + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public License + * along with this library; see the file COPYING.LIB. If not, write to + * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. + */ + + +#ifndef KJAVADOWNLOADER_H +#define KJAVADOWNLOADER_H + +#include <tqobject.h> + +/** + * @short A class for handling downloads from KIO + * + * This class handles a TDEIO::get job and passes the data + * back to the AppletServer. + * + * @author Wynn Wilkes, wynnw@calderasystems.com + */ + +namespace TDEIO { + class Job; +} + +class KJavaDownloaderPrivate; +class KJavaUploaderPrivate; + +class KJavaTDEIOJob : public TQObject +{ +Q_OBJECT +public: + virtual ~KJavaTDEIOJob(); + virtual void jobCommand( int cmd ) = 0; + virtual void data( const TQByteArray& qb ); +}; + +class KJavaDownloader : public KJavaTDEIOJob +{ +Q_OBJECT + +public: + KJavaDownloader( int ID, const TQString& url ); + ~KJavaDownloader(); + + virtual void jobCommand( int cmd ); +protected slots: + void slotData( TDEIO::Job*, const TQByteArray& ); + void slotConnected( TDEIO::Job* ); + void slotMimetype( TDEIO::Job*, const TQString& ); + void slotResult( TDEIO::Job* ); + +private: + KJavaDownloaderPrivate* d; + +}; + +class KJavaUploader : public KJavaTDEIOJob +{ +Q_OBJECT + +public: + KJavaUploader( int ID, const TQString& url ); + ~KJavaUploader(); + + virtual void jobCommand( int cmd ); + virtual void data( const TQByteArray& qb ); + void start(); +protected slots: + void slotDataRequest( TDEIO::Job*, TQByteArray& ); + void slotResult( TDEIO::Job* ); +private: + KJavaUploaderPrivate* d; + +}; +#endif diff --git a/tdehtml/java/kjavaprocess.cpp b/tdehtml/java/kjavaprocess.cpp new file mode 100644 index 000000000..dbe80305e --- /dev/null +++ b/tdehtml/java/kjavaprocess.cpp @@ -0,0 +1,397 @@ +/* This file is part of the KDE project + * + * Copyright (C) 2000 Richard Moore <rich@kde.org> + * 2000 Wynn Wilkes <wynnw@caldera.com> + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public License + * along with this library; see the file COPYING.LIB. If not, write to + * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. + */ + +#include "kjavaprocess.h" + +#include <kdebug.h> +#include <kio/kprotocolmanager.h> + +#include <tqtextstream.h> +#include <tqmap.h> + +#include <config.h> + +#include <unistd.h> +#include <tqptrlist.h> + +class KJavaProcessPrivate +{ +friend class KJavaProcess; +private: + TQString jvmPath; + TQString classPath; + TQString mainClass; + TQString extraArgs; + TQString classArgs; + TQPtrList<TQByteArray> BufferList; + TQMap<TQString, TQString> systemProps; + bool processKilled; +}; + +KJavaProcess::KJavaProcess() : TDEProcess() +{ + d = new KJavaProcessPrivate; + d->BufferList.setAutoDelete( true ); + d->processKilled = false; + + javaProcess = this; //new TDEProcess(); + + connect( javaProcess, TQT_SIGNAL( wroteStdin( TDEProcess * ) ), + this, TQT_SLOT( slotWroteData() ) ); + connect( javaProcess, TQT_SIGNAL( receivedStdout( int, int& ) ), + this, TQT_SLOT( slotReceivedData(int, int&) ) ); + connect( javaProcess, TQT_SIGNAL( processExited (TDEProcess *) ), + this, TQT_SLOT( slotExited (TDEProcess *) ) ); + + d->jvmPath = "java"; + d->mainClass = "-help"; +} + +KJavaProcess::~KJavaProcess() +{ + if ( isRunning() ) + { + kdDebug(6100) << "stopping java process" << endl; + stopJava(); + } + + //delete javaProcess; + delete d; +} + +bool KJavaProcess::isRunning() +{ + return javaProcess->isRunning(); +} + +bool KJavaProcess::startJava() +{ + return invokeJVM(); +} + +void KJavaProcess::stopJava() +{ + killJVM(); +} + +void KJavaProcess::setJVMPath( const TQString& path ) +{ + d->jvmPath = path; +} + +void KJavaProcess::setClasspath( const TQString& classpath ) +{ + d->classPath = classpath; +} + +void KJavaProcess::setSystemProperty( const TQString& name, + const TQString& value ) +{ + d->systemProps.insert( name, value ); +} + +void KJavaProcess::setMainClass( const TQString& className ) +{ + d->mainClass = className; +} + +void KJavaProcess::setExtraArgs( const TQString& args ) +{ + d->extraArgs = args; +} + +void KJavaProcess::setClassArgs( const TQString& args ) +{ + d->classArgs = args; +} + +//Private Utility Functions used by the two send() methods +TQByteArray* KJavaProcess::addArgs( char cmd_code, const TQStringList& args ) +{ + //the buffer to store stuff, etc. + TQByteArray* const buff = new TQByteArray(); + TQTextOStream output( *buff ); + const char sep = 0; + + //make space for the command size: 8 characters... + const TQCString space( " " ); + output << space; + + //write command code + output << cmd_code; + + //store the arguments... + if( args.isEmpty() ) + { + output << sep; + } + else + { + TQStringList::ConstIterator it = args.begin(); + const TQStringList::ConstIterator itEnd = args.end(); + for( ; it != itEnd; ++it ) + { + if( !(*it).isEmpty() ) + { + output << (*it).local8Bit(); + } + output << sep; + } + } + + return buff; +} + +void KJavaProcess::storeSize( TQByteArray* buff ) +{ + const int size = buff->size() - 8; //subtract out the length of the size_str + const TQString size_str = TQString("%1").arg( size, 8 ); + kdDebug(6100) << "KJavaProcess::storeSize, size = " << size_str << endl; + + const char* size_ptr = size_str.latin1(); + for( int i = 0; i < 8; ++i ) + buff->at(i) = size_ptr[i]; +} + +void KJavaProcess::sendBuffer( TQByteArray* buff ) +{ + d->BufferList.append( buff ); + if( d->BufferList.count() == 1) + { + popBuffer(); + } +} + +void KJavaProcess::send( char cmd_code, const TQStringList& args ) +{ + if( isRunning() ) + { + TQByteArray* const buff = addArgs( cmd_code, args ); + storeSize( buff ); + kdDebug(6100) << "<KJavaProcess::send " << (int)cmd_code << endl; + sendBuffer( buff ); + } +} + +void KJavaProcess::send( char cmd_code, const TQStringList& args, + const TQByteArray& data ) +{ + if( isRunning() ) + { + kdDebug(6100) << "KJavaProcess::send, qbytearray is size = " << data.size() << endl; + + TQByteArray* const buff = addArgs( cmd_code, args ); + const int cur_size = buff->size(); + const int data_size = data.size(); + buff->resize( cur_size + data_size ); + memcpy( buff->data() + cur_size, data.data(), data_size ); + + storeSize( buff ); + sendBuffer( buff ); + } +} + +void KJavaProcess::popBuffer() +{ + TQByteArray* const buf = d->BufferList.first(); + if( buf ) + { +// DEBUG stuff... +// kdDebug(6100) << "Sending buffer to java, buffer = >>"; +// for( unsigned int i = 0; i < buf->size(); i++ ) +// { +// if( buf->at(i) == (char)0 ) +// kdDebug(6100) << "<SEP>"; +// else if( buf->at(i) > 0 && buf->at(i) < 10 ) +// kdDebug(6100) << "<CMD " << (int) buf->at(i) << ">"; +// else +// kdDebug(6100) << buf->at(i); +// } +// kdDebug(6100) << "<<" << endl; + + //write the data + if ( !javaProcess->writeStdin( buf->data(), + buf->size() ) ) + { + kdError(6100) << "Could not write command" << endl; + } + } +} + +void KJavaProcess::slotWroteData( ) +{ + //do this here- we can't free the data until we know it went through + d->BufferList.removeFirst(); //this should delete it since we setAutoDelete(true) + kdDebug(6100) << "slotWroteData " << d->BufferList.count() << endl; + + if ( !d->BufferList.isEmpty() ) + { + popBuffer(); + } +} + + +bool KJavaProcess::invokeJVM() +{ + + *javaProcess << d->jvmPath; + + if( !d->classPath.isEmpty() ) + { + *javaProcess << "-classpath"; + *javaProcess << d->classPath; + } + + //set the system properties, iterate through the qmap of system properties + TQMap<TQString,TQString>::ConstIterator it = d->systemProps.begin(); + const TQMap<TQString,TQString>::ConstIterator itEnd = d->systemProps.end(); + + for( ; it != itEnd; ++it ) + { + TQString currarg; + + if( !it.key().isEmpty() ) + { + currarg = "-D" + it.key(); + if( !it.data().isEmpty() ) + currarg += "=" + it.data(); + } + + if( !currarg.isEmpty() ) + *javaProcess << currarg; + } + + //load the extra user-defined arguments + if( !d->extraArgs.isEmpty() ) + { + // BUG HERE: if an argument contains space (-Dname="My name") + // this parsing will fail. Need more sophisticated parsing -- use KShell? + const TQStringList args = TQStringList::split( " ", d->extraArgs ); + TQStringList::ConstIterator it = args.begin(); + const TQStringList::ConstIterator itEnd = args.end(); + for ( ; it != itEnd; ++it ) + *javaProcess << *it; + } + + *javaProcess << d->mainClass; + + if ( !d->classArgs.isNull() ) + *javaProcess << d->classArgs; + + kdDebug(6100) << "Invoking JVM now...with arguments = " << endl; + TQString argStr; + TQTextOStream stream( &argStr ); + const TQValueList<TQCString> args = javaProcess->args(); + tqCopy( args.begin(), args.end(), TQTextOStreamIterator<TQCString>( stream, " " ) ); + kdDebug(6100) << argStr << endl; + + TDEProcess::Communication flags = (TDEProcess::Communication) + (TDEProcess::Stdin | TDEProcess::Stdout | + TDEProcess::NoRead); + + const bool rval = javaProcess->start( TDEProcess::NotifyOnExit, flags ); + if( rval ) + javaProcess->resume(); //start processing stdout on the java process + else + killJVM(); + + return rval; +} + +void KJavaProcess::killJVM() +{ + d->processKilled = true; + disconnect( javaProcess, TQT_SIGNAL( receivedStdout( int, int& ) ), + this, TQT_SLOT( slotReceivedData(int, int&) ) ); + javaProcess->kill(); +} + +void KJavaProcess::flushBuffers() +{ + while ( !d->BufferList.isEmpty() ) { + if (innot) + slotSendData(0); + else + d->BufferList.removeFirst(); //note: AutoDelete is true + } +} + +/* In this method, read one command and send it to the d->appletServer + * then return, so we don't block the event handling + */ +void KJavaProcess::slotReceivedData( int fd, int& len ) +{ + //read out the length of the message, + //read the message and send it to the applet server + char length[9] = { 0 }; + const int num_bytes = ::read( fd, length, 8 ); + if( !num_bytes ) + { + len = 0; + return; + } + if( num_bytes == -1 ) + { + kdError(6100) << "could not read 8 characters for the message length!!!!" << endl; + len = 0; + return; + } + + const TQString lengthstr( length ); + bool ok; + const int num_len = lengthstr.toInt( &ok ); + if( !ok ) + { + kdError(6100) << "could not parse length out of: " << lengthstr << endl; + len = num_bytes; + return; + } + + //now parse out the rest of the message. + char* const msg = new char[num_len]; + const int num_bytes_msg = ::read( fd, msg, num_len ); + if( num_bytes_msg == -1 || num_bytes_msg != num_len ) + { + kdError(6100) << "could not read the msg, num_bytes_msg = " << num_bytes_msg << endl; + delete[] msg; + len = num_bytes; + return; + } + + TQByteArray qb; + emit received( qb.duplicate( msg, num_len ) ); + delete[] msg; + len = num_bytes + num_bytes_msg; +} + +void KJavaProcess::slotExited( TDEProcess *process ) +{ + if (process == javaProcess) { + int status = -1; + if (!d->processKilled) { + status = javaProcess->exitStatus(); + } + kdDebug(6100) << "jvm exited with status " << status << endl; + emit exited(status); + } +} + +#include "kjavaprocess.moc" diff --git a/tdehtml/java/kjavaprocess.h b/tdehtml/java/kjavaprocess.h new file mode 100644 index 000000000..4768bc382 --- /dev/null +++ b/tdehtml/java/kjavaprocess.h @@ -0,0 +1,164 @@ +// -*- c++ -*- + +/* This file is part of the KDE project + * + * Copyright (C) 2000 Richard Moore <rich@kde.org> + * 2000 Wynn Wilkes <wynnw@caldera.com> + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public License + * along with this library; see the file COPYING.LIB. If not, write to + * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. + */ + +#ifndef KJAVAPROCESS_H +#define KJAVAPROCESS_H + +#include <kprocess.h> +#include <tqcstring.h> + +/** + * @short A class for invoking a Java VM + * + * This class is a general tool for invoking a Java interpreter. It allows you + * to specify some of the standard options that should be understood by all + * JVMs. + * + * @author Richard J. Moore, rich@kde.org + * @author Wynn Wilkes, wynnw@calderasystems.com + */ + +class KJavaProcessPrivate; +class KJavaProcess : public TDEProcess //QObject +{ +Q_OBJECT + +public: + /** + * Creates a process object, the process is NOT invoked at this point. + * You should first set the process's parameters, and then call startJava. + */ + KJavaProcess(); + virtual ~KJavaProcess(); + + /** + * Invoke the JVM with the parameters that have been set. The Java process + * will start after this call. + */ + bool startJava(); + + /** + * Stop the JVM (if it's running). + */ + void stopJava(); + + /** + * Returns the status of the java Process- true if it's ok, false if it has died. + * It calls TDEProcess::isRunning() + */ + bool isRunning(); + + /** + * Used to specify the path to the Java executable to be run. + */ + void setJVMPath( const TQString& path ); + + /** + * This will set the classpath the Java process will use. It's used as a the + * -cp command line option. It adds every jar file stored in $TDEDIRS/share/apps/kjava/ + * to the classpath, and then adds the $CLASSPATH environmental variable. This allows + * users to simply drop the JSSE (Java Secure Sockets Extension classes into that directory + * without having to modify the jvm configuration files. + */ + void setClasspath( const TQString& classpath ); + + /** + * Set a property on the java command line as -Dname=value, or -Dname if value is TQString::null. + * For example, you could call setSystemProperty( "kjas.debug", "" ) to set the kjas.debug property. + */ + void setSystemProperty( const TQString& name, const TQString& value ); + + /** + * The class to be called when startJava() is called. + */ + void setMainClass( const TQString& clazzName ); + + /** + * Extra flags passed to the JVM. + */ + void setExtraArgs( const TQString& args ); + + /** + * Arguments passed to the main class. They will be very last in the java + * command line, after the main class. + */ + void setClassArgs( const TQString& classArgs ); + + /** + * Sends a command to the KJAS Applet Server by building a QByteArray + * out of the data, and then writes it standard out. + */ + void send( char cmd_code, const TQStringList& args ); + + /** + * Sends a command to the KJAS Applet Server by building a QByteArray + * out of the data, and then writes it standard out. It adds each QString + * in the arg list, and then adds the data array. + */ + void send( char cmd_code, const TQStringList& args, const TQByteArray& data ); + + /** + * Writes all pending data to JVM + **/ + void flushBuffers(); + +protected slots: + /** + * This slot is called whenever something is written to stdin of the process. + * It's called again to make sure we keep emptying out the buffer that contains + * the messages we need send. + */ + void slotWroteData(); + + /** + * This slot is called when the Java Process writes to standard out. We then + * process the data from the file descriptor that is passed to us and send the + * command to the AppletServer + */ + void slotReceivedData( int, int& ); + /** + * This slot is called when the Java Process exited. + */ + void slotExited( TDEProcess *process ); + +protected: + virtual bool invokeJVM(); + virtual void killJVM(); + + TQByteArray* addArgs( char cmd_code, const TQStringList& args ); + void popBuffer(); + void sendBuffer( TQByteArray* buff ); + void storeSize( TQByteArray* buff ); + + TDEProcess* javaProcess; + +signals: + void received( const TQByteArray& ); + void exited( int status ); + +private: + KJavaProcessPrivate *d; + +}; + +#endif // KJAVAPROCESS_H diff --git a/tdehtml/java/kqeventutil.cpp b/tdehtml/java/kqeventutil.cpp new file mode 100644 index 000000000..ff15e97da --- /dev/null +++ b/tdehtml/java/kqeventutil.cpp @@ -0,0 +1,200 @@ +// -*- c++ -*- +/* This file is part of the KDE project + * + * Copyright (C) 2000 Wynn Wilkes <wynnw@caldera.com> + * 2002 Till Krech <till@snafu.de> + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public License + * along with this library; see the file COPYING.LIB. If not, write to + * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. + */ +#include <tqevent.h> +#include "kqeventutil.h" + +TQString KQEventUtil::getQtEventName( TQEvent* e ) +{ + TQString s; + + switch( e->type() ) + { + case TQEvent::None: + s = "None"; + break; + case TQEvent::Timer: + s = "Timer"; + break; + case TQEvent::MouseButtonPress: + s = "MouseButtonPress"; + break; + case TQEvent::MouseButtonRelease: + s = "MouseButtonRelease"; + break; + case TQEvent::MouseButtonDblClick: + s = "MouseButtonClick"; + break; + case TQEvent::MouseMove: + s = "MouseMove"; + break; + case TQEvent::KeyPress: + s = "KeyPress"; + break; + case TQEvent::KeyRelease: + s = "KeyRelease"; + break; + case TQEvent::FocusIn: + s = "FocusIn"; + break; + case TQEvent::FocusOut: + s = "FocusOut"; + break; + case TQEvent::Enter: + s = "Enter"; + break; + case TQEvent::Leave: + s = "Leave"; + break; + case TQEvent::Paint: + s = "Paint"; + break; + case TQEvent::Move: + s = "Move"; + break; + case TQEvent::Resize: + s = "Resize"; + break; + case TQEvent::Create: + s = "Create"; + break; + case TQEvent::Destroy: + s = "Destroy"; + break; + case TQEvent::Show: + s = "Show"; + break; + case TQEvent::Hide: + s = "Hide"; + break; + case TQEvent::Close: + s = "Close"; + break; + case TQEvent::Quit: + s = "Quit"; + break; + case TQEvent::Reparent: + s = "Reparent"; + break; + case TQEvent::ShowMinimized: + s = "ShowMinimized"; + break; + case TQEvent::ShowNormal: + s = "ShowNormal"; + break; + case TQEvent::WindowActivate: + s = "WindowActivate"; + break; + case TQEvent::WindowDeactivate: + s = "WindowDeactivate"; + break; + case TQEvent::ShowToParent: + s = "ShowToParent"; + break; + case TQEvent::HideToParent: + s = "HideToParent"; + break; + case TQEvent::ShowMaximized: + s = "ShowMaximized"; + break; + case TQEvent::Accel: + s = "Accel"; + break; + case TQEvent::Wheel: + s = "Wheel"; + break; + case TQEvent::AccelAvailable: + s = "AccelAvailable"; + break; + case TQEvent::CaptionChange: + s = "CaptionChange"; + break; + case TQEvent::IconChange: + s = "IconChange"; + break; + case TQEvent::ParentFontChange: + s = "ParentFontChange"; + break; + case TQEvent::ApplicationFontChange: + s = "ApplicationFontChange"; + break; + case TQEvent::ParentPaletteChange: + s = "ParentPaletteChange"; + break; + case TQEvent::ApplicationPaletteChange: + s = "ApplicationPaletteChange"; + break; + case TQEvent::Clipboard: + s = "Clipboard"; + break; + case TQEvent::Speech: + s = "Speech"; + break; + case TQEvent::SockAct: + s = "SockAct"; + break; + case TQEvent::AccelOverride: + s = "AccelOverride"; + break; + case TQEvent::DragEnter: + s = "DragEnter"; + break; + case TQEvent::DragMove: + s = "DragMove"; + break; + case TQEvent::DragLeave: + s = "DragLeave"; + break; + case TQEvent::Drop: + s = "Drop"; + break; + case TQEvent::DragResponse: + s = "DragResponse"; + break; + case TQEvent::ChildInserted: + s = "ChildInserted"; + break; + case TQEvent::ChildRemoved: + s = "ChildRemoved"; + break; + case TQEvent::LayoutHint: + s = "LayoutHint"; + break; + case TQEvent::ShowWindowRequest: + s = "ShowWindowRequest"; + break; + case TQEvent::ActivateControl: + s = "ActivateControl"; + break; + case TQEvent::DeactivateControl: + s = "DeactivateControl"; + break; + case TQEvent::User: + s = "User Event"; + break; + + default: + s = "Undefined Event, value = " + TQString::number( e->type() ); + break; + } + + return s; +} diff --git a/tdehtml/java/kqeventutil.h b/tdehtml/java/kqeventutil.h new file mode 100644 index 000000000..c7ec19bf0 --- /dev/null +++ b/tdehtml/java/kqeventutil.h @@ -0,0 +1,34 @@ +// -*- c++ -*- +/* This file is part of the KDE project + * + * Copyright (C) 2000 Wynn Wilkes <wynnw@caldera.com> + * 2002 Till Krech <till@snafu.de> + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public License + * along with this library; see the file COPYING.LIB. If not, write to + * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. + */ + +#ifndef KQEVENTUTIL_H +#define KQEVENTUTIL_H + +#include <tqstring.h> +class TQEvent; + +class KQEventUtil { + public: + static TQString getQtEventName(TQEvent *e); +}; + +#endif diff --git a/tdehtml/java/kxeventutil.cpp b/tdehtml/java/kxeventutil.cpp new file mode 100644 index 000000000..9afa5a5ac --- /dev/null +++ b/tdehtml/java/kxeventutil.cpp @@ -0,0 +1,408 @@ +// -*- c++ -*- +/* This file is part of the KDE project + * + * Copyright (C) 2002 Till Krech <till@snafu.de> + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public License + * along with this library; see the file COPYING.LIB. If not, write to + * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. + */ + +#include <X11/X.h> +#include <X11/Xlib.h> +#include <X11/Xutil.h> +#include <X11/Xatom.h> +#include <tqstring.h> +#include <tqstringlist.h> + +#include "kxeventutil.h" + +TQString KXEventUtil::getXAnyEventInfo(XEvent *xevent) { + XAnyEvent *e = &xevent->xany; + TQString winname("window"); + switch (e->type) { + case GraphicsExpose: + case NoExpose: + winname="drawable"; + break; + case CreateNotify: + case ConfigureRequest: + winname="parent"; + break; + case DestroyNotify: + case ConfigureNotify: + case MapNotify: + case ReparentNotify: + case UnmapNotify: + winname="event"; + default: + break; + } + TQString s("serial=%1 send_event=%2 display=0x%3 %4=%5"); + return + s.arg(e->serial) + .arg(e->send_event) + .arg((long)e->display, 0, 16) + .arg(winname) + .arg(e->window); +} +TQString KXEventUtil::getXButtonEventInfo(XEvent *xevent) { + XButtonEvent *e = &xevent->xbutton; + TQString s("root=%1 subwindow=%2 time=%3 x=%4 y=%5 x_root=%6 y_root=%7 state=%8 button=%9"); + TQString t(" same_screen=%1"); + return + s.arg(e->root) + .arg(e->subwindow) + .arg(e->time) + .arg(e->x) + .arg(e->y) + .arg(e->x_root) + .arg(e->y_root) + .arg(e->state) + .arg(e->button) + +t.arg(e->same_screen); +} + +TQString KXEventUtil::getXKeyEventInfo(XEvent *xevent) { + XKeyEvent *e = &xevent->xkey; + TQString s("root=%1 subwindow=%2 time=%3 x=%4 y=%5 x_root=%6 y_root=%7 state=%8 keycode=%9"); + TQString t(" same_screen=%1"); + return + s.arg(e->root) + .arg(e->subwindow) + .arg(e->time) + .arg(e->x) + .arg(e->y) + .arg(e->x_root) + .arg(e->y_root) + .arg(e->state) + .arg(e->keycode) + +t.arg(e->same_screen); +} + +TQString KXEventUtil::getXMotionEventInfo(XEvent *xevent) { + XMotionEvent *e = &xevent->xmotion; + TQString s("root=%1 subwindow=%2 time=%3 x=%4 y=%5 x_root=%6 y_root=%7 state=%8 is_hint=%9"); + TQString t(" same_screen=%1"); + return + s.arg(e->root) + .arg(e->subwindow) + .arg(e->time) + .arg(e->x) + .arg(e->y) + .arg(e->x_root) + .arg(e->y_root) + .arg(e->state) + .arg(e->is_hint) + +t.arg(e->same_screen); +} +TQString KXEventUtil::getXCrossingEventInfo(XEvent *xevent) { + XCrossingEvent *e = &xevent->xcrossing; + TQString ms, ds; + switch (e->mode) { + case NotifyNormal: ms = "NotifyNormal"; break; + case NotifyGrab: ms = "NotifyGrab"; break; + case NotifyUngrab: ms = "NotifyUngrab"; break; + default: ms="?"; + } + switch (e->detail) { + case NotifyAncestor: ds = "NotifyAncestor"; break; + case NotifyVirtual: ds = "NotifyVirtual"; break; + case NotifyInferior: ds = "NotifyInferior"; break; + case NotifyNonlinear: ds = "NotifyNonlinear"; break; + case NotifyNonlinearVirtual: ds = "NotifyNonlinearVirtual"; break; + default: ds="?"; + } + + TQString s("root=%1 subwindow=%2 time=%3 x=%4 y=%5 x_root=%6 y_root=%7 mode=%8=%9 "); + TQString t("detail=%1=%2 same_screen=%3 focus=%4 state=%5"); + return + s.arg(e->root) + .arg(e->subwindow) + .arg(e->time) + .arg(e->x) + .arg(e->y) + .arg(e->x_root) + .arg(e->y_root) + .arg(e->mode).arg(ms) + + + t.arg(e->detail).arg(ds) + .arg(e->same_screen) + .arg(e->focus) + .arg(e->state); +} +TQString KXEventUtil::getXFocusChangeEventInfo(XEvent *xevent) { + XFocusChangeEvent *e = &xevent->xfocus; + TQString s("mode=%1 detail=%2"); + return + s.arg(e->mode) + .arg(e->detail); +} +TQString KXEventUtil::getXExposeEventInfo(XEvent *xevent) { + XExposeEvent *e = &xevent->xexpose; + TQString s("x=%1 y=%2 width=%3 height=%4 count=%5"); + return + s.arg(e->x) + .arg(e->y) + .arg(e->width) + .arg(e->height) + .arg(e->count); +} + + + +TQString KXEventUtil::getXGraphicsExposeEventInfo(XEvent *xevent) { + XGraphicsExposeEvent *e = &xevent->xgraphicsexpose; + TQString s("x=%1 y=%2 width=%3 height=%4 count=%5 major_code=%6 minor_code=%7"); + return + s.arg(e->x) + .arg(e->y) + .arg(e->width) + .arg(e->height) + .arg(e->count) + .arg(e->major_code) + .arg(e->minor_code); +} +TQString KXEventUtil::getXNoExposeEventInfo(XEvent *xevent) { + XNoExposeEvent *e = &xevent->xnoexpose; + TQString s("major_code=%1 minor_code=%2"); + return + s.arg(e->major_code) + .arg(e->minor_code); +} + + +TQString KXEventUtil::getXCreateWindowEventInfo(XEvent *xevent) { + XCreateWindowEvent *e = &xevent->xcreatewindow; + TQString s("window=%1 x=%2 y=%3 width=%4 height=%5 border_width=%6 override_redirect=%7"); + return + s.arg(e->window) + .arg(e->x) + .arg(e->y) + .arg(e->width) + .arg(e->height) + .arg(e->border_width) + .arg(e->override_redirect); +} + +TQString KXEventUtil::getXDestroyWindowEventInfo(XEvent *xevent) { + XDestroyWindowEvent *e = &xevent->xdestroywindow; + TQString s("window=%1"); + return + s.arg(e->window); +} +TQString KXEventUtil::getXMapEventInfo(XEvent *xevent) { + XMapEvent *e = &xevent->xmap; + TQString s("window=%1 override_redirect=%2"); + return + s.arg(e->window) + .arg(e->override_redirect); +} +TQString KXEventUtil::getXMappingEventInfo(XEvent *xevent) { + XMappingEvent *e = &xevent->xmapping; + TQString s("request=%1 first_keycode=%2 count=%3"); + return + s.arg(e->request) + .arg(e->first_keycode) + .arg(e->count); +} +TQString KXEventUtil::getXReparentEventInfo(XEvent *xevent) { + XReparentEvent *e = &xevent->xreparent; + TQString s("window=%1 parent=%2 x=%3 y=%4"); + return + s.arg(e->window) + .arg(e->parent) + .arg(e->x) + .arg(e->y); +} +TQString KXEventUtil::getXUnmapEventInfo(XEvent *xevent) { + XUnmapEvent *e = &xevent->xunmap; + TQString s("window=%1 from_configure=%2"); + return + s.arg(e->window) + .arg(e->from_configure); +} + +TQString KXEventUtil::getXConfigureEventInfo(XEvent *xevent) { + XConfigureEvent *e = &xevent->xconfigure; + TQString s("window=%1 x=%2 y=%2 width=%3 height=%4 border_width=%5 above=%6 override_redirect=%7"); + return + s.arg(e->window) + .arg(e->x).arg(e->y) + .arg(e->width).arg(e->height) + .arg(e->border_width) + .arg(e->above) + .arg(e->override_redirect); +} + +TQString KXEventUtil::getXConfigureRequestEventInfo(XEvent *xevent) { + XConfigureRequestEvent *e = &xevent->xconfigurerequest; + unsigned vm = e->value_mask; + TQStringList vml; + if (vm & CWX) vml.append("CWX"); + if (vm & CWY) vml.append("CWY"); + if (vm & CWWidth) vml.append("CWWidth"); + if (vm & CWHeight) vml.append("CWHeight"); + if (vm & CWBorderWidth) vml.append("CWBorderWidth"); + if (vm & CWSibling) vml.append("CWSibling"); + if (vm & CWStackMode) vml.append("CWStackMode"); + TQString vms = vml.join("|"); + TQString s("window=%1 x=%2 y=%2 width=%3 height=%4 border_width=%5 above=%6 detail=%7 value_mask=0x%8=%9"); + return + s.arg(e->window) + .arg(e->x).arg(e->y) + .arg(e->width).arg(e->height) + .arg(e->border_width) + .arg(e->above) + .arg(e->detail) + .arg(e->value_mask, 0, 16) + .arg(vms); +} +TQString KXEventUtil::getX11EventInfo( XEvent* e ) +{ + TQString anyInfo = getXAnyEventInfo(e); + TQString info = ""; + TQString s; + switch( e->type ) + { + case KeyPress: + s = "KeyPress"; + info = getXKeyEventInfo(e); + break; + case KeyRelease: + s = "KeyRelease"; + info = getXKeyEventInfo(e); + break; + case ButtonPress: + s = "ButtonPress"; + info = getXButtonEventInfo(e); + break; + case ButtonRelease: + s = "ButtonRelease"; + info = getXButtonEventInfo(e); + break; + case MotionNotify: + s = "MotionNotify"; + info = getXMotionEventInfo(e); + break; + case EnterNotify: + s = "EnterNotify"; + info = getXCrossingEventInfo(e); + break; + case LeaveNotify: + s = "LeaveNotify"; + info = getXCrossingEventInfo(e); + break; + case FocusIn: + s = "FocusIn"; + info = getXFocusChangeEventInfo(e); + break; + case FocusOut: + s = "FocusOut"; + info = getXFocusChangeEventInfo(e); + break; + case KeymapNotify: + s = "KeymapNotify"; + break; + case Expose: + s = "Expose"; + info = getXExposeEventInfo(e); + break; + case GraphicsExpose: + s = "GraphicsExpose"; + info = getXGraphicsExposeEventInfo(e); + break; + case NoExpose: + info = getXNoExposeEventInfo(e); + s = "NoExpose"; + break; + case VisibilityNotify: + s = "VisibilityNotify"; + break; + case CreateNotify: + s = "CreateNotify"; + info = getXCreateWindowEventInfo(e); + break; + case DestroyNotify: + s = "DestroyNotify"; + info = getXDestroyWindowEventInfo(e); + break; + case UnmapNotify: + s = "UnmapNotify"; + info = getXUnmapEventInfo(e); + break; + case MapNotify: + s = "MapNotify"; + info = getXMapEventInfo(e); + break; + case MapRequest: + s = "MapRequest"; + break; + case ReparentNotify: + s = "ReparentNotify"; + info = getXReparentEventInfo(e); + break; + case ConfigureNotify: + s = "ConfigureNotify"; + info = getXConfigureEventInfo(e); + break; + case ConfigureRequest: + s = "ConfigureRequest"; + info = getXConfigureRequestEventInfo(e); + break; + case GravityNotify: + s = "GravityNotify"; + break; + case ResizeRequest: + s = "ResizeRequest"; + break; + case CirculateNotify: + s = "CirculateNofify"; + break; + case CirculateRequest: + s = "CirculateRequest"; + break; + case PropertyNotify: + s = "PropertyNotify"; + break; + case SelectionClear: + s = "SelectionClear"; + break; + case SelectionRequest: + s = "SelectionRequest"; + break; + case SelectionNotify: + s = "SelectionNotify"; + break; + case ColormapNotify: + s = "ColormapNotify"; + break; + case ClientMessage: + s = "ClientMessage"; + break; + case MappingNotify: + s = "MappingNotify"; + info = getXMappingEventInfo(e); + break; + case LASTEvent: + s = "LASTEvent"; + break; + + default: + s = "Undefined"; + break; + } + + return s + " " + anyInfo + " " + info; +} diff --git a/tdehtml/java/kxeventutil.h b/tdehtml/java/kxeventutil.h new file mode 100644 index 000000000..6eb0bf14b --- /dev/null +++ b/tdehtml/java/kxeventutil.h @@ -0,0 +1,51 @@ +// -*- c++ -*- +/* This file is part of the KDE project + * + * Copyright (C) 2002 Till Krech <till@snafu.de> + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public License + * along with this library; see the file COPYING.LIB. If not, write to + * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. + */ +#ifndef KXEVENTUTIL_H +#define KXEVENTUTIL_H + +#include <X11/X.h> +#include <X11/Xlib.h> +#include <tqstring.h> + +class KXEventUtil { + public: + static TQString getXEventName(XEvent *e); + static TQString getXAnyEventInfo(XEvent *xevent); + static TQString getXButtonEventInfo(XEvent *xevent); + static TQString getXKeyEventInfo(XEvent *xevent); + static TQString getXMotionEventInfo(XEvent *xevent); + static TQString getXCrossingEventInfo(XEvent *xevent); + static TQString getXFocusChangeEventInfo(XEvent *xevent); + static TQString getXExposeEventInfo(XEvent *xevent); + static TQString getXGraphicsExposeEventInfo(XEvent *xevent); + static TQString getXNoExposeEventInfo(XEvent *xevent); + static TQString getXCreateWindowEventInfo(XEvent *xevent); + static TQString getXDestroyWindowEventInfo(XEvent *xevent); + static TQString getXMapEventInfo(XEvent *xevent); + static TQString getXMappingEventInfo(XEvent *xevent); + static TQString getXReparentEventInfo(XEvent *xevent); + static TQString getXUnmapEventInfo(XEvent *xevent); + static TQString getXConfigureEventInfo(XEvent *xevent); + static TQString getXConfigureRequestEventInfo(XEvent *xevent); + static TQString getX11EventInfo( XEvent* e ); +}; + +#endif diff --git a/tdehtml/java/make-jar b/tdehtml/java/make-jar new file mode 100755 index 000000000..a817ec1f3 --- /dev/null +++ b/tdehtml/java/make-jar @@ -0,0 +1,12 @@ +#!/bin/sh +# very simple shell script to compile the java +# sources and generate the jar file +set -e # exit on error +set -x # be verbose +rm -rf java-build-dir/* +mkdir -p java-build-dir/images +cp images/*.gif images/*.png java-build-dir/images/ +pwd=`pwd`; +javac -d java-build-dir -deprecation -target 1.2 `find org/kde netscape -name '*.java'` \ + && cd java-build-dir && jar c0vf $pwd/kjava.jar images `find org/kde netscape -name *.class` + diff --git a/tdehtml/java/netscape/javascript/JSException.java b/tdehtml/java/netscape/javascript/JSException.java new file mode 100644 index 000000000..222033e7a --- /dev/null +++ b/tdehtml/java/netscape/javascript/JSException.java @@ -0,0 +1,20 @@ +package netscape.javascript; + +public class JSException extends Exception { + public JSException() {} + public JSException(String s) { + super(s); + } + public JSException(String s, String fn, int ln, String src, int ti) { + super(s); + filename = new String(fn); + linenumber = ln; + source = src; + tokenindex = ti; + } + private String filename = null; + private int linenumber; + private String source = null; + private int tokenindex; +} + diff --git a/tdehtml/java/netscape/javascript/JSObject.java b/tdehtml/java/netscape/javascript/JSObject.java new file mode 100644 index 000000000..f103d90c8 --- /dev/null +++ b/tdehtml/java/netscape/javascript/JSObject.java @@ -0,0 +1,21 @@ +package netscape.javascript; + +import java.applet.Applet; + +public abstract class JSObject extends Object { + protected JSObject() + { + } + public abstract Object call(String function, Object[] arguments) throws JSException; + public abstract Object eval(String script) throws JSException; + public abstract Object getMember(String name) throws JSException; + public abstract void setMember(String name, Object o) throws JSException; + public abstract void removeMember(String name) throws JSException; + public abstract Object getSlot(int index) throws JSException; + public abstract void setSlot(int index, Object o) throws JSException; + public static JSObject getWindow(Applet applet) throws JSException + { + return org.kde.javascript.JSObject.getWindow(applet, 0); + } +} + diff --git a/tdehtml/java/netscape/plugin/Plugin.java b/tdehtml/java/netscape/plugin/Plugin.java new file mode 100644 index 000000000..c7be0e542 --- /dev/null +++ b/tdehtml/java/netscape/plugin/Plugin.java @@ -0,0 +1,28 @@ +package netscape.plugin; + +import netscape.javascript.*; + +public class Plugin { + + public Plugin() { + System.out.println("Plugin.Plugin"); + } + public JSObject getWindow() throws JSException { + System.out.println("Plugin.getWindow"); + return JSObject.getWindow(null); + } + public void destroy() { + System.out.println("Plugin.destroy"); + } + public int getPeer() { + System.out.println("Plugin.getPeer"); + return 0; + } + public void init() { + System.out.println("Plugin.init"); + } + public boolean isActive() { + System.out.println("Plugin.isActive"); + return true; + } +} diff --git a/tdehtml/java/netscape/security/ForbiddenTargetException.java b/tdehtml/java/netscape/security/ForbiddenTargetException.java new file mode 100644 index 000000000..27879d05b --- /dev/null +++ b/tdehtml/java/netscape/security/ForbiddenTargetException.java @@ -0,0 +1,10 @@ +package netscape.security; +public class ForbiddenTargetException extends RuntimeException { + public ForbiddenTargetException() + { + } + public ForbiddenTargetException(String message) + { + super(message); + } +} diff --git a/tdehtml/java/netscape/security/Principal.java b/tdehtml/java/netscape/security/Principal.java new file mode 100644 index 000000000..1f93a8293 --- /dev/null +++ b/tdehtml/java/netscape/security/Principal.java @@ -0,0 +1,4 @@ +package netscape.security; + +public class Principal { +} \ No newline at end of file diff --git a/tdehtml/java/netscape/security/PrivilegeManager.java b/tdehtml/java/netscape/security/PrivilegeManager.java new file mode 100644 index 000000000..c6555eaa0 --- /dev/null +++ b/tdehtml/java/netscape/security/PrivilegeManager.java @@ -0,0 +1,109 @@ +package netscape.security; + +public class PrivilegeManager extends Object { + public static final int PROPER_SUBSET = 1; + public static final int EQUAL = 2; + public static final int NO_SUBSET = 3; + public static final int SIGNED_APPLET_DBNAME = 4; + public static final int TEMP_FILENAME = 5; + + private static PrivilegeManager thePrivilegeManager = null; + + protected PrivilegeManager() + { + } + public void checkPrivilegeEnabled(netscape.security.Target target) throws netscape.security.ForbiddenTargetException + { + } + public void checkPrivilegeEnabled(netscape.security.Target target, Object o) throws netscape.security.ForbiddenTargetException + { + } + public static void enablePrivilege(String privilegeString) throws netscape.security.ForbiddenTargetException + { + } + public void enablePrivilege(netscape.security.Target target) throws netscape.security.ForbiddenTargetException + { + } + public void enablePrivilege(netscape.security.Target target, netscape.security.Principal principal) throws netscape.security.ForbiddenTargetException + { + } + public void enablePrivilege(netscape.security.Target target, netscape.security.Principal principal, Object o) throws netscape.security.ForbiddenTargetException + { + } + public void revertPrivilege(netscape.security.Target target) + { + } + public static void revertPrivilege(String privilegeString) + { + } + public void disablePrivilege(netscape.security.Target target) + { + } + public void disablePrivilege(String privilegeString) + { + } + public static void checkPrivilegeGranted(String privilegeString) throws netscape.security.ForbiddenTargetException + { + } + public void checkPrivilegeGranted(netscape.security.Target target) throws netscape.security.ForbiddenTargetException + { + } + public void checkPrivilegeGranted(netscape.security.Target target, Object o) throws netscape.security.ForbiddenTargetException + { + } + public void checkPrivilegeGranted(netscape.security.Target target, netscape.security.Principal principal, Object o) throws netscape.security.ForbiddenTargetException + { + } + public boolean isCalledByPrincipal(netscape.security.Principal principal, int dontknow) + { + return false; + } + public boolean isCalledByPrincipal(netscape.security.Principal principal) + { + return false; + } + public static netscape.security.Principal getSystemPrincipal() + { + return null; + } + public static netscape.security.PrivilegeManager getPrivilegeManager() + { + if (thePrivilegeManager == null) { + thePrivilegeManager = new PrivilegeManager(); + } + return thePrivilegeManager; + } + public boolean hasPrincipal(Class cl, netscape.security.Principal principal) + { + return true; + } + public int comparePrincipalArray(netscape.security.Principal[] a, netscape.security.Principal[] b) + { + return 1; + } + public boolean checkMatchPrincipal(Class cl, int dontknow) + { + return true; + } + public boolean checkMatchPrincipal(netscape.security.Principal principal, int dontknow) + { + return true; + } + public boolean checkMatchPrincipal(Class cl) + { + return true; + } + public boolean checkMatchPrincipalAlways() + { + return true; + } + public netscape.security.Principal[] getClassPrincipalsFromStack(int n) + { + return null; + } + /* + public netscape.security.PrivilegeTable getPrivilegeTableFromStack(); + { + } + */ +} diff --git a/tdehtml/java/netscape/security/Target.java b/tdehtml/java/netscape/security/Target.java new file mode 100644 index 000000000..8b50040b5 --- /dev/null +++ b/tdehtml/java/netscape/security/Target.java @@ -0,0 +1,4 @@ +package netscape.security; + +public class Target { +} \ No newline at end of file diff --git a/tdehtml/java/org/kde/javascript/JSObject.java b/tdehtml/java/org/kde/javascript/JSObject.java new file mode 100644 index 000000000..11e7f9f99 --- /dev/null +++ b/tdehtml/java/org/kde/javascript/JSObject.java @@ -0,0 +1,183 @@ +package org.kde.javascript; + +import java.applet.Applet; +import org.kde.kjas.server.KJASAppletContext; +import org.kde.kjas.server.Main; + +public class JSObject extends netscape.javascript.JSObject { + public String returnvalue = null; + public Thread thread; + + private String jsobject; + private int id; + private Applet applet; + private String appletID = null; + + /* JavaScript code: + * __lc=[[JS objects],call func(index,script,appletname,isglobal)] + */ + private final static String decls = "if(!window.__lc) window.__lc=[[window],function(i,s,a,g){var v;var len=window.__lc[0].length;if(i>=len)v='E unknown object';else{var r;try{r=eval((g?'':'window.__lc[0][i]')+s);}catch(e){v='E '+e;r='E ';}finally{var t=typeof r;if(t=='undefined')v='V ';else if(t=='number')v='N '+r;else if(t=='string'){if(r!='E ')v='S '+r;}else{window.__lc[0][len]=r;v=''+len+' '+(r==window.__lc?'[array]':r);}}}a.__lc_ret=v},0]"; + + public JSObject(Applet a, String name, int _id) { + Main.info("JSObject.ctor: " + name); + jsobject = new String(name); + applet = a; + id = _id; + KJASAppletContext kc = (KJASAppletContext)applet.getAppletContext(); + appletID = kc.getAppletID(a); + if (id == 0) { + kc.evaluateJavaScript(decls, appletID, null); + } + } + + int getId() { + return id; + } + + private String escapeString(String string) { + StringBuffer sb = new StringBuffer(); + int idx = 0; + boolean cr = false; + char [] chars = string.toCharArray(); + while (idx < chars.length) { + if (cr && chars[idx] != '\n') { + cr = false; + sb.append("\\n"); + } + switch (chars[idx]) { + case '\\': + sb.append("\\\\"); + break; + case '"': + sb.append("\\\""); + break; + case '\n': + cr = false; + sb.append("\\n"); + break; + case '\r': + cr = true; + break; + default: + sb.append(chars[idx]); + } + idx++; + } + if (cr) + sb.append("\\n"); + return sb.toString(); + } + + private Object evaluate(String script, boolean global) throws netscape.javascript.JSException { + Main.info("evaluate (\"" + script + "\")"); + + KJASAppletContext kc = (KJASAppletContext) applet.getAppletContext(); + //String appletname = kc.getAppletName(appletID); + thread = Thread.currentThread(); + + if (!kc.evaluateJavaScript("window.__lc[1](" + id + ",\"" + escapeString(script) + "\",this" + (global ? ",true)" : ")"), appletID, this)) { + Main.debug("evaluate on not active applet"); + return null; + } + boolean timedout = true; + try { + Thread.sleep(30000); + } catch (InterruptedException ex) { + timedout = false; + } + thread = null; + if (timedout || returnvalue == null) + return null; + + /* lets see what we've got */ + String retval = returnvalue; + int pos = retval.indexOf(' '); + String type = retval.substring(0, pos); + if (type.equals("V")) // Void + return null; + String value = retval.substring(pos+1); + if (type.equals("E")) // Error + throw new netscape.javascript.JSException("Script error: " + value); + Main.info("value=" + value + " (type=" + type + ")"); + if (type.equals("N")) // Number + return new Double(value); + if (type.equals("S")) // String + return value; + + /* Is it an applet? */ + if (value.startsWith("[object APPLET ref=")) { + int p1 = value.indexOf('='); + int p2 = value.indexOf(']', p1+1); + int applethashcode = Integer.parseInt(value.substring(p1+1, p2)); + java.util.Enumeration e = kc.getApplets(); + while (e.hasMoreElements()) { + Applet app = (Applet) e.nextElement(); + if (app.hashCode() == applethashcode) + return app; + } + return null; + } + /* Is it a Java object then? */ + if (value.startsWith("[object ") && value.indexOf("ref=") > 0) { + int p1 = value.indexOf("ref="); + int p2 = value.indexOf(']', p1+4); + int objecthashcode = Integer.parseInt(value.substring(p1+4, p2)); + return kc.getJSReferencedObject(applet, objecthashcode); + } + /* Ok, make it a JSObject */ + return new JSObject(applet, value, Integer.parseInt(type)); + } + private String convertValueJ2JS(Object o) { + if (o == null) + return new String("null"); + if (o instanceof java.lang.Number || o instanceof java.lang.Boolean) + return o.toString(); + if (o instanceof netscape.javascript.JSObject) + return new String("window.__lc[0][" + ((JSObject)o).getId() + "]"); + return new String("\"" + escapeString(o.toString()) + "\""); + } + public Object call(String func, Object [] args) throws netscape.javascript.JSException { + Main.info("JSObject.call: " + jsobject + "." + func); + String script = new String("." + func + "("); + for (int i = 0; args != null && i < args.length; i++) + script += (i > 0 ? "," : "") + convertValueJ2JS(args[i]); + script += ")"; + return evaluate(script, false); + } + public Object eval(String s) throws netscape.javascript.JSException { + return evaluate(s, true); + } + public boolean equals(Object obj) { + Main.info("JSObject.equals"); + return super.equals(obj); + } + public Object getMember(String name) throws netscape.javascript.JSException { + Main.info("JSObject.getMember: " + jsobject + "." + name); + return evaluate("." + name, false); + } + public void setMember(String name, java.lang.Object o) throws netscape.javascript.JSException { + Main.info("JSObject.setMember: " + jsobject + "." + name); + evaluate("." + name + "=" + convertValueJ2JS(o), false); + } + public void removeMember(String name) throws netscape.javascript.JSException { + Main.info("JSObject.removeMember: " + jsobject + "." + name); + evaluate("." + name + "=null", false); + } + /* get array element; JS: this[index] */ + public Object getSlot(int index)throws netscape.javascript.JSException { + Main.info("JSObject.getSlot: " + jsobject + "[" + index + "]"); + return evaluate("[" + index + "]", false); + } + public void setSlot(int index, Object o) throws netscape.javascript.JSException { + Main.info("JSObject.setSlot: " + jsobject + "[" + index + "]"); + evaluate("[" + index + "]=" + convertValueJ2JS(o), false); + } + public String toString(){ + Main.info("JSObject.toString: " + jsobject); + return new String(jsobject); + } + public static JSObject getWindow(Applet a, int dummy) { + Main.info("JSObject.getWindow"); + return new JSObject(a, "[WINDOW]", 0); + } +} diff --git a/tdehtml/java/org/kde/kjas/server/Console.java b/tdehtml/java/org/kde/kjas/server/Console.java new file mode 100644 index 000000000..d089f3cd8 --- /dev/null +++ b/tdehtml/java/org/kde/kjas/server/Console.java @@ -0,0 +1,20 @@ +/* + * Appendable.java + * + * Created on 16. Mai 2002, 23:23 + */ + +package org.kde.kjas.server; + +/** + * + * @author till + */ +public interface Console { + + public void clear(); + public void append(String text); + + public void setVisible(boolean visible); + +} diff --git a/tdehtml/java/org/kde/kjas/server/KJASAppletClassLoader.java b/tdehtml/java/org/kde/kjas/server/KJASAppletClassLoader.java new file mode 100644 index 000000000..c6defa848 --- /dev/null +++ b/tdehtml/java/org/kde/kjas/server/KJASAppletClassLoader.java @@ -0,0 +1,360 @@ +package org.kde.kjas.server; + +import java.net.*; +import java.io.*; +import java.util.*; +import java.util.zip.*; +import java.util.jar.*; +import java.security.*; +/** + * ClassLoader used to download and instantiate Applets. + * <P> + * NOTE: The class loader extends Java 1.2 specific class. + */ +public final class KJASAppletClassLoader + extends URLClassLoader +{ + private static Hashtable loaders = new Hashtable(); + + public static synchronized void removeLoaders() + { + loaders.clear(); + } + + public static synchronized KJASAppletClassLoader getLoader( String docBase, String codeBase, String archives ) + { + SecurityManager security = System.getSecurityManager(); + if (security != null) { + security.checkCreateClassLoader(); + } + URL docBaseURL; + KJASAppletClassLoader loader = null; + try + { + docBaseURL = new URL( docBase ); + + URL codeBaseURL = getCodeBaseURL( docBaseURL, codeBase ); + String key = codeBaseURL.toString(); + if (archives != null) + key += archives; + + Main.debug( "CL: getLoader: key = " + key ); + + loader = (KJASAppletClassLoader) loaders.get( key ); + if( loader == null ) + { + URL [] urlList = {}; + loader = new KJASAppletClassLoader( urlList, docBaseURL, codeBaseURL); + loaders.put( key, loader ); + } + else + { + Main.debug( "CL: reusing classloader" ); + } + } catch( MalformedURLException e ) { Main.kjas_err( "bad DocBase URL", e ); } + return loader; + } + + public static URL getCodeBaseURL( URL docBaseURL, String codeBase ) + { + URL codeBaseURL = null; + try + { + //first determine what the real codeBase is: 3 cases + //#1. codeBase is absolute URL- use that + //#2. codeBase is relative to docBase, create url from those + //#3. last resort, use docBase as the codeBase + if(codeBase != null) + { + //we need to do this since codeBase should be a directory + if( !codeBase.endsWith("/") ) + codeBase = codeBase + "/"; + + try + { + codeBaseURL = new URL( codeBase ); + } catch( MalformedURLException mue ) + { + try + { + codeBaseURL = new URL( docBaseURL, codeBase ); + } catch( MalformedURLException mue2 ) {} + } + } + + if(codeBaseURL == null) + { + //fall back to docBase but fix it up... + String file = docBaseURL.getFile(); + if( file == null || (file.length() == 0) ) + codeBaseURL = docBaseURL; + else if( file.endsWith( "/" ) ) + codeBaseURL = docBaseURL; + else + { + //delete up to the ending '/' + String urlString = docBaseURL.toString(); + int dot_index = urlString.lastIndexOf( '/' ); + String newfile = urlString.substring( 0, dot_index+1 ); + codeBaseURL = new URL( newfile ); + } + } + }catch( Exception e ) { Main.kjas_err( "CL: exception ", e ); } + return codeBaseURL; + } + + public static KJASAppletClassLoader getLoader( String key ) + { + SecurityManager security = System.getSecurityManager(); + if (security != null) { + security.checkCreateClassLoader(); + } + if( loaders.containsKey( key ) ) + return (KJASAppletClassLoader) loaders.get( key ); + + return null; + } + + /********************************************************************************* + ****************** KJASAppletClassLoader Implementation ************************* + **********************************************************************************/ + private URL docBaseURL; + private URL codeBaseURL; + private Vector archives; + private String dbgID; + private static int globalId = 0; + private int myId = 0; + private Vector statusListeners = new Vector(); + private AccessControlContext acc; + // a mapping JS referenced Java objects + private Hashtable jsReferencedObjects = new Hashtable(); + final static RuntimePermission kjas_access = new RuntimePermission("accessClassInPackage.org.kde.kjas.server"); + + public KJASAppletClassLoader( URL[] urlList, URL _docBaseURL, URL _codeBaseURL) + { + super(urlList); + acc = AccessController.getContext(); + synchronized(KJASAppletClassLoader.class) { + myId = ++globalId; + } + docBaseURL = _docBaseURL; + codeBaseURL = _codeBaseURL; + archives = new Vector(); + + dbgID = "CL-" + myId + "(" + codeBaseURL.toString() + "): "; + } + + protected void addURL(URL url) { + Main.debug(this + " add URL: " + url); + super.addURL(url); + } + + public void addStatusListener(StatusListener lsnr) { + statusListeners.add(lsnr); + } + public void removeStatusListener(StatusListener lsnr) { + statusListeners.remove(lsnr); + } + public void showStatus(String msg) { + Enumeration en = statusListeners.elements(); + while (en.hasMoreElements()) { + StatusListener lsnr = (StatusListener)en.nextElement(); + lsnr.showStatus(msg); + } + } + + public void paramsDone() { + // simply builds up the search path + // put the archives first because they are + // cached. + for( int i = 0; i < archives.size(); ++i ) { + String jar = (String)archives.elementAt( i ); + try { + URL jarURL = new URL(codeBaseURL, jar); + addURL(jarURL); + Main.debug("added archive URL \"" + jarURL + "\" to KJASAppletClassLoader"); + } catch (MalformedURLException e) { + Main.kjas_err("Could not construct URL for jar file: " + codeBaseURL + " + " + jar, e); + } + } + // finally add code base url and docbase url + addURL(codeBaseURL); + + // the docBaseURL has to be fixed. + // strip file part from end otherwise this + // will be interpreted as an archive + // (should this perhaps be done generally ??) + String dbs = docBaseURL.toString(); + int idx = dbs.lastIndexOf("/"); + if (idx > 0) { + dbs = dbs.substring(0, idx+1); + } + URL docDirURL = null; + try { + docDirURL = new URL(dbs); + } catch (MalformedURLException e) { + Main.debug("Could not make a new URL from docBaseURL=" + docBaseURL); + } + if (docDirURL != null && !codeBaseURL.equals(docDirURL)) { + addURL(docDirURL); + } + } + + void addArchiveName( String jarname ) + { + if( !archives.contains( jarname ) ) + { + archives.add( jarname ); + } + } + + + public URL getDocBase() + { + return docBaseURL; + } + + public URL getCodeBase() + { + return codeBaseURL; + } + + Hashtable getJSReferencedObjects() { + return jsReferencedObjects; + } + /*************************************************************************** + **** Class Loading Methods + **************************************************************************/ + public synchronized Class findClass( String name ) throws ClassNotFoundException + { + Class rval = null; + //check the loaded classes + rval = findLoadedClass( name ); + if( rval == null ) { + try { + rval = super.findClass(name); + } catch (ClassFormatError cfe) { + Main.debug(name + ": Catched " + cfe + ". Trying to repair..."); + rval = loadFixedClass( name ); + } catch (Exception ex) { + Main.debug("findClass " + name + " " + ex.getMessage()); + } + } + if (rval == null) { + throw new ClassNotFoundException("Class: " + name); + } + return rval; + } + public Class loadClass(String name) throws ClassNotFoundException { + if (name.startsWith("org.kde.kjas.server")) { + SecurityManager sec = System.getSecurityManager(); + if (sec != null) + sec.checkPermission(kjas_access); + } + return super.loadClass(name); + } + private Hashtable loadedClasses = new Hashtable(); + + private synchronized final Class loadFixedClass(String name) throws ClassNotFoundException { + final String fileName = name.replace('.', '/') + ".class"; + try { + // try to get the class as resource + final URL u = getResource(fileName); + Main.debug(dbgID + name + ": got URL: " + u); + if (u == null) { + throw new ClassNotFoundException(fileName + ": invalid resource URL."); + } + java.security.cert.Certificate[] certs = {}; // FIXME + CodeSource cs = new CodeSource(u, certs); + InputStream instream = (InputStream)AccessController.doPrivileged( + new PrivilegedAction() { + public Object run() { + try { + return u.openStream(); + } catch (IOException ioe) { + ioe.printStackTrace(); + return null; + } + } + }, acc + ); + if (instream == null) { + throw new ClassNotFoundException(name + ": could not be loaded."); + } + ByteArrayOutputStream byteStream = new ByteArrayOutputStream(); + int cnt; + int total = 0; + int bufSize = 1024; + byte [] buffer = new byte[bufSize]; + while ((cnt = instream.read(buffer, 0, bufSize)) > 0) { + total += cnt; + byteStream.write(buffer, 0, cnt); + } + Main.debug(dbgID + name + ": " + total + " bytes"); + + Class cl = fixAndDefineClass(name, byteStream.toByteArray(), 0, total, cs); + if (cl != null) { + loadedClasses.put(name, cl); + } + return cl; + + } catch (Throwable e) { + e.printStackTrace(); + throw new ClassNotFoundException("triggered by " + e); + } + } + + public URL findResource( String name) + { + Main.debug( dbgID + "findResource, name = " + name ); + String displayName = name; + try { + URL u = new URL(name); + String filename = u.getFile(); + if (filename != null && filename.length() > 0) { + displayName = filename; + } + } catch (Throwable e) { + } + showStatus("Loading: " + displayName); + URL url = super.findResource( name ); + Main.debug("findResource for " + name + " returns " + url); + return url; + } + + protected PermissionCollection getPermissions(CodeSource cs) { + Main.debug(dbgID + " getPermissions(" + cs + ")"); + PermissionCollection permissions = super.getPermissions(cs); + Enumeration perms_enum = permissions.elements(); + while (perms_enum.hasMoreElements()) { + Main.debug(this + " Permission: " + perms_enum.nextElement()); + } + return permissions; + } + + + /** + * define the class <b>name</b>. If <b>name</b> is broken, try to fix it. + */ + private final Class fixAndDefineClass( + String name, + byte[] b, + int off, + int len, + CodeSource cs) throws ClassFormatError + { + KJASBrokenClassFixer fixer = new KJASBrokenClassFixer(); + if (fixer.process(b, off, len)) { + Main.debug(name + " fixed"); + } else { + Main.info(name + " could not be fixed"); + } + return defineClass(name, + fixer.getProcessedData(), + fixer.getProcessedDataOffset(), + fixer.getProcessedDataLength(), + cs); + } + + +} diff --git a/tdehtml/java/org/kde/kjas/server/KJASAppletContext.java b/tdehtml/java/org/kde/kjas/server/KJASAppletContext.java new file mode 100644 index 000000000..f868b7b64 --- /dev/null +++ b/tdehtml/java/org/kde/kjas/server/KJASAppletContext.java @@ -0,0 +1,473 @@ +package org.kde.kjas.server; + +import java.applet.*; +import java.util.*; +import java.net.*; +import java.awt.*; +import java.awt.event.*; +import java.io.*; +import java.lang.reflect.Field; +import java.lang.reflect.Method; +import org.kde.javascript.JSObject; + +final class KJASAuthenticator extends Authenticator { + private Hashtable authentication; + + KJASAuthenticator() { + authentication = new Hashtable(); + setDefault(this); + } + final void addURL(URL url, String user, String password, String authname) { + String key = new String(url.getProtocol() + ":" + url.getHost() + ":" + + url.getPort() + "_" + authname); + String [] auths = { user, password }; + authentication.put(key, auths); + } + final protected PasswordAuthentication getPasswordAuthentication() { + URL url; + String key = new String(getRequestingProtocol() + ":" + getRequestingHost() + ":" + getRequestingPort() + "_" + getRequestingPrompt()); + String [] auths = (String []) authentication.get(key); + if (auths != null) { + char [] pw = new char[auths[1].length()]; + auths[1].getChars(0, auths[1].length(), pw, 0); + return new PasswordAuthentication(auths[0], pw); + } + return null; + } +} + +/** + * The context in which applets live. + */ +public class KJASAppletContext implements AppletContext +{ + private Hashtable stubs; + private Hashtable images; + private Vector pendingImages; + private Hashtable streams; + private Stack jsobjects; + + private String myID; + private KJASAppletClassLoader loader; + private boolean active; + private final static KJASAuthenticator authenticator = new KJASAuthenticator(); + + /** + * Create a KJASAppletContext + */ + public KJASAppletContext( String _contextID ) + { + stubs = new Hashtable(); + images = new Hashtable(); + pendingImages = new Vector(); + streams = new Hashtable(); + jsobjects = new Stack(); + myID = _contextID; + active = true; + } + + public String getID() + { + return myID; + } + + public String getAppletID(Applet applet) + { + Enumeration e = stubs.keys(); + while ( e.hasMoreElements() ) + { + String appletID = (String) e.nextElement(); + KJASAppletStub stub = (KJASAppletStub) stubs.get(appletID); + if (stub.getApplet() == applet) + return appletID; + } + return null; + } + + public Applet getAppletById(String appletId) { + return ((KJASAppletStub) stubs.get( appletId )).getApplet(); + } + + public String getAppletName(String appletID) { + KJASAppletStub stub = (KJASAppletStub) stubs.get(appletID); + if (stub == null) + return null; + return stub.getAppletName(); + } + public void createApplet( String appletID, String name, + String className, String docBase, + String username, String password, String authname, + String codeBase, String archives, + String width, String height, + String windowName, Hashtable params ) + { + //do kludges to support mess with parameter table and + //the applet variables + String key = new String( "ARCHIVE" ); + if (params.containsKey(key)) { + String param_archive = (String)params.get(key); + if (archives == null) { + // There is no 'archive' attribute + // but a 'archive' param. fix archive list + // from param value + archives = param_archive; + } else { + // there is already an archive attribute. + // just add the value of the param to the list. + // But ignore bill$ personal archive format called + // .cab because java doesn't understand it. + if (!param_archive.toLowerCase().endsWith(".cab")) { + archives = param_archive + "," + archives; + } + } + } else if (archives != null) { + // add param if it is not present + params.put( key, archives); + } + + if( codeBase == null ) + { + key = new String( "CODEBASE" ); + if( params.containsKey( key ) ) + codeBase = (String) params.get( key ); + } + + if (username != null && !username.equals("")) { + try { + URL url = new URL(docBase); + int port = url.getPort(); + if (port < 0) + port = url.getDefaultPort(); + authenticator.addURL(new URL(url.getProtocol(), url.getHost(), port, ""), username, password, authname); + } catch (MalformedURLException muex) { + } + } + try + { + String sorted_archives = ""; + TreeSet archive_set = new TreeSet(); + if( archives != null ) + { + StringTokenizer parser = new StringTokenizer( archives, ",", false ); + while( parser.hasMoreTokens() ) + archive_set.add ( parser.nextToken().trim() ); + } + Iterator it = archive_set.iterator(); + while (it.hasNext()) + sorted_archives += (String) it.next(); + KJASAppletClassLoader loader = + KJASAppletClassLoader.getLoader( docBase, codeBase, sorted_archives ); + it = archive_set.iterator(); + while (it.hasNext()) + loader.addArchiveName( (String) it.next() ); + loader.paramsDone(); + + KJASAppletStub stub = new KJASAppletStub + ( + this, appletID, loader.getCodeBase(), + loader.getDocBase(), name, className, + new Dimension( Integer.parseInt(width), Integer.parseInt(height) ), + params, windowName, loader + ); + stubs.put( appletID, stub ); + + stub.createApplet(); + } + catch ( Exception e ) + { + Main.kjas_err( "Something bad happened in createApplet: " + e, e ); + } + } + + public void initApplet( String appletID ) + { + KJASAppletStub stub = (KJASAppletStub) stubs.get( appletID ); + if( stub == null ) + { + Main.debug( "could not init and show applet: " + appletID ); + } + else + { + stub.initApplet(); + } + } + + public void destroyApplet( String appletID ) + { + KJASAppletStub stub = (KJASAppletStub) stubs.get( appletID ); + + if( stub == null ) + { + Main.debug( "could not destroy applet: " + appletID ); + } + else + { + //Main.debug( "stopping applet: " + appletID ); + stubs.remove( appletID ); + + stub.destroyApplet(); + } + } + + public void startApplet( String appletID ) + { + KJASAppletStub stub = (KJASAppletStub) stubs.get( appletID ); + if( stub == null ) + { + Main.debug( "could not start applet: " + appletID ); + } + else + { + stub.startApplet(); + } + } + + public void stopApplet( String appletID ) + { + KJASAppletStub stub = (KJASAppletStub) stubs.get( appletID ); + if( stub == null ) + { + Main.debug( "could not stop applet: " + appletID ); + } + else + { + stub.stopApplet(); + } + } + + public void destroy() + { + Enumeration e = stubs.elements(); + while ( e.hasMoreElements() ) + { + KJASAppletStub stub = (KJASAppletStub) e.nextElement(); + stub.destroyApplet(); + stub.loader.getJSReferencedObjects().clear(); + } + + stubs.clear(); + active = false; + } + + /*************************************************************************** + **** AppletContext interface + ***************************************************************************/ + public Applet getApplet( String appletName ) + { + if( active ) + { + Enumeration e = stubs.elements(); + while( e.hasMoreElements() ) + { + KJASAppletStub stub = (KJASAppletStub) e.nextElement(); + + if( stub.getAppletName().equals( appletName ) ) + return stub.getApplet(); + } + } + + return null; + } + + public Enumeration getApplets() + { + if( active ) + { + Vector v = new Vector(); + Enumeration e = stubs.elements(); + while( e.hasMoreElements() ) + { + KJASAppletStub stub = (KJASAppletStub) e.nextElement(); + v.add( stub.getApplet() ); + } + + return v.elements(); + } + + return null; + } + + public AudioClip getAudioClip( URL url ) + { + Main.debug( "getAudioClip, url = " + url ); + //AudioClip clip = java.applet.Applet.newAudioClip(url); + AudioClip clip = new KJASAudioClip(url); + Main.debug( "got AudioClip " + clip); + return clip; + // return new KJASSoundPlayer( myID, url ); + } + + public void addImage( String url, byte[] data ) + { + Main.debug( "addImage for url = " + url ); + images.put( url, data ); + if (Main.cacheImages) { + pendingImages.remove(url); + } + } + + public Image getImage( URL url ) + { + if( active && url != null ) + { + // directly load images using JVM + if (true) { + // Main.info("Getting image using ClassLoader:" + url); + if (loader != null) { + url = loader.findResource(url.toString()); + //Main.debug("Resulting URL:" + url); + } + Toolkit kit = Toolkit.getDefaultToolkit(); + Image img = kit.createImage(url); + return img; + } + + //check with the Web Server + String str_url = url.toString(); + Main.debug( "getImage, url = " + str_url ); + if (Main.cacheImages && images.containsKey(str_url)) { + Main.debug("Cached: url=" + str_url); + } + else + { + if (Main.cacheImages) { + if (!pendingImages.contains(str_url)) { + Main.protocol.sendGetURLDataCmd( myID, str_url ); + pendingImages.add(str_url); + } + } else { + Main.protocol.sendGetURLDataCmd( myID, str_url ); + } + while( !images.containsKey( str_url ) && active ) + { + try { Thread.sleep( 200 ); } + catch( InterruptedException e ){} + } + } + if( images.containsKey( str_url ) ) + { + byte[] data = (byte[]) images.get( str_url ); + if( data.length > 0 ) + { + Toolkit kit = Toolkit.getDefaultToolkit(); + return kit.createImage( data ); + } else return null; + } + } + + return null; + } + + public void showDocument( URL url ) + { + //Main.debug( "showDocument, url = " + url ); + + if( active && (url != null) ) + { + Main.protocol.sendShowDocumentCmd( myID, url.toString() ); + } + } + + public void showDocument( URL url, String targetFrame ) + { + //Main.debug( "showDocument, url = " + url + " targetFrame = " + targetFrame ); + + if( active && (url != null) && (targetFrame != null) ) + { + Main.protocol.sendShowDocumentCmd( myID, url.toString(), targetFrame ); + } + } + + public void showStatus( String message ) + { + if( active && (message != null) ) + { + Main.protocol.sendShowStatusCmd( myID, message ); + } + } + public boolean evaluateJavaScript(String script, String appletID, JSObject jso) { + KJASAppletStub stub = (KJASAppletStub) stubs.get( appletID ); + if( active && stub != null && stub.isLoaded ()) { + if( jso != null ) { + synchronized (jsobjects) { + jsobjects.push(jso); + } + } + int [] types = { KJASAppletStub.JString }; + String [] arglist = { script }; + Main.protocol.sendJavaScriptEventCmd(myID, appletID, 0, "eval", types, arglist); + return true; + } + Main.debug( "evaluateJavaScript failure, context active:" + active + " stub:" + stub); + return false; + } + + public boolean getMember(String appletID, int callid, int objid, String name) + { + KJASAppletStub stub = (KJASAppletStub) stubs.get( appletID ); + if (stub == null || !stub.isLoaded()) + return false; + return stub.getMember(callid, objid, name); + } + + public boolean putMember(String appletID, int callid, int objid, String name, String value) + { + if (name.equals("__lc_ret")) { + // special case; return value of JS script evaluation + Main.debug("putValue: applet " + name + "=" + value); + JSObject jso = null; + synchronized (jsobjects) { + if (!jsobjects.empty()) + jso = (JSObject) jsobjects.pop(); + } + if (jso == null) + return false; + jso.returnvalue = value; + try { + jso.thread.interrupt(); + } catch (SecurityException ex) {} + Main.protocol.sendPutMember( myID, callid, true ); + } + KJASAppletStub stub = (KJASAppletStub) stubs.get( appletID ); + if (stub == null || !stub.isLoaded()) + return false; + return stub.putMember(callid, objid, name, value); + } + + public Object getJSReferencedObject(Applet applet, int objid) + { + return ((KJASAppletClassLoader)(applet.getClass().getClassLoader())).getJSReferencedObjects().get(new Integer(objid)); + } + boolean callMember(String appletID, int cid, int oid, String n, java.util.List args) + { + KJASAppletStub stub = (KJASAppletStub) stubs.get( appletID ); + if (stub == null || !stub.isLoaded()) + return false; + return stub.callMember( cid, oid, n, args); + } + public void derefObject(String appletID, int objid) { + if (objid == 0) + return; // that's an applet + KJASAppletStub stub = (KJASAppletStub) stubs.get( appletID ); + if (stub == null) + return; + Hashtable jsRefs = stub.loader.getJSReferencedObjects(); + if (jsRefs.remove(new Integer(objid)) == null) + Main.debug("couldn't remove referenced object"); + } + + public void setStream(String key, InputStream stream) throws IOException { + Main.debug("setStream, key = " + key); + streams.put(key, stream); + } + public InputStream getStream(String key){ + Main.debug("getStream, key = " + key); + return (InputStream) streams.get(key); + } + public Iterator getStreamKeys() { + Main.debug("getStreamKeys"); + return streams.keySet().iterator(); + } + + +} diff --git a/tdehtml/java/org/kde/kjas/server/KJASAppletPanel.java b/tdehtml/java/org/kde/kjas/server/KJASAppletPanel.java new file mode 100644 index 000000000..d7acbdaf9 --- /dev/null +++ b/tdehtml/java/org/kde/kjas/server/KJASAppletPanel.java @@ -0,0 +1,113 @@ +package org.kde.kjas.server; + +import java.applet.Applet; +import java.awt.BorderLayout; +import java.awt.Dimension; +import java.awt.Font; +import java.awt.FontMetrics; +import java.awt.Graphics; +import java.awt.Image; +import java.awt.LayoutManager; +import java.awt.Panel; +import java.net.URL; + +/** + * @author till + * + * A panel which embeds the applet and shows some + * information during class loading. + */ +public class KJASAppletPanel extends javax.swing.JPanel implements StatusListener { + private final static int LOADING = 1; + private final static int RUNNING = 2; + private final static int FAILED = 3; + + private Image load_img = null; + private Image fail_img = null; + private int status = LOADING; + private Font font; + private String msg = "Loading Applet..."; + + /** + * Constructor for KJASAppletPanel. + */ + public KJASAppletPanel() { + super(new BorderLayout()); + font = new Font("SansSerif", Font.PLAIN, 10); + URL url = + getClass().getClassLoader().getResource("images/animbean.gif"); + load_img = getToolkit().createImage(url); + //setBackground(Color.white); + } + + void setApplet(Applet applet) { + add("Center", applet); + validate(); + } + + public void showStatus(String msg) { + this.msg = msg; + if (status != RUNNING) + repaint(); + } + + public void paint(Graphics g) { + super.paint(g); + if (status == RUNNING) + return; + Image img = (status == LOADING ? load_img : fail_img); + int x = getWidth() / 2; + int y = getHeight() / 2; + if (img != null) { + //synchronized (img) { + int w = img.getWidth(this); + int h = img.getHeight(this); + int imgx = x - w / 2; + int imgy = y - h / 2; + //g.setClip(imgx, imgy, w, h); + g.drawImage(img, imgx, imgy, this); + y += img.getHeight(this) / 2; + //} + } + if (msg != null) { + //synchronized(msg) { + g.setFont(font); + FontMetrics m = g.getFontMetrics(); + int h = m.getHeight(); + int w = m.stringWidth(msg); + int msgx = x - w / 2; + int msgy = y + h; + //g.setClip(0, y, getWidth(), h); + g.drawString(msg, msgx, msgy); + //} + } + } + void showFailed() { + URL url = + getClass().getClassLoader().getResource("images/brokenbean.gif"); + fail_img = getToolkit().createImage(url); + status = FAILED; + msg = "Applet Failed."; + repaint(); + } + + void showFailed(String message) { + showFailed(); + showStatus(message); + } + + public void stopAnimation() { + status = RUNNING; + } + + public boolean imageUpdate(Image img, int flags, int x, int y, int w, int h) + { + if (img != null && img == load_img && status != LOADING) { + img.flush(); + load_img = null; + Main.debug("flushing image"); + return false; + } + return super.imageUpdate(img, flags, x, y, w, h); + } +} diff --git a/tdehtml/java/org/kde/kjas/server/KJASAppletStub.java b/tdehtml/java/org/kde/kjas/server/KJASAppletStub.java new file mode 100644 index 000000000..e090183d7 --- /dev/null +++ b/tdehtml/java/org/kde/kjas/server/KJASAppletStub.java @@ -0,0 +1,807 @@ +package org.kde.kjas.server; + +import java.applet.*; +import java.util.*; +import java.net.*; +import java.awt.*; +import java.awt.event.*; +import javax.swing.JFrame; +import java.security.PrivilegedAction; +import java.security.AccessController; +import java.security.AccessControlContext; +import java.security.ProtectionDomain; +import java.lang.reflect.Field; +import java.lang.reflect.Method; + +/** + * The stub used by Applets to communicate with their environment. + * + */ +public final class KJASAppletStub + implements AppletStub +{ + private KJASAppletContext context; // The containing context. + private Hashtable params; // Maps parameter names to values + private URL codeBase; // The URL directory where files are + private URL docBase; // The document that referenced the applet + private boolean active; // Is the applet active? + private String appletName; // The name of this applet instance + private String appletID; // The id of this applet- for use in callbacks + private Dimension appletSize; + private String windowName; + private String className; + private Class appletClass; + private JFrame frame; + + /** + * out of bounds applet state :-), perform an action + */ + public static final int ACTION = -1; + /** + * applet state unknown + */ + public static final int UNKNOWN = 0; + /** + * the applet class has been loaded + */ + public static final int CLASS_LOADED = 1; + /** + * the applet has been instanciated + */ + public static final int INSTANCIATED = 2; + /** + * the applet has been initialized + */ + public static final int INITIALIZED = 3; + /** + * the applet has been started + */ + public static final int STARTED = 4; + /** + * the applet has been stopped + */ + public static final int STOPPED = 5; + /** + * the applet has been destroyed + */ + public static final int DESTROYED = 6; + /** + * request for termination of the applet thread + */ + private static final int TERMINATE = 7; + /** + * like TERMINATE, an end-point state + */ + private static final int FAILED = 8; + + + //private KJASAppletClassLoader loader; + KJASAppletClassLoader loader; + private KJASAppletPanel panel; + private Applet app; + KJASAppletStub me; + + /** + * Interface for so called LiveConnect actions, put-, get- and callMember + */ + // keep this in sync with KParts::LiveConnectExtension::Type + private final static int JError = -1; + private final static int JVoid = 0; + private final static int JBoolean = 1; + private final static int JFunction = 2; + private final static int JNumber = 3; + private final static int JObject = 4; + final static int JString = 5; + + interface AppletAction { + void apply(); + void fail(); + } + + private class RunThread extends Thread { + private int request_state = CLASS_LOADED; + private int current_state = UNKNOWN; + private Vector actions = new Vector(); + private AccessControlContext acc = null; + + RunThread() { + super("KJAS-AppletStub-" + appletID + "-" + appletName); + setContextClassLoader(loader); + } + /** + * Ask applet to go to the next state + */ + synchronized void requestState(int nstate) { + if (nstate > current_state) { + request_state = nstate; + notifyAll(); + } + } + synchronized void requestAction(AppletAction action) { + actions.add(action); + notifyAll(); + } + /** + * Get the asked state + */ + synchronized private int getRequestState() { + while (request_state == current_state) { + if (!actions.isEmpty()) { + if (current_state >= INITIALIZED && current_state < STOPPED) + return ACTION; + else { + AppletAction action = (AppletAction) actions.remove(0); + action.fail(); + } + } else { + try { + wait (); + } catch(InterruptedException ie) { + } + } + } + if (request_state == DESTROYED && current_state == STARTED) + return current_state + 1; // make sure we don't skip stop() + return request_state; + } + /** + * Get the current state + */ + synchronized int getAppletState() { + return current_state; + } + /** + * Set the current state + */ + synchronized private void setState(int nstate) { + current_state = nstate; + } + /** + * Put applet in asked state + * Note, kjavaapletviewer asks for create/start/stop/destroy, the + * missing states instance/init/terminate, we do automatically + */ + private void doState(int nstate) throws ClassNotFoundException, IllegalAccessException, InstantiationException { + switch (nstate) { + case CLASS_LOADED: + appletClass = loader.loadClass( className ); + requestState(INSTANCIATED); + break; + case INSTANCIATED: { + Object object = null; + try { + object = appletClass.newInstance(); + app = (Applet) object; + } + catch ( ClassCastException e ) { + if ( object != null && object instanceof java.awt.Component) { + app = new Applet(); + app.setLayout(new BorderLayout()); + app.add( (Component) object, BorderLayout.CENTER); + } else + throw e; + } + acc = new AccessControlContext(new ProtectionDomain[] {app.getClass().getProtectionDomain()}); + requestState(INITIALIZED); + break; + } + case INITIALIZED: + app.setStub( me ); + app.setVisible(false); + panel.setApplet( app ); + if (appletSize.getWidth() > 0) + app.setBounds( 0, 0, appletSize.width, appletSize.height ); + else + app.setBounds( 0, 0, panel.getSize().width, panel.getSize().height ); + app.init(); + loader.removeStatusListener(panel); + // stop the loading... animation + panel.stopAnimation(); + app.setVisible(true); + break; + case STARTED: + active = true; + app.start(); + frame.validate(); + app.repaint(); + break; + case STOPPED: + active = false; + app.stop(); + if (Main.java_version > 1.399) { + // kill the windowClosing listener(s) + WindowListener[] l = frame.getWindowListeners(); + for (int i = 0; l != null && i < l.length; i++) + frame.removeWindowListener(l[i]); + } + frame.setVisible(false); + break; + case DESTROYED: + if (app != null) + app.destroy(); + frame.dispose(); + app = null; + requestState(TERMINATE); + break; + default: + return; + } + } + /** + * RunThread run(), loop until state is TERMINATE + */ + public void run() { + while (true) { + int nstate = getRequestState(); + if (nstate >= TERMINATE) + return; + if (nstate == ACTION) { + AccessController.doPrivileged( + new PrivilegedAction() { + public Object run() { + AppletAction action = (AppletAction) actions.remove(0); + try { + action.apply(); + } catch (Exception ex) { + Main.debug("Error during action " + ex); + action.fail(); + } + return null; + } + }, + acc); + } else { // move to nstate + try { + doState(nstate); + } catch (Exception ex) { + Main.kjas_err("Error during state " + nstate, ex); + if (nstate < INITIALIZED) { + setState(FAILED); + setFailed(ex.toString()); + return; + } + } catch (Throwable tr) { + setState(FAILED); + setFailed(tr.toString()); + return; + } + setState(nstate); + stateChange(nstate); + } + } + } + } + private RunThread runThread = null; + + /** + * Create an AppletStub for the specified applet. The stub will be in + * the specified context and will automatically attach itself to the + * passed applet. + */ + public KJASAppletStub( KJASAppletContext _context, String _appletID, + URL _codeBase, URL _docBase, + String _appletName, String _className, + Dimension _appletSize, Hashtable _params, + String _windowName, KJASAppletClassLoader _loader ) + { + context = _context; + appletID = _appletID; + codeBase = _codeBase; + docBase = _docBase; + active = false; + appletName = _appletName; + className = _className.replace( '/', '.' ); + appletSize = _appletSize; + params = _params; + windowName = _windowName; + loader = _loader; + + String fixedClassName = _className; + if (_className.endsWith(".class") || _className.endsWith(".CLASS")) + { + fixedClassName = _className.substring(0, _className.length()-6); + } + else if (_className.endsWith(".java")|| _className.endsWith(".JAVA")) + { + fixedClassName = _className.substring(0, _className.length()-5); + } + className = fixedClassName.replace('/', '.'); + + appletClass = null; + me = this; + + + } + + private void stateChange(int newState) { + Main.protocol.sendAppletStateNotification( + context.getID(), + appletID, + newState); + } + + private void setFailed(String why) { + loader.removeStatusListener(panel); + panel.stopAnimation(); + panel.showFailed(); + Main.protocol.sendAppletFailed(context.getID(), appletID, why); + } + + void createApplet() { + panel = new KJASAppletPanel(); + frame = new JFrame(windowName); + // under certain circumstances, it may happen that the + // applet is not embedded but shown in a separate window. + // think of konqueror running under fvwm or gnome. + // than, the user should have the ability to close the window. + + frame.addWindowListener + ( + new WindowAdapter() { + public void windowClosing(WindowEvent e) { + me.destroyApplet(); + } + } + ); + frame.getContentPane().add( panel, BorderLayout.CENTER ); + try { + if (Main.java_version > 1.399) + frame.setUndecorated(true); + } catch(java.awt.IllegalComponentStateException e) { + // This happens with gcj 4.0.1, ignore for now... + } + frame.setLocation( 0, 0 ); + frame.pack(); + // resize frame for j2sdk1.5beta1.. + if (appletSize.getWidth() > 0) + frame.setBounds( 0, 0, appletSize.width, appletSize.height ); + else + frame.setBounds( 0, 0, 50, 50 ); + frame.setVisible(true); + loader.addStatusListener(panel); + runThread = new RunThread(); + runThread.start(); + } + + /** + * starts the applet managed by this stub by calling the applets start() method. + * Also marks this stub as active. + * @see java.applet.Applet#start() + * @see java.applet.AppletStub#isActive() + * + */ + void startApplet() + { + runThread.requestState(STARTED); + } + + /** + * stops the applet managed by this stub by calling the applets stop() method. + * Also marks this stub as inactive. + * @see java.applet.Applet#stop() + * @see java.applet.AppletStub#isActive() + * + */ + void stopApplet() + { + runThread.requestState(STOPPED); + } + + /** + * initialize the applet managed by this stub by calling the applets init() method. + * @see java.applet.Applet#init() + */ + void initApplet() + { + runThread.requestState(INITIALIZED); + } + + /** + * destroys the applet managed by this stub by calling the applets destroy() method. + * Also marks the the applet as inactive. + * @see java.applet.Applet#init() + */ + synchronized void destroyApplet() + { + runThread.requestState(DESTROYED); + } + + static void waitForAppletThreads() + { + Thread [] ts = new Thread[Thread.activeCount() + 5]; + int len = Thread.enumerate(ts); + for (int i = 0; i < len; i++) { + try { + if (ts[i].getName() != null && + ts[i].getName().startsWith("KJAS-AppletStub-")) { + try { + ((RunThread) ts[i]).requestState(TERMINATE); + ts[i].join(10000); + } catch (InterruptedException ie) {} + } + } catch (Exception e) {} + } + } + + /** + * get the Applet managed by this stub. + * @return the Applet or null if the applet could not be loaded + * or instanciated. + */ + Applet getApplet() + { + if (runThread != null && runThread.getAppletState() > CLASS_LOADED) + return app; + return null; + } + + /** + * get a parameter value given in the <APPLET> tag + * @param name the name of the parameter + * @return the value or null if no parameter with this name exists. + */ + + public String getParameter( String name ) + { + return (String) params.get( name.toUpperCase() ); + } + + /** + * implements the isActive method of the AppletStub interface. + * @return if the applet managed by this stub is currently active. + * @see java.applet.AppletStub#isActive() + */ + public boolean isActive() + { + return active; + } + + /** + * determines if the applet has been loaded and instanciated + * and can hence be used. + * @return true if the applet has been completely loaded. + */ + boolean isLoaded() { + if (runThread == null) + return false; + int state = runThread.getAppletState(); + return (state >= INSTANCIATED && state < DESTROYED); + } + + public void appletResize( int width, int height ) + { + if( active ) + { + if ( (width >= 0) && (height >= 0)) + { + Main.debug( "Applet #" + appletID + ": appletResize to : (" + width + ", " + height + ")" ); + Main.protocol.sendResizeAppletCmd( context.getID(), appletID, width, height ); + appletSize = new Dimension( width, height ); + //pack(); + } + } + } + + /** + * converts Object <b>arg</b> into an object of class <b>cl</b>. + * @param arg Object to convert + * @param cl Destination class + * @return An Object of the specified class with the value specified + * in <b>arg</b> + */ + private static final Object cast(Object arg, Class cl) throws NumberFormatException { + Object ret = arg; + if (arg == null) { + ret = null; + } + else if (cl.isAssignableFrom(arg.getClass())) { + return arg; + } + else if (arg instanceof String) { + String s = (String)arg; + Main.debug("Argument String: \"" + s + "\""); + if (cl == Boolean.TYPE || cl == Boolean.class) { + ret = new Boolean(s); + } else if (cl == Integer.TYPE || cl == Integer.class) { + ret = new Integer(s); + } else if (cl == Long.TYPE || cl == Long.class) { + ret = new Long(s); + } else if (cl == Float.TYPE || cl == Float.class) { + ret = new Float(s); + } else if (cl == Double.TYPE || cl == Double.class) { + ret = new Double(s); + } else if (cl == Short.TYPE || cl == Short.class) { + ret = new Short(s); + } else if (cl == Byte.TYPE || cl == Byte.class) { + ret = new Byte(s); + } else if (cl == Character.TYPE || cl == Character.class) { + ret = new Character(s.charAt(0)); + } + } + return ret; + } + private Method findMethod(Class c, String name, Class [] argcls) { + try { + Method[] methods = c.getMethods(); + for (int i = 0; i < methods.length; i++) { + Method m = methods[i]; + if (m.getName().equals(name)) { + Main.debug("Candidate: " + m); + Class [] parameterTypes = m.getParameterTypes(); + if (argcls == null) { + if (parameterTypes.length == 0) { + return m; + } + } else { + if (argcls.length == parameterTypes.length) { + for (int j = 0; j < argcls.length; j++) { + // Main.debug("Parameter " + j + " " + parameterTypes[j]); + argcls[j] = parameterTypes[j]; + } + return m; + } + } + } + } + } catch (Exception e) { + e.printStackTrace(); + } + return null; + } + private int[] getJSTypeValue(Hashtable jsRefs, Object obj, int objid, StringBuffer value) { + String val = obj.toString(); + int[] rettype = { JError, objid }; + String type = obj.getClass().getName(); + if (type.equals("boolean") || type.equals("java.lang.Boolean")) + rettype[0] = JBoolean; + else if (type.equals("int") || type.equals("long") || + type.equals("float") || type.equals("double") || + type.equals("byte") || obj instanceof java.lang.Number) + rettype[0] = JNumber; + else if (type.equals("java.lang.String")) + rettype[0] = JString; + else if (!type.startsWith("org.kde.kjas.server") && + !(obj instanceof java.lang.Class && + ((Class)obj).getName().startsWith("org.kde.kjas.server"))) { + rettype[0] = JObject; + rettype[1] = obj.hashCode(); + jsRefs.put(new Integer(rettype[1]), obj); + } + value.insert(0, val); + return rettype; + } + private class PutAction implements AppletAction { + int call_id; + int objid; + String name; + String value; + PutAction(int cid, int oid, String n, String v) { + call_id = cid; + objid = oid; + name = n; + value = v; + } + public void apply() { + Hashtable jsRefs = loader.getJSReferencedObjects(); + Object o = objid==0 ? getApplet() : jsRefs.get(new Integer(objid)); + if (o == null) { + Main.debug("Error in putValue: object " + objid + " not found"); + fail(); + return; + } + Field f; + try { + f = o.getClass().getField(name); + } catch (Exception e) { + fail(); + return; + } + if (f == null) { + Main.debug("Error in putValue: " + name + " not found"); + fail(); + return; + } + try { + String type = f.getType().getName(); + Main.debug("putValue: (" + type + ")" + name + "=" + value); + if (type.equals("boolean")) + f.setBoolean(o, Boolean.getBoolean(value)); + else if (type.equals("java.lang.Boolean")) + f.set(o, Boolean.valueOf(value)); + else if (type.equals("int")) + f.setInt(o, Integer.parseInt(value)); + else if (type.equals("java.lang.Integer")) + f.set(o, Integer.valueOf(value)); + else if (type.equals("byte")) + f.setByte(o, Byte.parseByte(value)); + else if (type.equals("java.lang.Byte")) + f.set(o, Byte.valueOf(value)); + else if (type.equals("char")) + f.setChar(o, value.charAt(0)); + else if (type.equals("java.lang.Character")) + f.set(o, new Character(value.charAt(0))); + else if (type.equals("double")) + f.setDouble(o, Double.parseDouble(value)); + else if (type.equals("java.lang.Double")) + f.set(o, Double.valueOf(value)); + else if (type.equals("float")) + f.setFloat(o, Float.parseFloat(value)); + else if (type.equals("java.lang.Float")) + f.set(o, Float.valueOf(value)); + else if (type.equals("long")) + f.setLong(o, Long.parseLong(value)); + else if (type.equals("java.lang.Long")) + f.set(o, Long.valueOf(value)); + else if (type.equals("short")) + f.setShort(o, Short.parseShort(value)); + else if (type.equals("java.lang.Short")) + f.set(o, Short.valueOf(value)); + else if (type.equals("java.lang.String")) + f.set(o, value); + else { + Main.debug("Error putValue: unsupported type: " + type); + fail(); + return; + } + } catch (Exception e) { + Main.debug("Exception in putValue: " + e.getMessage()); + fail(); + return; + } + Main.protocol.sendPutMember( context.getID(), call_id, true ); + } + public void fail() { + Main.protocol.sendPutMember( context.getID(), call_id, false ); + } + } + private class GetAction implements AppletAction { + int call_id; + int objid; + String name; + GetAction(int cid, int oid, String n) { + call_id = cid; + objid = oid; + name = n; + } + public void apply() { + Main.debug("getMember: " + name); + StringBuffer value = new StringBuffer(); + int ret[] = { JError, objid }; + Hashtable jsRefs = loader.getJSReferencedObjects(); + Object o = objid==0 ? getApplet() : jsRefs.get(new Integer(objid)); + if (o == null) { + fail(); + return; + } + Class c = o.getClass(); + try { + Field field = c.getField(name); + ret = getJSTypeValue(jsRefs, field.get(o), objid, value); + } catch (Exception ex) { + Method [] m = c.getMethods(); + for (int i = 0; i < m.length; i++) + if (m[i].getName().equals(name)) { + ret[0] = JFunction; + break; + } + } + Main.protocol.sendMemberValue(context.getID(), KJASProtocolHandler.GetMember, call_id, ret[0], ret[1], value.toString()); + } + public void fail() { + Main.protocol.sendMemberValue(context.getID(), KJASProtocolHandler.GetMember, call_id, -1, 0, ""); + } + } + private class CallAction implements AppletAction { + int call_id; + int objid; + String name; + java.util.List args; + CallAction(int cid, int oid, String n, java.util.List a) { + call_id = cid; + objid = oid; + name = n; + args = a; + } + public void apply() { + StringBuffer value = new StringBuffer(); + Hashtable jsRefs = loader.getJSReferencedObjects(); + int [] ret = { JError, objid }; + Object o = objid==0 ? getApplet() : jsRefs.get(new Integer(objid)); + if (o == null) { + fail(); + return; + } + + try { + Main.debug("callMember: " + name); + Object obj; + Class c = o.getClass(); + String type; + Class [] argcls = new Class[args.size()]; + for (int i = 0; i < args.size(); i++) + argcls[i] = name.getClass(); // String for now, will be updated by findMethod + Method m = findMethod(c, (String) name, argcls); + Main.debug("Found Method: " + m); + if (m != null) { + Object [] argobj = new Object[args.size()]; + for (int i = 0; i < args.size(); i++) { + argobj[i] = cast(args.get(i), argcls[i]); + } + Object retval = m.invoke(o, argobj); + if (retval == null) + ret[0] = JVoid; + else + ret = getJSTypeValue(jsRefs, retval, objid, value); + } + } catch (Exception e) { + Main.debug("callMember threw exception: " + e.toString()); + } + Main.protocol.sendMemberValue(context.getID(), KJASProtocolHandler.CallMember, call_id, ret[0], ret[1], value.toString()); + } + public void fail() { + Main.protocol.sendMemberValue(context.getID(), KJASProtocolHandler.CallMember, call_id, -1, 0, ""); + } + } + boolean putMember(int callid, int objid, String name, String val) { + if (runThread == null) + return false; + runThread.requestAction( new PutAction( callid, objid, name, val) ); + return true; + } + boolean getMember(int cid, int oid, String name) { + if (runThread == null) + return false; + runThread.requestAction( new GetAction( cid, oid, name) ); + return true; + } + boolean callMember(int cid, int oid, String name, java.util.List args) { + if (runThread == null) + return false; + runThread.requestAction( new CallAction( cid, oid, name, args) ); + return true; + } + /************************************************************************* + ********************** AppletStub Interface ***************************** + *************************************************************************/ + /** + * implements the getAppletContext method of the AppletStub interface. + * @return the AppletContext to which this stub belongs. + * @see java.applet.AppletStub#getAppletContext() + */ + public AppletContext getAppletContext() + { + return context; + } + + /** + * implements the getCodeBase method of the AppletStub interface. + * @return the code base of the applet as given in the <APPLET> tag. + * @see java.applet.AppletStub#getCodeBase() + */ + public URL getCodeBase() + { + return codeBase; + } + + /** + * implements the getDocumentBase method of the AppletStub interface. + * @return the code base of the applet as given in the + * <APPLET> tag or determined by the containing page. + * @see java.applet.AppletStub#getDocumentBase() + */ + public URL getDocumentBase() + { + return docBase; + } + + /** + * get the applet's name + * @return the name of the applet as given in the + * <APPLET> tag or determined by the <em>code</em> parameter. + */ + public String getAppletName() + { + return appletName; + } + +} diff --git a/tdehtml/java/org/kde/kjas/server/KJASAudioClip.java b/tdehtml/java/org/kde/kjas/server/KJASAudioClip.java new file mode 100644 index 000000000..3a40cf6e0 --- /dev/null +++ b/tdehtml/java/org/kde/kjas/server/KJASAudioClip.java @@ -0,0 +1,98 @@ +package org.kde.kjas.server; + +import java.applet.*; +import java.net.*; +import java.util.*; +/** +* Background Audioclip Loader and Player. +* @author Till Krech (till@snafu.de) +*/ +public class KJASAudioClip implements AudioClip +{ + private AudioClip theClip; + private final static int PLAYING = 1; + private final static int LOOPING = 2; + private final static int STOPPED = 3; + private int state; + private static Hashtable cache = new Hashtable(); + + /** + * creates a new Audioclip. + * The AudioClip is loaded in background. The Constructor returns immediately. + */ + public KJASAudioClip(URL url) + { + state = STOPPED; + theClip = (AudioClip)cache.get(url); + if (theClip == null) { + final URL theUrl = url; + + new Thread + ( + new Runnable() { + public void run() { + theClip = java.applet.Applet.newAudioClip(theUrl); + cache.put(theUrl, theClip); + if (state == LOOPING) { + theClip.loop(); + } else if (state == PLAYING) { + theClip.play(); + } + } + }, "AudioClipLoader " + url.getFile() + ).start(); + } + } + + /** + * play continously when the clip is loaded + */ + public void loop() + { + state = LOOPING; + if (theClip != null) { + new Thread + ( + new Runnable() { + public void run() { + theClip.loop(); + } + }, "AudioClipLooper " + ).start(); + } + } + + /** + * play when the clip is loaded + */ + public void play() + { + state = PLAYING; + if (theClip != null) { + new Thread + ( + new Runnable() { + public void run() { + theClip.play(); + } + }, "AudioClipPlayer " + ).start(); + } + } + + /** + * stop the clip + */ + public void stop() + { + state = STOPPED; + if (theClip != null) { + theClip.stop(); + } + } + + public void finalize() { + stop(); + } +} + diff --git a/tdehtml/java/org/kde/kjas/server/KJASBrokenClassFixer.java b/tdehtml/java/org/kde/kjas/server/KJASBrokenClassFixer.java new file mode 100644 index 000000000..aab1be4af --- /dev/null +++ b/tdehtml/java/org/kde/kjas/server/KJASBrokenClassFixer.java @@ -0,0 +1,132 @@ +package org.kde.kjas.server; +import java.lang.reflect.*; +import java.net.URLClassLoader; +import java.net.URL; +/** +* wrapper for the javaplugin.jar Broken11ClassFixer. +* Uses the reflection api to wrap the class <i>sun.plugin.security.Broken11ClassFixer</i> +* from the javaplugin.jar archive which can be found in the jre/lib directory. +*/ +public class KJASBrokenClassFixer { + private static Class fixerClass = null; + private static Method _process; + private static Method _getProcessedData; + private static Method _getProcessedDataOffset; + private static Method _getProcessedDataLength; + private static boolean initialized = false; + private static final String fixerClassName = "sun.plugin.security.Broken11ClassFixer"; + private Object fixer = null; + private byte [] bytes; + private int offset; + private int length; + + /** + * creates a new KJASBrokenClassFixer. + * If it is the first one to be created, it tries to load the class + * <i>sun.plugin.security.Broken11ClassFixer</i> from the jar file + * <i>lib/javaplugin.jar</i> in the java jre directory. + */ + public KJASBrokenClassFixer() { + init(); + if (fixerClass != null) { + try { + fixer = fixerClass.newInstance(); + } catch (Throwable e) { + e.printStackTrace(); + } + } + } + + /** + * loads the class <i>sun.plugin.security.Broken11ClassFixer</i>, + * initializes the methods, ... + */ + private synchronized void init() { + if (initialized) { + return; + } + try { + URL [] urls = { new URL( + "file", "", 0, + System.getProperty("java.home") + + System.getProperty("file.separator") + + "lib" + + System.getProperty("file.separator") + + "javaplugin.jar"), new URL( + "file", "", 0, + System.getProperty("java.home") + + System.getProperty("file.separator") + + "lib" + + System.getProperty("file.separator") + + "plugin.jar") + }; + URLClassLoader loader = new URLClassLoader(urls); + fixerClass = Class.forName(fixerClassName, true, loader); + Main.debug("Loaded " + fixerClass); + final Class [] parameterTypes = { + (new byte[1]).getClass(), + Integer.TYPE, + Integer.TYPE + }; + final Class [] noParameter = new Class[0]; + _process = fixerClass.getMethod("process", parameterTypes); + _getProcessedData = fixerClass.getMethod("getProcessedData", noParameter); + _getProcessedDataOffset = fixerClass.getMethod("getProcessedDataOffset", noParameter); + _getProcessedDataLength = fixerClass.getMethod("getProcessedDataLength", noParameter); + } catch (Throwable e) { + e.printStackTrace(); + } finally { + initialized = true; + } + } + /** + * scan the broken bytes and create new ones. + * If the wrapped class could not be loaded or + * no instance of Broken11ClassFixer could be instantiated, + * this is a noop and later calls to getProcessedData() etc. + * will return the original data passed as arguments in this + * call. + */ + public boolean process(byte [] b, int off, int len) { + if (fixer != null) { + try { + Object [] args = new Object[3]; + args[0] = b; + args[1] = new Integer(off); + args[2] = new Integer(len); + Object [] none = new Object[0]; + + _process.invoke(fixer, args); + this.bytes = (byte[])_getProcessedData.invoke(fixer, none); + this.offset = ((Integer)_getProcessedDataOffset.invoke(fixer, none)).intValue(); + this.length = ((Integer)_getProcessedDataLength.invoke(fixer, none)).intValue(); + return true; + } catch (Throwable e) { + } + } + this.bytes = b; + this.offset = off; + this.length = len; + return false; + } + + /** + * get the offset in the processed byte array + */ + public int getProcessedDataOffset() { + return offset; + } + /** + * get the length of the processed data + */ + public int getProcessedDataLength() { + return length; + } + /** + * get the processed (fixed) data + */ + public byte [] getProcessedData() { + return bytes; + } + +} diff --git a/tdehtml/java/org/kde/kjas/server/KJASConsole.java b/tdehtml/java/org/kde/kjas/server/KJASConsole.java new file mode 100644 index 000000000..51498b59b --- /dev/null +++ b/tdehtml/java/org/kde/kjas/server/KJASConsole.java @@ -0,0 +1,93 @@ +package org.kde.kjas.server; + +import java.awt.*; +import java.awt.event.*; +import java.io.*; + +public class KJASConsole + extends Frame + implements Console +{ + private TextArea txt; + + public KJASConsole() + { + super("Konqueror Java Console"); + + txt = new TextArea(); + txt.setEditable(false); + txt.setBackground(Color.white); + txt.setForeground(Color.black); + + Panel main = new Panel(new BorderLayout()); + Panel btns = new Panel(new BorderLayout()); + + Button clear = new Button("Clear"); + Button close = new Button("Close"); + + btns.add(clear, "West"); + btns.add(close, "East"); + + main.add(txt, "Center"); + main.add(btns, "South"); + + add( main ); + + clear.addActionListener + ( + new ActionListener() { + public void actionPerformed(ActionEvent e) { + txt.setText(""); + } + } + ); + + close.addActionListener + ( + new ActionListener() { + public void actionPerformed(ActionEvent e) { + setVisible(false); + } + } + ); + + addWindowListener + ( + new WindowAdapter() { + public void windowClosing(WindowEvent e) { + setVisible(false); + } + } + ); + + setSize(500, 300); + + PrintStream st = new PrintStream( new KJASConsoleStream(this) ); + System.setOut(st); + System.setErr(st); + + System.out.println( "Java VM version: " + + System.getProperty("java.version") ); + System.out.println( "Java VM vendor: " + + System.getProperty("java.vendor") ); + } + + public void clear() { + txt.setText(""); + } + + public void append(String msg) { + if (msg == null) { + return; + } + int length = msg.length(); + synchronized(txt) { + //get the caret position, and then get the new position + int old_pos = txt.getCaretPosition(); + txt.append(msg); + txt.setCaretPosition( old_pos + length ); + } + } +} + + diff --git a/tdehtml/java/org/kde/kjas/server/KJASConsoleStream.java b/tdehtml/java/org/kde/kjas/server/KJASConsoleStream.java new file mode 100644 index 000000000..2c1152ed4 --- /dev/null +++ b/tdehtml/java/org/kde/kjas/server/KJASConsoleStream.java @@ -0,0 +1,46 @@ +package org.kde.kjas.server; +import java.io.*; + +class KJASConsoleStream + extends OutputStream +{ + private Console console; + private FileOutputStream dbg_log; + + public KJASConsoleStream(Console console) + { + this.console = console; + + try + { + if( Main.log ) + { + dbg_log = new FileOutputStream( "/tmp/kjas.log"); + } + } + catch( FileNotFoundException e ) {} + } + + public void close() {} + public void flush() {} + public void write(byte[] b) {} + public void write(int a) {} + + // Should be enough for the console + public void write( byte[] bytes, int offset, int length ) + { + try // Just in case + { + String msg = new String( bytes, offset, length ); + console.append(msg); + if( Main.log && dbg_log != null ) + { + dbg_log.write( msg.getBytes() ); + dbg_log.flush(); + } + } + catch(Throwable t) {} + } +} + + diff --git a/tdehtml/java/org/kde/kjas/server/KJASProtocolHandler.java b/tdehtml/java/org/kde/kjas/server/KJASProtocolHandler.java new file mode 100644 index 000000000..f8b50a91d --- /dev/null +++ b/tdehtml/java/org/kde/kjas/server/KJASProtocolHandler.java @@ -0,0 +1,900 @@ +package org.kde.kjas.server; + +import java.io.*; +import java.util.*; +import java.awt.*; +import java.net.*; + +/** + * Encapsulates the KJAS protocol and manages the contexts + * + */ +public class KJASProtocolHandler +{ + // Command codes- always need to be synced up with + // what's in kjavaappletserver.cpp + private static final int CreateContextCode = 1; + private static final int DestroyContextCode = 2; + private static final int CreateAppletCode = 3; + private static final int DestroyAppletCode = 4; + private static final int StartAppletCode = 5; + private static final int StopAppletCode = 6; + private static final int InitAppletCode = 7; + private static final int ShowDocumentCode = 8; + private static final int ShowURLInFrameCode = 9; + private static final int ShowStatusCode = 10; + private static final int ResizeAppletCode = 11; + private static final int GetURLDataCode = 12; + private static final int URLDataCode = 13; + private static final int ShutdownServerCode = 14; + private static final int JavaScriptEvent = 15; + static final int GetMember = 16; + static final int CallMember = 17; + private static final int PutMember = 18; + private static final int DerefObject = 19; + + private static final int AudioClipPlayCode = 20; + private static final int AudioClipLoopCode = 21; + private static final int AudioClipStopCode = 22; + + private static final int AppletStateNotificationCode = 23; + private static final int AppletFailedCode = 24; + private static final int DataCommand = 25; + private static final int PutURLDataCode = 26; + private static final int PutDataCode = 27; + private static final int SecurityConfirmCode = 28; + private static final int ShowConsole = 29; + + //Holds contexts in contextID-context pairs + private Hashtable contexts; + + private PushbackInputStream commands; //Stream for reading in commands + private PrintStream signals; //Stream for writing out callbacks + + //used for parsing each command as it comes in + private int cmd_index; + private final static char sep = (char) 0; + + public KJASProtocolHandler( InputStream _commands, + OutputStream _signals ) + { + commands = new PushbackInputStream( _commands ); + signals = new PrintStream( _signals ); + contexts = new Hashtable(); + } + + public void commandLoop() + { + try + { + while( true ) + { + try + { + int cmd_length = readPaddedLength( 8 ); + Main.debug( "PH: cmd_length = " + cmd_length ); + + //We need to have this while loop since we're not guaranteed to get + //all the bytes we want back, especially with large jars + byte[] cmd_data = new byte[cmd_length]; + int total_read = 0; + while( total_read < cmd_length ) + { + int numread = commands.read( cmd_data, total_read, cmd_length-total_read ); + Main.debug( "PH: read in " + numread + " bytes for command" ); + total_read += numread; + } + + //parse the rest of the command and execute it + processCommand( cmd_data ); + } + catch( NumberFormatException e ) + { + Main.kjas_err( "Could not parse out message length", e ); + e.printStackTrace(); + System.exit( 1 ); + } + catch( Throwable t ) + { + Main.debug( "commandLoop caught a throwable, still going" ); + t.printStackTrace(); + } + } + } + catch( Exception i ) + { + Main.kjas_err( "commandLoop exited on exception: ", i ); + i.printStackTrace(); + System.exit( 1 ); + } + } + + public void processCommand( byte[] command ) + { + // Sanity checks + if ( command == null ) + return; + + //do all the parsing here and pass arguments as individual variables to the + //handler functions + int cmd_length = command.length; + cmd_index = 0; + + int cmd_code_value = (int) command[cmd_index++]; + if( cmd_code_value == CreateContextCode ) + { + //parse out contextID- 1 argument + String contextID = getArg( command ); + Main.debug( "createContext, id = " + contextID ); + + KJASAppletContext context = new KJASAppletContext( contextID ); + contexts.put( contextID, context ); + } else + if( cmd_code_value == DestroyContextCode ) + { + //parse out contextID- 1 argument + String contextID = getArg( command ); + Main.debug( "destroyContext, id = " + contextID ); + + KJASAppletContext context = (KJASAppletContext) contexts.get( contextID ); + if( contexts != null ) + { + context.destroy(); + contexts.remove( contextID ); + } + } else + if( cmd_code_value == CreateAppletCode ) + { + //9 arguments- this order is important... + final String contextID = getArg( command ); + final String appletID = getArg( command ); + final String appletName = getArg( command ); + final String className = getArg( command ); + final String baseURL = getArg( command ); + final String username = getArg( command ); + final String password = getArg( command ); + final String authname = getArg( command ); + final String codeBase = getArg( command ); + final String archives = getArg( command ); + final String width = getArg( command ); + final String height = getArg( command ); + final String title = getArg( command ); + + //get the number of parameter pairs... + String str_params = getArg( command ); + int num_params = Integer.parseInt( str_params.trim() ); + final Hashtable params = new Hashtable(); + for( int i = 0; i < num_params; i++ ) + { + String name = getArg( command ); // note name is in uppercase + if( name == null ) + name = new String(); + + String value = getArg( command ); + if( value == null ) + value = new String(); + params.put( name, value ); + //Main.debug( "parameter, name = " + name + ", value = " + value ); + } + + Main.debug( "createApplet, context = " + contextID + ", applet = " + appletID ); + Main.debug( " name = " + appletName + ", classname = " + className ); + Main.debug( " baseURL = " + baseURL + ", codeBase = " + codeBase ); + Main.debug( " archives = " + archives + ", width = " + width + + ", height = " + height ); + + final KJASAppletContext context = (KJASAppletContext) contexts.get( contextID ); + if( context != null ) + { + context.createApplet( appletID, appletName, className, + baseURL, username, password, authname, + codeBase, archives, + width, height, title, params ); + } + + } else + if( cmd_code_value == DestroyAppletCode ) + { + //2 arguments + String contextID = getArg( command ); + String appletID = getArg( command ); + Main.debug( "destroyApplet, context = " + contextID + ", applet = " + appletID ); + + KJASAppletContext context = (KJASAppletContext) contexts.get( contextID ); + if ( context != null ) + context.destroyApplet( appletID ); + } else + if( cmd_code_value == StartAppletCode ) + { + //2 arguments + String contextID = getArg( command ); + String appletID = getArg( command ); + Main.debug( "startApplet, context = " + contextID + ", applet = " + appletID ); + + KJASAppletContext context = (KJASAppletContext) contexts.get( contextID ); + if ( context != null ) + context.startApplet( appletID ); + } else + if( cmd_code_value == StopAppletCode ) + { + //2 arguments + String contextID = getArg( command ); + String appletID = getArg( command ); + Main.debug( "stopApplet, context = " + contextID + ", applet = " + appletID ); + + KJASAppletContext context = (KJASAppletContext) contexts.get( contextID ); + if ( context != null ) + context.stopApplet( appletID ); + } else + if( cmd_code_value == ShutdownServerCode ) + { + Main.debug( "shutDownServer received" ); + KJASAppletStub.waitForAppletThreads(); + System.exit( 1 ); + } + else + if( cmd_code_value == URLDataCode ) + { + + String id = getArg( command ); + String code = getArg( command ); + Main.debug( "KIO URLData received(" + id + ") code:" + code ); + + //rest of the command should be the data... + byte[] data = null; + if (cmd_length - cmd_index > 0) { + data = new byte[ cmd_length - cmd_index ]; + System.arraycopy( command, cmd_index, data, 0, data.length ); + } + KIOConnection.setData(id, Integer.parseInt(code), data); + } else + if (cmd_code_value == GetMember) + { + int ticketnr = Integer.parseInt( getArg( command ) ); + String contextID = getArg( command ); + String appletID = getArg( command ); + int objid = Integer.parseInt( getArg( command ) ); + String name = getArg( command ); + KJASAppletContext context = (KJASAppletContext) contexts.get( contextID ); + if ( context == null || !context.getMember(appletID, ticketnr, objid, name)) + sendMemberValue(contextID, GetMember, ticketnr, -1, 0, ""); + } else + if (cmd_code_value == PutMember) + { + int ticketnr = Integer.parseInt( getArg( command ) ); + String contextID = getArg( command ); + String appletID = getArg( command ); + int objid = Integer.parseInt( getArg( command ) ); + String name = getArg( command ); + String value = getArg( command ); + boolean ret = false; + KJASAppletContext context = (KJASAppletContext) contexts.get( contextID ); + if (context == null || !context.putMember(appletID, ticketnr, objid, name, value)) + sendPutMember(contextID, ticketnr, false); + } else + if (cmd_code_value == CallMember) + { + int ticketnr = Integer.parseInt( getArg( command ) ); + String contextID = getArg( command ); + String appletID = getArg( command ); + int objid = Integer.parseInt( getArg( command ) ); + String name = getArg( command ); + int arg_count = Integer.parseInt( getArg( command ) ); + java.util.List args = new java.util.Vector(); + try { // fix getArg + String param = getArg(command); + while (arg_count-- > 0) { + if (param == null) + param = new String(); + args.add(param); + param = getArg(command); + } + } catch (Exception e) {} + + KJASAppletContext context = (KJASAppletContext) contexts.get( contextID ); + if ( context == null || !context.callMember(appletID, ticketnr, objid, name, args)) + Main.protocol.sendMemberValue(contextID, CallMember, ticketnr, -1, 0, ""); + } else + if (cmd_code_value == DerefObject) + { + String contextID = getArg( command ); + String appletID = getArg( command ); + String objid = getArg( command ); + KJASAppletContext context = (KJASAppletContext) contexts.get( contextID ); + if ( context != null ) + context.derefObject(appletID, Integer.parseInt(objid)); + Main.debug( "DerefObject " + objid); + } else + if (cmd_code_value == SecurityConfirmCode) + { + String id = getArg( command ); + String confirm = getArg( command ); + Thread t = (Thread) KJASSecurityManager.confirmRequests.get(id); + Main.debug( "SecurityConfirmCode " + id + " confirm:" + confirm ); + if (t != null) { + KJASSecurityManager.confirmRequests.put(id, confirm); + try { + t.interrupt(); + } catch (SecurityException se) {} + } + } else + if (cmd_code_value == ShowConsole) + { + Main.console.setVisible(true); + } + else + { + throw new IllegalArgumentException( "Unknown command code" ); + } + } + + /************************************************************** + ***** Methods for talking to the applet server ************** + **************************************************************/ + + /** + * sends get url request + */ + public void sendGetURLDataCmd( String jobid, String url ) + { + Main.debug( "sendGetURLCmd(" + jobid + ") url = " + url ); + //length = length of args plus 1 for code, 2 for seps and 1 for end + byte [] url_bytes = url.getBytes(); + int length = jobid.length() + url_bytes.length + 4; + byte [] bytes = new byte[ length + 8 ]; + byte [] tmp_bytes = getPaddedLengthBytes( length ); + int index = 0; + + System.arraycopy( tmp_bytes, 0, bytes, index, tmp_bytes.length ); + index += tmp_bytes.length; + bytes[index++] = (byte) GetURLDataCode; + bytes[index++] = sep; + + tmp_bytes = jobid.getBytes(); + System.arraycopy( tmp_bytes, 0, bytes, index, tmp_bytes.length ); + index += tmp_bytes.length; + bytes[index++] = sep; + + System.arraycopy( url_bytes, 0, bytes, index, url_bytes.length ); + index += url_bytes.length; + bytes[index++] = sep; + + signals.write( bytes, 0, bytes.length ); + } + + /** + * sends command for get url request (stop/hold/resume) or put (stop) + */ + public void sendDataCmd( String id, int cmd ) + { + Main.debug( "sendDataCmd(" + id + ") command = " + cmd ); + byte [] cmd_bytes = String.valueOf( cmd ).getBytes(); + int length = id.length() + cmd_bytes.length + 4; + byte [] bytes = new byte[ length + 8 ]; + byte [] tmp_bytes = getPaddedLengthBytes( length ); + int index = 0; + + System.arraycopy( tmp_bytes, 0, bytes, index, tmp_bytes.length ); + index += tmp_bytes.length; + bytes[index++] = (byte) DataCommand; + bytes[index++] = sep; + + tmp_bytes = id.getBytes(); + System.arraycopy( tmp_bytes, 0, bytes, index, tmp_bytes.length ); + index += tmp_bytes.length; + bytes[index++] = sep; + + System.arraycopy( cmd_bytes, 0, bytes, index, cmd_bytes.length ); + index += cmd_bytes.length; + bytes[index++] = sep; + + signals.write( bytes, 0, bytes.length ); + } + /** + * sends put url request + */ + public void sendPutURLDataCmd( String jobid, String url ) + { + Main.debug( "sendPutURLCmd(" + jobid + ") url = " + url ); + //length = length of args plus 1 for code, 2 for seps and 1 for end + byte [] url_bytes = url.getBytes(); + int length = jobid.length() + url_bytes.length + 4; + byte [] bytes = new byte[ length + 8 ]; + byte [] tmp_bytes = getPaddedLengthBytes( length ); + int index = 0; + + System.arraycopy( tmp_bytes, 0, bytes, index, tmp_bytes.length ); + index += tmp_bytes.length; + bytes[index++] = (byte) PutURLDataCode; + bytes[index++] = sep; + + tmp_bytes = jobid.getBytes(); + System.arraycopy( tmp_bytes, 0, bytes, index, tmp_bytes.length ); + index += tmp_bytes.length; + bytes[index++] = sep; + + System.arraycopy( url_bytes, 0, bytes, index, url_bytes.length ); + index += url_bytes.length; + bytes[index++] = sep; + + signals.write( bytes, 0, bytes.length ); + } + /** + * sends put data + */ + public void sendPutData( String jobid, byte [] b, int off, int len ) + { + Main.debug( "sendPutData(" + jobid + ") len = " + len ); + //length = length of args plus 1 for code, 2 for seps and 1 for end + int length = jobid.length() + len + 4; + byte [] bytes = new byte[ length + 8 ]; + byte [] tmp_bytes = getPaddedLengthBytes( length ); + int index = 0; + + System.arraycopy( tmp_bytes, 0, bytes, index, tmp_bytes.length ); + index += tmp_bytes.length; + bytes[index++] = (byte) PutDataCode; + bytes[index++] = sep; + + tmp_bytes = jobid.getBytes(); + System.arraycopy( tmp_bytes, 0, bytes, index, tmp_bytes.length ); + index += tmp_bytes.length; + bytes[index++] = sep; + + System.arraycopy( b, off, bytes, index, len ); + index += len; + bytes[index++] = sep; + + signals.write( bytes, 0, bytes.length ); + } + /** + * sends notification about the state of the applet. + * @see org.kde.kjas.server.KJASAppletStub for valid states + */ + public void sendAppletStateNotification( String contextID, String appletID, int state ) + { + Main.debug( "sendAppletStateNotification, contextID = " + contextID + ", appletID = " + + appletID + ", state=" + state ); + + byte [] state_bytes = String.valueOf( state ).getBytes(); + + int length = contextID.length() + appletID.length() + state_bytes.length + 5; + byte [] bytes = new byte[ length + 8 ]; //for length of message + byte [] tmp_bytes = getPaddedLengthBytes( length ); + int index = 0; + + System.arraycopy( tmp_bytes, 0, bytes, index, tmp_bytes.length ); + index += tmp_bytes.length; + bytes[index++] = (byte) AppletStateNotificationCode; + bytes[index++] = sep; + + tmp_bytes = contextID.getBytes(); + System.arraycopy( tmp_bytes, 0, bytes, index, tmp_bytes.length ); + index += tmp_bytes.length; + bytes[index++] = sep; + + tmp_bytes = appletID.getBytes(); + System.arraycopy( tmp_bytes, 0, bytes, index, tmp_bytes.length ); + index += tmp_bytes.length; + bytes[index++] = sep; + + System.arraycopy( state_bytes, 0, bytes, index, state_bytes.length ); + index += state_bytes.length; + bytes[index++] = sep; + + signals.write( bytes, 0, bytes.length ); + } + + /** + * sends notification about applet failure. + * This can happen in any state. + * @param contextID context ID of the applet's context + * @param appletID ID of the applet + * @param errorMessage any message + */ + public void sendAppletFailed ( String contextID, String appletID, String errorMessage) + { + Main.debug( "sendAppletFailed, contextID = " + contextID + ", appletID = " + + appletID + ", errorMessage=" + errorMessage ); + byte [] msg_bytes = errorMessage.getBytes(); + int length = contextID.length() + appletID.length() + msg_bytes.length + 5; + byte [] bytes = new byte[ length + 8 ]; //for length of message + byte [] tmp_bytes = getPaddedLengthBytes( length ); + int index = 0; + + System.arraycopy( tmp_bytes, 0, bytes, index, tmp_bytes.length ); + index += tmp_bytes.length; + bytes[index++] = (byte) AppletFailedCode; + bytes[index++] = sep; + + tmp_bytes = contextID.getBytes(); + System.arraycopy( tmp_bytes, 0, bytes, index, tmp_bytes.length ); + index += tmp_bytes.length; + bytes[index++] = sep; + + tmp_bytes = appletID.getBytes(); + System.arraycopy( tmp_bytes, 0, bytes, index, tmp_bytes.length ); + index += tmp_bytes.length; + bytes[index++] = sep; + + System.arraycopy( msg_bytes, 0, bytes, index, msg_bytes.length ); + index += msg_bytes.length; + bytes[index++] = sep; + + signals.write( bytes, 0, bytes.length ); + } + + public void sendShowDocumentCmd( String loaderKey, String url ) + { + Main.debug( "sendShowDocumentCmd from context#" + loaderKey + " url = " + url ); + + //length = length of args + 2 for seps + 1 for end + 1 for code + byte [] url_bytes = url.getBytes(); + byte [] key_bytes = loaderKey.getBytes(); + int length = key_bytes.length + url_bytes.length + 4; + byte [] bytes = new byte[ length + 8 ]; //8 for the length of this message + byte [] tmp_bytes = getPaddedLengthBytes( length ); + int index = 0; + + System.arraycopy( tmp_bytes, 0, bytes, index, tmp_bytes.length ); + index += tmp_bytes.length; + bytes[index++] = (byte) ShowDocumentCode; + bytes[index++] = sep; + + System.arraycopy( key_bytes, 0, bytes, index, key_bytes.length ); + index += key_bytes.length; + bytes[index++] = sep; + + System.arraycopy( url_bytes, 0, bytes, index, url_bytes.length ); + index += url_bytes.length; + bytes[index++] = sep; + + signals.write( bytes, 0, bytes.length ); + } + + public void sendShowDocumentCmd( String contextID, String url, String frame) + { + Main.debug( "sendShowDocumentCmd from context#" + contextID + + " url = " + url + ", frame = " + frame ); + + //length = length of args plus code, 3 seps, end + byte [] url_bytes = url.getBytes(); + byte [] frame_bytes = frame.getBytes(); + int length = contextID.length() + url_bytes.length + frame_bytes.length + 5; + byte [] bytes = new byte[ length + 8 ]; //for length of message + byte [] tmp_bytes = getPaddedLengthBytes( length ); + int index = 0; + + System.arraycopy( tmp_bytes, 0, bytes, index, tmp_bytes.length ); + index += tmp_bytes.length; + bytes[index++] = (byte) ShowURLInFrameCode; + bytes[index++] = sep; + + tmp_bytes = contextID.getBytes(); + System.arraycopy( tmp_bytes, 0, bytes, index, tmp_bytes.length ); + index += tmp_bytes.length; + bytes[index++] = sep; + + System.arraycopy( url_bytes, 0, bytes, index, url_bytes.length ); + index += url_bytes.length; + bytes[index++] = sep; + + System.arraycopy( frame_bytes, 0, bytes, index, frame_bytes.length ); + index += frame_bytes.length; + bytes[index++] = sep; + + signals.write( bytes, 0, bytes.length ); + } + + public void sendShowStatusCmd( String contextID, String msg ) + { + Main.debug( "sendShowStatusCmd, contextID = " + contextID + " msg = " + msg ); + + byte [] msg_bytes = msg.getBytes(); + int length = contextID.length() + msg_bytes.length + 4; + byte [] bytes = new byte[ length + 8 ]; //for length of message + int index = 0; + + byte [] tmp_bytes = getPaddedLengthBytes( length ); + System.arraycopy( tmp_bytes, 0, bytes, index, tmp_bytes.length ); + index += tmp_bytes.length; + bytes[index++] = (byte) ShowStatusCode; + bytes[index++] = sep; + + tmp_bytes = contextID.getBytes(); + System.arraycopy( tmp_bytes, 0, bytes, index, tmp_bytes.length ); + index += tmp_bytes.length; + bytes[index++] = sep; + + System.arraycopy( msg_bytes, 0, bytes, index, msg_bytes.length ); + index += msg_bytes.length; + bytes[index++] = sep; + + signals.write( bytes, 0, bytes.length ); + } + + public void sendResizeAppletCmd( String contextID, String appletID, + int width, int height ) + { + Main.debug( "sendResizeAppletCmd, contextID = " + contextID + ", appletID = " + + appletID + ", width = " + width + ", height = " + height ); + + byte [] width_bytes = String.valueOf( width ).getBytes(); + byte [] height_bytes = String.valueOf( height ).getBytes(); + + //length = length of args plus code, 4 seps, end + int length = contextID.length() + appletID.length() + width_bytes.length + + height_bytes.length + 6; + byte [] bytes = new byte[ length + 8 ]; //for length of message + byte [] tmp_bytes = getPaddedLengthBytes( length ); + int index = 0; + + System.arraycopy( tmp_bytes, 0, bytes, index, tmp_bytes.length ); + index += tmp_bytes.length; + bytes[index++] = (byte) ResizeAppletCode; + bytes[index++] = sep; + + tmp_bytes = contextID.getBytes(); + System.arraycopy( tmp_bytes, 0, bytes, index, tmp_bytes.length ); + index += tmp_bytes.length; + bytes[index++] = sep; + + tmp_bytes = appletID.getBytes(); + System.arraycopy( tmp_bytes, 0, bytes, index, tmp_bytes.length ); + index += tmp_bytes.length; + bytes[index++] = sep; + + System.arraycopy( width_bytes, 0, bytes, index, width_bytes.length ); + index += width_bytes.length; + bytes[index++] = sep; + + System.arraycopy( height_bytes, 0, bytes, index, height_bytes.length ); + index += height_bytes.length; + bytes[index++] = sep; + + signals.write( bytes, 0, bytes.length ); + } + public void sendJavaScriptEventCmd( String contextID, String appletID, int objid, String event, int [] types, String [] args ) + { + Main.debug( "sendJavaScriptEventCmd, contextID = " + contextID + " event = " + event ); + String objstr = new String("" + objid); + int length = contextID.length() + appletID.length() + event.length() + objstr.length() + 6; + byte [][][] arglist = null; + if (types != null) { + arglist = new byte[args.length][2][]; + for (int i = 0; i < types.length; i++) { + arglist[i][0] = (new String("" + types[i])).getBytes(); + arglist[i][1] = args[i].getBytes(); + length += 2 + arglist[i][0].length + arglist[i][1].length; + } + } + byte [] bytes = new byte[ length + 8 ]; //for length of message + int index = 0; + + byte [] tmp_bytes = getPaddedLengthBytes( length ); + System.arraycopy( tmp_bytes, 0, bytes, index, tmp_bytes.length ); + index += tmp_bytes.length; + bytes[index++] = (byte) JavaScriptEvent; + bytes[index++] = sep; + + tmp_bytes = contextID.getBytes(); + System.arraycopy( tmp_bytes, 0, bytes, index, tmp_bytes.length ); + index += tmp_bytes.length; + bytes[index++] = sep; + + tmp_bytes = appletID.getBytes(); + System.arraycopy( tmp_bytes, 0, bytes, index, tmp_bytes.length ); + index += tmp_bytes.length; + bytes[index++] = sep; + + tmp_bytes = objstr.getBytes(); + System.arraycopy( tmp_bytes, 0, bytes, index, tmp_bytes.length ); + index += tmp_bytes.length; + bytes[index++] = sep; + + tmp_bytes = event.getBytes(); + System.arraycopy( tmp_bytes, 0, bytes, index, tmp_bytes.length ); + index += tmp_bytes.length; + bytes[index++] = sep; + + if (types != null) + for (int i = 0; i < types.length; i++) { + System.arraycopy( arglist[i][0], 0, bytes, index, arglist[i][0].length ); + index += arglist[i][0].length; + bytes[index++] = sep; + System.arraycopy( arglist[i][1], 0, bytes, index, arglist[i][1].length ); + index += arglist[i][1].length; + bytes[index++] = sep; + } + + signals.write( bytes, 0, bytes.length ); + } + public void sendMemberValue( String contextID, int cmd, int ticketnr, int type, int rid, String value ) + { + Main.debug( "sendMemberValue, contextID = " + contextID + " value = " + value + " type=" + type + " rid=" + rid ); + + String strticket = String.valueOf( ticketnr ); + String strtype = String.valueOf( type ); + String strobj = String.valueOf( rid ); + byte [] value_bytes = value.getBytes(); + int length = contextID.length() + value_bytes.length + strtype.length() + strobj.length() + strticket.length() + 7; + byte [] bytes = new byte[ length + 8 ]; //for length of message + int index = 0; + + byte [] tmp_bytes = getPaddedLengthBytes( length ); + System.arraycopy( tmp_bytes, 0, bytes, index, tmp_bytes.length ); + index += tmp_bytes.length; + bytes[index++] = (byte) cmd; + bytes[index++] = sep; + + tmp_bytes = contextID.getBytes(); + System.arraycopy( tmp_bytes, 0, bytes, index, tmp_bytes.length ); + index += tmp_bytes.length; + bytes[index++] = sep; + + tmp_bytes = strticket.getBytes(); + System.arraycopy( tmp_bytes, 0, bytes, index, tmp_bytes.length ); + index += tmp_bytes.length; + bytes[index++] = sep; + + tmp_bytes = strtype.getBytes(); + System.arraycopy( tmp_bytes, 0, bytes, index, tmp_bytes.length ); + index += tmp_bytes.length; + bytes[index++] = sep; + + tmp_bytes = strobj.getBytes(); + System.arraycopy( tmp_bytes, 0, bytes, index, tmp_bytes.length ); + index += tmp_bytes.length; + bytes[index++] = sep; + + System.arraycopy( value_bytes, 0, bytes, index, value_bytes.length ); + index += value_bytes.length; + bytes[index++] = sep; + + signals.write( bytes, 0, bytes.length ); + } + + private void sendAudioClipCommand(String contextId, String url, int cmd) { + byte [] url_bytes = url.getBytes(); + int length = contextId.length() + url_bytes.length + 4; + byte [] bytes = new byte[ length + 8 ]; + byte [] tmp_bytes = getPaddedLengthBytes( length ); + int index = 0; + + System.arraycopy( tmp_bytes, 0, bytes, index, tmp_bytes.length ); + index += tmp_bytes.length; + bytes[index++] = (byte) cmd; + bytes[index++] = sep; + + tmp_bytes = contextId.getBytes(); + System.arraycopy( tmp_bytes, 0, bytes, index, tmp_bytes.length ); + index += tmp_bytes.length; + bytes[index++] = sep; + + System.arraycopy( url_bytes, 0, bytes, index, url_bytes.length ); + index += url_bytes.length; + bytes[index++] = sep; + + signals.write( bytes, 0, bytes.length ); + } + + public void sendAudioClipPlayCommand(String contextId, String url) { + sendAudioClipCommand(contextId, url, AudioClipPlayCode); + } + public void sendAudioClipLoopCommand(String contextId, String url) { + sendAudioClipCommand(contextId, url, AudioClipLoopCode); + } + public void sendAudioClipStopCommand(String contextId, String url) { + sendAudioClipCommand(contextId, url, AudioClipStopCode); + } + + public void sendPutMember( String contextID, int ticketnr, boolean success ) + { + Main.debug("sendPutMember, contextID = " + contextID + " success = " + success); + + byte [] ticket_bytes = String.valueOf( ticketnr ).getBytes(); + byte [] ret_bytes = String.valueOf( success ? "1" : "0" ).getBytes(); + int length = contextID.length() + ret_bytes.length + ticket_bytes.length + 5; + byte [] bytes = new byte[ length + 8 ]; //for length of message + byte [] tmp_bytes = getPaddedLengthBytes( length ); + int index = 0; + + System.arraycopy( tmp_bytes, 0, bytes, index, tmp_bytes.length ); + index += tmp_bytes.length; + bytes[index++] = (byte) PutMember; + bytes[index++] = sep; + + tmp_bytes = contextID.getBytes(); + System.arraycopy( tmp_bytes, 0, bytes, index, tmp_bytes.length ); + index += tmp_bytes.length; + bytes[index++] = sep; + + System.arraycopy( ticket_bytes, 0, bytes, index, ticket_bytes.length ); + index += ticket_bytes.length; + bytes[index++] = sep; + + System.arraycopy( ret_bytes, 0, bytes, index, ret_bytes.length ); + index += ret_bytes.length; + bytes[index++] = sep; + + signals.write( bytes, 0, bytes.length ); + } + public void sendSecurityConfirm( String [] certs, int certsnr, String perm, String id ) + { + Main.debug("sendSecurityConfirm, ID = " + id + " certsnr = " + certsnr); + + byte [] id_bytes = id.getBytes(); + byte [] perm_bytes = perm.getBytes(); + byte [] certsnr_bytes = String.valueOf( certsnr ).getBytes(); + int length = perm_bytes.length + id_bytes.length + certsnr_bytes.length + 5; + for (int i = 0; i < certsnr; i++) + length += certs[i].length() + 1; + byte [] bytes = new byte[ length + 8 ]; //for length of message + byte [] tmp_bytes = getPaddedLengthBytes( length ); + int index = 0; + + System.arraycopy( tmp_bytes, 0, bytes, index, tmp_bytes.length ); + index += tmp_bytes.length; + bytes[index++] = (byte) SecurityConfirmCode; + bytes[index++] = sep; + + System.arraycopy( id_bytes, 0, bytes, index, id_bytes.length ); + index += id_bytes.length; + bytes[index++] = sep; + + System.arraycopy( perm_bytes, 0, bytes, index, perm_bytes.length ); + index += perm_bytes.length; + bytes[index++] = sep; + + System.arraycopy( certsnr_bytes, 0, bytes, index, certsnr_bytes.length ); + index += certsnr_bytes.length; + bytes[index++] = sep; + + for (int i = 0; i < certsnr; i++) { + byte [] cert_bytes = certs[i].getBytes(); + System.arraycopy( cert_bytes, 0, bytes, index, cert_bytes.length ); + index += cert_bytes.length; + bytes[index++] = sep; + } + + signals.write( bytes, 0, bytes.length ); + } + /************************************************************** + ***** Utility functions for parsing commands **************** + **************************************************************/ + private String getArg( byte[] command ) + { + int begin = cmd_index; + while( 0 != ((int) command[cmd_index++]) ); + + if( cmd_index > (begin + 1) ) + { + String rval = new String( command, begin, (cmd_index - begin - 1) ); + return rval; + } + else + return null; + } + + private byte[] getPaddedLengthBytes( int length ) + { + byte[] length_bytes = String.valueOf( length ).getBytes(); + if( length_bytes.length > 8 ) + throw new IllegalArgumentException( "can't create string number of length = 8" ); + byte [] bytes = { (byte) ' ', (byte) ' ', (byte) ' ', (byte) ' ', + (byte) ' ', (byte) ' ', (byte) ' ', (byte) ' '}; + System.arraycopy( length_bytes, 0, bytes, 0, length_bytes.length ); + return bytes; + } + private int readPaddedLength( int string_size ) + throws IOException + { + //read in 8 bytes for command length- length will be sent as a padded string + byte[] length = new byte[string_size]; + commands.read( length, 0, string_size ); + + String length_str = new String( length ); + return Integer.parseInt( length_str.trim() ); + } + +} diff --git a/tdehtml/java/org/kde/kjas/server/KJASSecurityManager.java b/tdehtml/java/org/kde/kjas/server/KJASSecurityManager.java new file mode 100644 index 000000000..0525bba0c --- /dev/null +++ b/tdehtml/java/org/kde/kjas/server/KJASSecurityManager.java @@ -0,0 +1,243 @@ +package org.kde.kjas.server; + +import java.security.*; +import java.security.cert.*; +import java.net.*; +import java.util.*; + + +public class KJASSecurityManager extends SecurityManager +{ + static Hashtable confirmRequests = new Hashtable(); + static int confirmId = 0; + Hashtable grantedPermissions = new Hashtable(); + HashSet grantAllPermissions = new HashSet(); + HashSet rejectAllPermissions = new HashSet(); + + private static final char [] base64table = { + 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', + 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', + 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', + 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', + '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '+', '/' + }; + static String encode64( byte [] data) + { + StringBuffer buf = new StringBuffer( 4*((data.length + 2)/3) ); + int i = 0, b1, b2, b3; + while (i < data.length - 2) { + b1 = data[i++]; + b2 = data[i++]; + b3 = data[i++]; + buf.append( base64table[(b1 >>> 2) & 0x3F] ); + buf.append( base64table[((b1 << 4) & 0x30) | ((b2 >>> 4) & 0xF)] ); + buf.append( base64table[((b2 << 2) & 0x3C) | ((b3 >>> 6) & 0x03)] ); + buf.append( base64table[b3 & 0x3F] ); + } + if ( i < data.length ) { + b1 = data[i++]; + buf.append( base64table[(b1 >>> 2) & 0x3F] ); + if ( i < data.length ) { + b2 = data[i++]; + buf.append( base64table[((b1 << 4) & 0x30) | ((b2 >>> 4) & 0xF)] ); + buf.append( base64table[(b2 << 2) & 0x3C] ); + } else { + buf.append( base64table[(b1 << 4) & 0x30] ); + buf.append( "=" ); + } + buf.append( '=' ); + } + return buf.toString(); + } + public KJASSecurityManager() + { + } + /** + * checks for an applets permission to access certain resources + * currently, only a check for SocketPermission is done, that the + * applet cannot connect to any other but the host, where it comes from. + * Anything else seems to be handled automagically + */ + public void checkPermission(Permission perm) throws SecurityException, NullPointerException { + // ClassLoader cl = Thread.currentThread().getContextClassLoader(); + try { + super.checkPermission(perm); + } catch (SecurityException se) { + // Don't annoy users with these + if (/*perm instanceof java.lang.RuntimePermission || */ + perm instanceof java.awt.AWTPermission) + throw se; + + // Collect certificates + HashSet signers = new HashSet(); + Class [] cls = getClassContext(); + for (int i = 1; i < cls.length; i++) { + Object[] objs = cls[i].getSigners(); + if (objs != null && objs.length > 0) { + for (int j = 0; j < objs.length; j++) + if (objs[j] instanceof X509Certificate) + signers.add( ((X509Certificate) objs[j]) ); + } + } + Main.debug("Certificates " + signers.size() + " for " + perm); + + // Check granted/denied permission + if ( grantAllPermissions.contains(signers) ) + return; + if ( rejectAllPermissions.contains(signers) ) + throw se; + Permissions permissions = (Permissions) grantedPermissions.get(signers); + if (permissions != null && permissions.implies(perm)) + return; + + // Ok, ask user what to do + String [] certs = new String[signers.size()]; + int certsnr = 0; + for (Iterator i = signers.iterator(); i.hasNext(); ) { + try { + certs[certsnr] = encode64( ((X509Certificate) i.next()).getEncoded() ); + certsnr++; + } catch (CertificateEncodingException cee) {} + } + if (certsnr == 0) + throw se; + String id = "" + confirmId++; + confirmRequests.put(id, Thread.currentThread()); + Main.protocol.sendSecurityConfirm(certs, certsnr, perm.toString(), id); + boolean granted = false; + try { + Thread.sleep(300000); + } catch (InterruptedException ie) { + if (((String) confirmRequests.get(id)).equals("yes")) { + granted = true; + permissions = (Permissions) grantedPermissions.get(signers); + if (permissions == null) { + permissions = new Permissions(); + grantedPermissions.put(signers, permissions); + } + permissions.add(perm); + } else if (((String) confirmRequests.get(id)).equals("grant")) { + grantAllPermissions.add( signers ); + granted = true; + } else if (((String) confirmRequests.get(id)).equals("reject")) { + rejectAllPermissions.add( signers ); + } // else "no", "nossl" or "invalid" + } finally { + confirmRequests.remove(id); + } + if (!granted) { + Main.debug("Permission denied" + perm); + throw se; + } + } + } + + // keytool -genkey -keystore mystore -alias myalias + // keytool -export -keystore mystore -alias myalias -file mycert + // keytool -printcert -file mycert + // keytool -import -keystore myotherstore -alias myalias -file mycert + // jarsigner -keystore mystore myjar.jar myalias + // jarsigner -verify -keystore myotherstore myjar.jar + // + // policy file (use policytool and check java.security): + // keystore "file:myotherstore", "JKS" + // grant signedBy "myalias" + // { + // permission java.io.FilePermission "<<ALL FILES>>", "read" + // } + // + // java code: + // KeyStore store = KeyStore.getInstance("JKS", "SUN"); + public void disabled___checkPermission(Permission perm) throws SecurityException, NullPointerException + { + // does not seem to work as expected, Problems with proxy - and it seems that the default + // implementation already does all that well, what I wanted to do here. + // It is likely that this method will hence disappear soon again. + Object context = getSecurityContext(); + Thread thread = Thread.currentThread(); + if (perm instanceof SocketPermission) { + // check if this is a connection back to the originating host + // if not, fall through and call super.checkPermission + // this gives normally access denied + Main.debug("*** checkPermission " + perm + " in context=" + context + " Thread=" + thread); + // use the context class loader to determine if this is one + // of our applets + ClassLoader contextClassLoader = thread.getContextClassLoader(); + Main.debug("* ClassLoader=" + contextClassLoader); + try { + // try to cast ... + KJASAppletClassLoader loader = (KJASAppletClassLoader)contextClassLoader; + // ok. cast succeeded. Now get the codebase of the loader + // because it contains the host name + URL codebase = loader.getCodeBase(); + URL docbase = loader.getDocBase(); + Main.debug("* Class Loader docbase=" + docbase + " codebase=" + codebase); + String hostname = perm.getName(); + // extract the hostname from the permission name + // which is something like "some.host.domain:XX" + // with XX as the port number + int colonIdx = hostname.indexOf(':'); + if (colonIdx > 0) { + // strip of the port + hostname = hostname.substring(0, colonIdx); + } + // Main.info("Checking " + hostname + "<->" + codebase.getHost()); + + if (hostsAreEqual(hostname, codebase.getHost())) { + // ok, host matches + String actions = perm.getActions(); + // just check if listen is specified which we do not want + // to allow + if (actions != null && actions.indexOf("listen") >= 0) { + Main.debug("* Listen is not allowed."); + } else { + // ok, just return and throw _no_ exception + Main.debug("* Hostname equals. Permission granted."); + return; + } + } else { + Main.info("Host mismatch: " + perm + " != " + codebase.getHost()); + } + } catch (ClassCastException e) { + Main.debug("* ClassLoader is not a KJASAppletClassLoader"); + } + Main.debug("* Fall through to super.checkPermission()"); + } + super.checkPermission(perm); + } + + private static final boolean hostsAreEqual(String host1, String host2) { + if (host1 == null || host2 == null) { + return false; + } + if (host1.length() == 0 || host2.length() == 0) { + return false; + } + if (host1.equalsIgnoreCase(host2)) { + return true; + } + + if ( Main.proxyHost != null && Main.proxyPort != 0) { + // if we use a proxy, we certainly cannot use DNS + return false; + } + + InetAddress inet1=null, inet2=null; + try { + inet1 = InetAddress.getByName(host1); + } catch (UnknownHostException e) { + Main.kjas_err("Unknown host:" + host1, e); + return false; + } + try { + inet2 = InetAddress.getByName(host2); + } catch (UnknownHostException e) { + Main.kjas_err("Unknown host:" + host2, e); + return false; + } + if (inet1.equals(inet2)) { + return true; + } + return false; + } +} diff --git a/tdehtml/java/org/kde/kjas/server/KJASSoundPlayer.java b/tdehtml/java/org/kde/kjas/server/KJASSoundPlayer.java new file mode 100644 index 000000000..a37c2bbd4 --- /dev/null +++ b/tdehtml/java/org/kde/kjas/server/KJASSoundPlayer.java @@ -0,0 +1,36 @@ +package org.kde.kjas.server; + +import java.applet.*; +import java.net.*; + +public class KJASSoundPlayer implements AudioClip +{ + private String file; + private String contextId; + + public KJASSoundPlayer( String _contextId, URL _file ) + { + file = _file.toString(); + contextId = _contextId; + Main.debug("KJASSoundPlayer( URL '" + _file + "')"); + } + + public void loop() + { + Main.debug("KJASSoundPlayer loop() URL='" + file + "'"); + Main.protocol.sendAudioClipLoopCommand(contextId, file); + } + + public void play() + { + Main.debug("KJASSoundPlayer play() URL='" + file + "'"); + Main.protocol.sendAudioClipPlayCommand(contextId, file); + } + + public void stop() + { + Main.debug("KJASSoundPlayer stop() URL='" + file + "'"); + Main.protocol.sendAudioClipStopCommand(contextId, file); + } +} + diff --git a/tdehtml/java/org/kde/kjas/server/KJASSwingConsole.java b/tdehtml/java/org/kde/kjas/server/KJASSwingConsole.java new file mode 100644 index 000000000..fedda6c48 --- /dev/null +++ b/tdehtml/java/org/kde/kjas/server/KJASSwingConsole.java @@ -0,0 +1,325 @@ +/* This file is part of the KDE project + * + * Copyright (C) 2002 Till + * Copyright (C) 2005 Koos Vriezen <koos ! vriezen () xs4all ! nl> + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public License + * along with this library; see the file COPYING.LIB. If not, write to + * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. + */ + +package org.kde.kjas.server; + +import java.awt.Toolkit; +import java.awt.Image; +import java.awt.BorderLayout; +import java.awt.event.ActionListener; +import java.awt.event.ActionEvent; +import java.awt.event.KeyAdapter; +import java.awt.event.KeyEvent; +import java.awt.event.WindowAdapter; +import java.awt.event.WindowEvent; +import java.io.PrintStream; +import java.util.Enumeration; +import java.util.Properties; +import javax.swing.JFrame; +import javax.swing.JPanel; +import javax.swing.JScrollPane; +import javax.swing.JButton; +import javax.swing.JTextArea; +import javax.swing.border.EmptyBorder; + + +public class KJASSwingConsole implements Console { + private JFrame frame = null; + private JPanel jPanel1; + private JScrollPane jScrollPane1; + private JButton clearButton; + private JTextArea textField; + private JButton closeButton; + private JButton copyButton; + final static int NR_BUFFERS = 3; + final static int MAX_BUF_LENGTH = 3000; + private int queue_pos = 0; + private StringBuffer [] output_buffer = new StringBuffer[NR_BUFFERS]; + + private PrintStream real_stderr = new PrintStream(System.err); + + /** Creates new form KJASSwingConsole */ + public KJASSwingConsole() { + PrintStream st = new PrintStream( new KJASConsoleStream(this) ); + System.setOut(st); + System.setErr(st); + } + + private void initComponents() { + frame = new JFrame("Konqueror Java Console"); + jPanel1 = new JPanel(); + clearButton = new JButton(); + closeButton = new JButton(); + copyButton = new JButton(); + jScrollPane1 = new JScrollPane(); + textField = new JTextArea(); + + frame.setFont(new java.awt.Font("Monospaced", 0, 10)); + frame.setName("KJAS Console"); + frame.addWindowListener(new WindowAdapter() { + public void windowClosing(WindowEvent evt) { + exitForm(evt); + } + }); + + jPanel1.setLayout(new BorderLayout()); + jPanel1.setBorder(new EmptyBorder(new java.awt.Insets(1, 1, 1, 1))); + clearButton.setText("clear"); + clearButton.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent evt) { + clearButtonActionPerformed(evt); + } + }); + + jPanel1.add(clearButton, BorderLayout.WEST); + + closeButton.setText("close"); + closeButton.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent evt) { + closeButtonActionPerformed(evt); + } + }); + + jPanel1.add(closeButton, BorderLayout.EAST); + + copyButton.setText("copy"); + copyButton.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent evt) { + copyButtonActionPerformed(evt); + } + }); + + jPanel1.add(copyButton, BorderLayout.CENTER); + + frame.getContentPane().add(jPanel1, BorderLayout.SOUTH); + + textField.setColumns(40); + textField.setEditable(false); + textField.setRows(10); + textField.addKeyListener(new KeyAdapter() { + public void keyPressed(KeyEvent evt) { + textFieldKeyPressed(evt); + } + }); + + jScrollPane1.setViewportView(textField); + + frame.getContentPane().add(jScrollPane1, BorderLayout.CENTER); + + try { + java.net.URL iconUrl = getClass().getClassLoader().getResource("images/beanicon.png"); + if (iconUrl != null) { + Toolkit tk = Toolkit.getDefaultToolkit(); + Image icon = tk.createImage(iconUrl); + frame.setIconImage(icon); + } + } catch (Throwable e) { + } + frame.pack(); + frame.setSize(500, 300); + } + + private void textFieldKeyPressed(java.awt.event.KeyEvent evt) { + // Add your handling code here: + char key = evt.getKeyChar(); + switch (key) { + case 'h': + showHelp(); + break; + case 'g': + append("Running Garbage Collection ...\n", true); + System.gc(); + case 'm': + append("Total Memory: " + Runtime.getRuntime().totalMemory() + " bytes\n", true); + append("Free Memory : " + Runtime.getRuntime().freeMemory() + " bytes\n", true); + break; + case 'c': + clear(); + break; + case 's': + showSystemProperties(); + break; + case 't': + showThreads(); + break; + case 'x': + KJASAppletClassLoader.removeLoaders(); + append("Emptied Classloader Cache\n", true); + break; + } + } + + private void showHelp() { + append("Java VM: " + System.getProperty("java.vendor") + " " + System.getProperty("java.version") + "\n", true); + String ph = System.getProperty("http.proxyHost"); + if (ph != null) { + append("Proxy: " + ph + ":" + System.getProperty("java.proxyPort") + "\n", true); + } + SecurityManager sec = System.getSecurityManager(); + if (sec == null) { + append("WARNING: Security Manager disabled!\n", true); + } else { + append("SecurityManager=" + sec + "\n", true); + } + appendSeparator(); + append("Konqueror Java Console Help\n", true); + append(" c: clear console\n", true); + append(" g: run garbage collection\n", true); + append(" h: show help\n", true); + append(" m: show memory info\n", true); + append(" s: print system properties\n", true); + append(" t: list threads\n", true); + append(" x: empty classloader cache\n", true); + appendSeparator(); + } + + private void showSystemProperties() { + append("Printing System Properties ...\n", true); + appendSeparator(); + Properties p = System.getProperties(); + for (Enumeration e = p.keys(); e.hasMoreElements();) { + Object key = e.nextElement(); + if ("line.separator".equals(key)) { + String value = (String) p.get(key); + StringBuffer unescaped = new StringBuffer(10); + for (int i = 0; i < value.length(); i++) { + char c = value.charAt(i); + if (c == '\n') unescaped.append("\\n"); + else if (c == '\r') unescaped.append("\\n"); + else unescaped.append(c); + } + append(key + " = " + unescaped + "\n", true); + } else append(key + " = " + p.get(key) + "\n", true); + } + appendSeparator(); + } + + private void showThreads() { + Thread t = Thread.currentThread(); + ThreadGroup g = t.getThreadGroup(); + ThreadGroup parent; + while ((parent = g.getParent()) != null) { + g = parent; + } + g.list(); + } + + private void copyButtonActionPerformed(java.awt.event.ActionEvent evt) { + textField.selectAll(); + textField.copy(); + } + + private void closeButtonActionPerformed(java.awt.event.ActionEvent evt) { + frame.setVisible(false); + } + + private void clearButtonActionPerformed(java.awt.event.ActionEvent evt) { + clear(); + } + + /** Exit the Application */ + private void exitForm(java.awt.event.WindowEvent evt) { + frame.setVisible(false); + } + + public void setVisible(boolean visible) { + if (frame == null && visible) { + initComponents(); + frame.setVisible(visible); + System.out.println( "Java VM version: " + + System.getProperty("java.version") ); + System.out.println( "Java VM vendor: " + + System.getProperty("java.vendor") ); + String ph = System.getProperty("http.proxyHost"); + String pp = System.getProperty("http.proxyPort"); + if (ph != null) { + System.out.println("Proxy: " + ph + ":" + pp); + } + SecurityManager sec = System.getSecurityManager(); + Main.debug("SecurityManager=" + sec); + if (sec == null) { + System.out.println( "WARNING: Security Manager disabled!" ); + textField.setForeground(java.awt.Color.red); + } + showHelp(); + } else if (frame != null) + frame.setVisible(visible); + + if (visible) { + for (int i = 0; i < NR_BUFFERS; i++) + if (output_buffer[(queue_pos + i + 1) % 3] != null) { + textField.append(output_buffer[(queue_pos + i + 1) % 3].toString()); + output_buffer[(queue_pos + i + 1) % 3] = null; + } + } + } + + /** + * @param args the command line arguments + */ + public static void main(String args[]) { + new KJASSwingConsole().setVisible(true); + } + + public void clear() { + textField.setText(""); + } + + private void appendSeparator() { + append("----------------------------------------------------\n", true); + } + + public void append(String txt) { + append(txt, false); + } + + public void append(String txt, boolean force) { + if (txt == null) + return; + if (frame == null || !frame.isVisible()) { + if (Main.Debug) + real_stderr.print(txt); + if (output_buffer[queue_pos] != null && + output_buffer[queue_pos].length() > MAX_BUF_LENGTH) { + queue_pos = (++queue_pos) % NR_BUFFERS; + if (output_buffer[queue_pos] != null) { + // starting overwriting old log, clear textField if exists + if (frame != null) + textField.setText(""); + output_buffer[queue_pos] = null; + } + } + if (output_buffer[queue_pos] == null) + output_buffer[queue_pos] = new StringBuffer(txt); + else + output_buffer[queue_pos].append(txt); + return; + } + int length = txt.length(); + synchronized(textField) { + //get the caret position, and then get the new position + int old_pos = textField.getCaretPosition(); + textField.append(txt); + textField.setCaretPosition( old_pos + length ); + } + } +} + diff --git a/tdehtml/java/org/kde/kjas/server/KJASURLStreamHandlerFactory.java b/tdehtml/java/org/kde/kjas/server/KJASURLStreamHandlerFactory.java new file mode 100644 index 000000000..58c5ff518 --- /dev/null +++ b/tdehtml/java/org/kde/kjas/server/KJASURLStreamHandlerFactory.java @@ -0,0 +1,609 @@ +/* This file is part of the KDE project + * + * Copyright (C) 2003 Koos Vriezen <koos ! vriezen () xs4all ! nl> + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public License + * along with this library; see the file COPYING.LIB. If not, write to + * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. + */ + +package org.kde.kjas.server; + +import java.net.*; +import java.io.*; +import java.util.*; +import java.security.*; +/** + * + */ + +class KIOConnection +{ + final static int NOT_CONNECTED = 0; + final static int CONNECT_WAIT = 1; + final static int CONNECTED = 2; + + final static int DATA = 0; + final static int FINISHED = 1; + final static int ERRORCODE = 2; + final static int CONNECT = 6; + final static int REQUESTDATA = 7; + + final static int STOP = 0; + final static int HOLD = 1; + final static int RESUME = 2; + + protected static int id = 0; + static Hashtable jobs = new Hashtable(); // should be thread safe + + static void setData(String jobid, int code, byte [] data) { + KIOConnection job = (KIOConnection) jobs.get(jobid); + if (job == null || !job.setData(code, data)) + Main.info("KIO KJASHttpURLConnection gone (timedout/closed)"); + else + Thread.yield(); + } + + private class KJASOutputStream extends OutputStream { + KJASOutputStream() { + } + public void write(int b) throws IOException { + byte[] buf = {(byte)b}; + write(buf); + } + public synchronized void write(byte b[], int off, int len) throws IOException { + byte[] buf = new byte[len]; + System.arraycopy(b, off, buf, 0, len); + sendData(buf, false); + } + public void write(byte b[]) throws IOException { + write(b, 0, b.length); + } + public void close() throws IOException { + disconnect(); + } + public void flush() throws IOException { + checkConnected(); + sendData(null, true); + } + } + + private class KJASInputStream extends InputStream { + + KJASInputStream() { + } + public int read() throws IOException { + if (getData(true)) + return 0x00ff & in_buf[in_bufpos++]; + return -1; + } + public int read(byte[] b, int off, int len) throws IOException { + int total = 0; + do { + if (!getData(true)) break; + int nr = in_buf.length - in_bufpos; + if (nr > len) + nr = len; + System.arraycopy(in_buf, in_bufpos, b, off, nr); + len -= nr; + total += nr; + off += nr; + in_bufpos += nr; + } while (len > 0); + return total > 0 ? total : -1; + } + public int read(byte[] b) throws IOException { + return read(b, 0, b.length); + } + public int available() throws IOException { + return inAvailable(); + } + public boolean markSupported() { + return false; + } + public void close() throws IOException { + disconnect(); + } + } + + protected URL url; + protected int connect_status = 0; + protected String jobid = null; // connection id with KIO + protected LinkedList data = new LinkedList(); // not thread safe + protected int errorcode = 0; + protected boolean finished = false; // all data has arived + protected boolean onhold = false; // KIO job is suspended + protected boolean request_data = false; // need data for put job + private KJASOutputStream out = null; + private KJASInputStream in = null; + private byte [] in_buf = null; // current input buffer + private int in_bufpos = 0; // position in buffer + private boolean in_eof = false; // all data is read + private final static int LOW_BUFFER_LIMIT = 5; // put onhold off + private final static int HIGH_BUFFER_LIMIT = 10; // put onhold on + + protected KIOConnection(URL u) { + url = u; + } + protected void checkConnected() throws IOException { + if (connect_status != CONNECTED) + throw new IOException("not connected"); + } + protected boolean haveError() { + return errorcode != 0; + } + synchronized protected boolean setData(int code, byte [] d) { + // is job still there when entering the monitor + if (jobs.get(jobid) == null) + return false; + if (connect_status == CONNECT_WAIT) + connect_status = CONNECTED; + switch (code) { + case FINISHED: + if (d != null && d.length > 0) + data.addLast(d); + finished = true; + onhold = false; + jobs.remove(jobid); + Main.debug ("KIO FINISHED (" + jobid + ") " + data.size()); + break; + case DATA: + if (d.length > 0) + data.addLast(d); + // Main.debug ("KIO DATA (" + jobid + ") " + data.size()); + if (!onhold && data.size() > HIGH_BUFFER_LIMIT) { + Main.protocol.sendDataCmd(jobid, HOLD); + onhold = true; + } + break; + case ERRORCODE: + String codestr = new String(d); + errorcode = Integer.parseInt(codestr); + Main.debug ("KIO ERRORECODE(" + jobid + ") " + errorcode); + break; + case CONNECT: + Main.debug ("KIO CONNECT(" + jobid + ") "); + request_data = true; + errorcode = 0; + break; + case REQUESTDATA: + Main.debug ("KIO REQUESTDATA(" + jobid + ") "); + request_data = true; + break; + } + notifyAll(); + return true; + } + + private synchronized boolean getData(boolean mayblock) throws IOException { + if (haveError()) { + //disconnect(); + in_eof = true; + //throw new IOException("i/o error " + errorcode); + } + if (in_eof) + return false; + checkConnected(); + if (in_buf != null && in_bufpos < in_buf.length) + return true; + int datasize = data.size(); + if (datasize > 0) { + in_buf = (byte []) data.removeFirst(); + in_bufpos = 0; + } + if (onhold && datasize < LOW_BUFFER_LIMIT) { + Main.protocol.sendDataCmd(jobid, RESUME); + onhold = false; + } + if (datasize > 0) + return true; + if (finished) { + in_eof = true; + return false; + } + if (!mayblock) + return false; + try { + wait(); + } catch (InterruptedException ie) { + return false; + } + return getData(false); + } + synchronized private int inAvailable() throws IOException { + if (in_eof) + return 0; + checkConnected(); + if (!getData(false)) + return 0; + int total = in_buf.length - in_bufpos; + ListIterator it = data.listIterator(0); + while (it.hasNext()) + total += ((byte []) it.next()).length; + return total; + } + synchronized private void sendData(byte [] d, boolean force) throws IOException { + Main.debug ("KIO sendData(" + jobid + ") force:" + force + " request_data:" + request_data); + if (d != null) + data.addLast(d); + if (!request_data && !force) return; + if (data.size() == 0) return; + if (force && !request_data) { + try { + wait(10000); + } catch (InterruptedException ie) { + return; + } + if (!request_data) { + Main.debug ("KIO sendData(" + jobid + ") timeout"); + data.clear(); + disconnect(); + throw new IOException("timeout"); + } + } + byte[] buf; + int total = 0; + ListIterator it = data.listIterator(0); + while (it.hasNext()) + total += ((byte []) it.next()).length; + buf = new byte[total]; + int off = 0; + it = data.listIterator(0); + while (it.hasNext()) { + byte [] b = (byte []) it.next(); + System.arraycopy(b, 0, buf, off, b.length); + off += b.length; + } + data.clear(); + request_data = false; + Main.protocol.sendPutData(jobid, buf, 0, total); + } + synchronized void connect(boolean doInput) throws IOException { + if (connect_status == CONNECTED) + return; // javadocs: call is ignored + //(new Exception()).printStackTrace(); + Main.debug ("KIO connect " + url); + errorcode = 0; + finished = in_eof = false; + jobid = String.valueOf(id++); + jobs.put(jobid, this); + if (doInput) + Main.protocol.sendGetURLDataCmd(jobid, url.toExternalForm()); + else + Main.protocol.sendPutURLDataCmd(jobid, url.toExternalForm()); + connect_status = CONNECT_WAIT; + try { + wait(20000); + } catch (InterruptedException ie) { + errorcode = -1; + } + boolean isconnected = (connect_status == CONNECTED); + if (isconnected && !haveError()) { + if (doInput) + in = new KJASInputStream(); + else + out = new KJASOutputStream(); + Main.debug ("KIO connect(" + jobid + ") " + url); + return; + } + connect_status = NOT_CONNECTED; + jobs.remove(jobid); + if (isconnected) { + if (!finished) + Main.protocol.sendDataCmd(jobid, STOP); + Main.debug ("KIO connect error " + url); + throw new ConnectException("connection failed (not found)"); + } + Main.debug ("KIO connect timeout " + url); + throw new IOException("connection failed (timeout)"); + } + synchronized void disconnect() { + if (connect_status == NOT_CONNECTED) + return; + Main.debug ("KIO disconnect " + jobid); + //(new Exception()).printStackTrace(); + if (out != null) { + try { + out.flush(); + } catch (IOException iox) {} + } + connect_status = NOT_CONNECTED; + out = null; + in = null; + if (!finished) { + Main.protocol.sendDataCmd(jobid, STOP); + jobs.remove(jobid); + } + notifyAll(); + } + InputStream getInputStream() throws IOException { + Main.debug ("KIO getInputStream(" + jobid + ") " + url); + return in; + } + OutputStream getOutputStream() throws IOException { + Main.debug ("KIO getOutputStream(" + jobid + ") " + url); + return out; + } +} + +final class KIOHttpConnection extends KIOConnection +{ + final static int HEADERS = 3; + final static int REDIRECT = 4; + final static int MIMETYPE = 5; + + Vector headers = new Vector(); + Hashtable headersmap = new Hashtable(); + String responseMessage = null; + int responseCode = -1; + + KIOHttpConnection(URL u) { + super(u); + } + protected boolean haveError() { + return super.haveError() || + responseCode != 404 && (responseCode < 0 || responseCode >= 400); + } + protected synchronized boolean setData(int code, byte [] d) { + switch (code) { + case HEADERS: + StringTokenizer tokenizer = new StringTokenizer(new String(d), "\n"); + while (tokenizer.hasMoreTokens()) { + String token = tokenizer.nextToken(); + int pos = token.indexOf(":"); + String [] entry = { + token.substring(0, pos > -1 ? pos : token.length()).toLowerCase(), token.substring(pos > -1 ? pos+1: token.length()).trim() + }; + headers.add(entry); + headersmap.put(entry[0], entry[1]); + // Main.debug ("KIO header " + entry[0] + "=" + entry[1]); + } + responseCode = 0; + if (headersmap.size() > 0) { + String token = ((String []) headers.get(0))[0]; + if (!token.startsWith("http/1.")) break; + int spos = token.indexOf(' '); + if (spos < 0) break; + int epos = token.indexOf(' ', spos + 1); + if (epos < 0) break; + responseCode = Integer.parseInt(token.substring(spos+1, epos)); + responseMessage = token.substring(epos+1); + Main.debug ("KIO responsecode=" + responseCode); + } + break; + } + return super.setData(code, d); + } +} + +final class KIOSimpleConnection extends KIOConnection +{ + KIOSimpleConnection(URL u) { + super(u); + } +} + +final class KJASHttpURLConnection extends HttpURLConnection +{ + private KIOHttpConnection kioconnection; + + KJASHttpURLConnection(URL u) { + super(u); + kioconnection = new KIOHttpConnection(u); + } + public Map getHeaderFields() { + try { + connect(); + } catch (IOException e) { + Main.debug ("Error on implicit connect()"); + } + Main.debug ("KIO getHeaderFields"); + return kioconnection.headersmap; + } + public String getHeaderField(String name) { + try { + connect(); + } catch (IOException e) { + Main.debug ("Error on implicit connect()"); + } + String field = (String) kioconnection.headersmap.get(name); + Main.debug ("KIO getHeaderField:" + name + "=" + field); + //(new Exception()).printStackTrace(); + return field; + } + public String getHeaderField(int n) { + try { + connect(); + } catch (IOException e) { + Main.debug ("Error on implicit connect()"); + } + Main.debug ("KIO getHeaderField(" + n + ") size=" + kioconnection.headersmap.size()); + if (n >= kioconnection.headersmap.size()) + return null; + String [] entry = (String []) kioconnection.headers.get(n); + String line = entry[0]; + if (entry[1].length() > 0) + line += ":" + entry[1]; + Main.debug ("KIO getHeaderField(" + n + ")=#" + line + "#"); + return line; + } + public String getHeaderFieldKey(int n) { + try { + connect(); + } catch (IOException e) { + Main.debug ("Error on implicit connect()"); + } + Main.debug ("KIO getHeaderFieldKey " + n); + if (n >= kioconnection.headersmap.size()) + return null; + return ((String []) kioconnection.headers.get(n))[0]; + } + public int getResponseCode() throws IOException { + Main.debug ("KIO getResponseCode"); + if (kioconnection.responseCode == -1) { + try { + connect(); + } catch (IOException e) { + if (kioconnection.responseCode == -1) + throw e; + } + } + responseMessage = kioconnection.responseMessage; + return kioconnection.responseCode; + } + public boolean usingProxy() { + return false; // FIXME + } + public void connect() throws IOException { + if (connected) + return; + Main.debug ("KIO KJASHttpURLConnection.connect " + url); + SecurityManager security = System.getSecurityManager(); + if (security != null) + security.checkPermission(getPermission()); + kioconnection.connect(doInput); + connected = true; + if (kioconnection.responseCode == 404) + throw new FileNotFoundException(url.toExternalForm()); + } + public void disconnect() { + kioconnection.disconnect(); + connected = false; + } + public InputStream getInputStream() throws IOException { + doInput = true; + doOutput = false; + connect(); + return kioconnection.getInputStream(); + } + public OutputStream getOutputStream() throws IOException { + doInput = false; + doOutput = true; + connect(); + return kioconnection.getOutputStream(); + } + public InputStream getErrorStream() { + Main.debug("KIO KJASHttpURLConnection.getErrorStream" + url); + try { + if (connected && kioconnection.responseCode == 404) + return kioconnection.getInputStream(); + } catch (Exception ex) {} + return null; + } +} + +final class KJASSimpleURLConnection extends URLConnection +{ + private KIOSimpleConnection kioconnection = null; + private int default_port; + + KJASSimpleURLConnection(URL u, int p) { + super(u); + default_port = p; + } + public boolean usingProxy() { + return false; // FIXME + } + public Permission getPermission() throws IOException { + int p = url.getPort(); + if (p < 0) + p = default_port; + return new SocketPermission(url.getHost() + ":" + p, "connect"); + } + public void connect() throws IOException { + if (kioconnection != null) + return; + Main.debug ("KIO KJASSimpleURLConnection.connection " + url); + SecurityManager security = System.getSecurityManager(); + if (security != null) + security.checkPermission(getPermission()); + kioconnection = new KIOSimpleConnection(url); + kioconnection.connect(doInput); + connected = true; + } + public void disconnect() { + if (kioconnection == null) + return; + kioconnection.disconnect(); + kioconnection = null; + connected = false; + } + public InputStream getInputStream() throws IOException { + doInput = true; + doOutput = false; + if (kioconnection == null) + connect(); + return kioconnection.getInputStream(); + } + public OutputStream getOutputStream() throws IOException { + doInput = false; + doOutput = true; + if (kioconnection == null) + connect(); + return kioconnection.getOutputStream(); + } +} + + +final class KJASHttpURLStreamHandler extends URLStreamHandler +{ + KJASHttpURLStreamHandler(int port) { + default_port = port; + } + protected URLConnection openConnection(URL u) throws IOException { + URL url = new URL(u.toExternalForm()); + return new KJASHttpURLConnection(url); + } + protected int getDefaultPort() { + return default_port; + } + private int default_port; +} + +final class KJASSimpleURLStreamHandler extends URLStreamHandler +{ + KJASSimpleURLStreamHandler(int port) { + default_port = port; + } + protected URLConnection openConnection(URL u) throws IOException { + URL url = new URL(u.toExternalForm()); + return new KJASSimpleURLConnection(url, default_port); + } + protected int getDefaultPort() { + return default_port; + } + private int default_port; +} + +public final class KJASURLStreamHandlerFactory + implements URLStreamHandlerFactory +{ + public URLStreamHandler createURLStreamHandler(String protocol) { + if (protocol.equals("jar") || protocol.equals("file")) + return null; + //outputs to early: Main.debug ("createURLStreamHandler " + protocol); + Main.debug ("KIO createURLStreamHandler " + protocol); + if (protocol.equals("http")) + return new KJASHttpURLStreamHandler(80); + else if (protocol.equals("https")) + return new KJASHttpURLStreamHandler(443); + else if (protocol.equals("ftp")) + return new KJASSimpleURLStreamHandler(21); + else if (protocol.equals("smb")) + return new KJASSimpleURLStreamHandler(139); + else if (protocol.equals("fish")) + return new KJASSimpleURLStreamHandler(22); + return null; + } +} diff --git a/tdehtml/java/org/kde/kjas/server/Main.java b/tdehtml/java/org/kde/kjas/server/Main.java new file mode 100644 index 000000000..50ccb14f1 --- /dev/null +++ b/tdehtml/java/org/kde/kjas/server/Main.java @@ -0,0 +1,178 @@ +package org.kde.kjas.server; + +import java.io.*; +import java.security.*; +import java.net.*; + +/** + * KJAS server recognizes these variablers: + * kjas.debug - makes server actions verbose + * kjas.showConsole - shows Java Console window + * kjas.log - save a transcript of the debug output to /tmp/kjas.log + */ + +public class Main +{ + //We need to save a reference to the original stdout + //for sending messages back + static final KJASProtocolHandler protocol; + static Console console = null; + private static final boolean show_console; + public static final boolean Debug; + public static final boolean log; + static final boolean cacheImages; + static float java_version = (float) 0.0; + static String proxyHost = null; + static int proxyPort = 0; + private static boolean good_jdk = true; + + /************************************************************************** + * Initialization + **************************************************************************/ + static + { + Debug = System.getProperty( "kjas.debug" ) != null; + + show_console = System.getProperty( "kjas.showConsole" ) != null; + + if( System.getProperty( "kjas.useKio" ) != null ) + URL.setURLStreamHandlerFactory( new KJASURLStreamHandlerFactory() ); + + log = System.getProperty( "kjas.log" ) != null; + + cacheImages = System.getProperty( "kjas.noImageCache" ) != null; + + // determine system proxy + proxyHost = System.getProperty( "http.proxyHost" ); + String proxyPortString = System.getProperty( "http.proxyPort" ); + try { + proxyPort = Integer.parseInt(proxyPortString); + } catch (Exception e) { + } + //Main.debug( "JVM version = " + System.getProperty( "java.version" ) ); + String version = System.getProperty("java.version").substring( 0, 3 ); + // Hack for SGI Java2 runtime + if (version == "Jav") { // Skip over JavaVM- (the first 7 chars) + version = System.getProperty("java.version").substring(7,3); + } + //Main.debug( "JVM numerical version = " + version ); + try { + java_version = Float.parseFloat( version ); + if( java_version < 1.2 ) + good_jdk = false; + } catch( NumberFormatException e ) { + good_jdk = false; + } + PrintStream protocol_stdout = System.out; + console = new KJASSwingConsole(); + protocol = new KJASProtocolHandler( System.in, protocol_stdout ); + } + + /************************************************************************** + * Public Utility functions available to the KJAS framework + **************************************************************************/ + public static void debug( String msg ) + { + if( Debug ) + { + System.out.println( "KJAS: " + msg ); + } + } + public static void info (String msg ) { + System.err.println( "KJAS: " + msg ); + } + + public static void kjas_err( String msg, Exception e ) + { + System.err.println( msg ); + System.err.println( "Backtrace: " ); + e.printStackTrace(); + } + + public static void kjas_err( String msg, Throwable t ) + { + System.err.println( msg ); + t.printStackTrace(); + } + private Main() { + } + + /************************************************************************** + * Main- create the command loop + **************************************************************************/ + public static void main( String[] args ) + { + if( !good_jdk ) + { + console.setVisible( true ); + System.err.println( "ERROR: This version of Java is not supported for security reasons." ); + System.err.println( "\t\tPlease use Java version 1.2 or higher." ); + return; + } + + if( show_console ) + console.setVisible( true ); + + // set up https + boolean hasHTTPS = true; + + try { + // https needs a secure socket provider + Provider[] sslProviders = Security.getProviders("SSLContext.SSL"); + + if (sslProviders == null || sslProviders.length == 0) { + // as a fallback, try to dynamically install Sun's jsse + Class provider = Class.forName("com.sun.net.ssl.internal.ssl.Provider"); + + if (provider != null) { + Main.debug("adding Security Provider"); + Provider p = (Provider) provider.newInstance(); + Security.addProvider(p); + } else { + // Try jessie (http://www.nongnu.org/jessie/) as a fallback + // available in the Free World + provider = Class.forName("org.metastatic.jessie.provider.Jessie"); + if (provider != null) { + Main.debug("adding Jessie as Security Provider"); + Provider p = (Provider) provider.newInstance(); + Security.addProvider(p); + } else { + Main.debug("could not get class: com.sun.net.ssl.internal.ssl.Provider"); + hasHTTPS = false; + } + } + } + + if (hasHTTPS) { + // allow user to provide own protocol handler + // -Djava.protocol.handler.pkgs = user.package.name + // getting and setting of properties might generate SecurityExceptions + // so this needs to be in a try block + String handlerPkgs = System.getProperty("java.protocol.handler.pkgs"); + + if (handlerPkgs == null) { + // set default packages for Sun and IBM + handlerPkgs = "com.sun.net.ssl.internal.www.protocol" + + "|com.ibm.net.ssl.www.protocol"; + } else { + // add default packages for Sun and IBM as fallback + handlerPkgs += "|com.sun.net.ssl.internal.www.protocol" + + "|com.ibm.net.ssl.www.protocol"; + } + + System.setProperty("java.protocol.handler.pkgs", handlerPkgs); + } + } catch (Exception e) { + hasHTTPS = false; + } + + if (hasHTTPS == false) { + System.out.println("Unable to load JSSE SSL stream handler, https support not available"); + System.out.println("For more information see http://java.sun.com/products/jsse/"); + } + + //start the command parsing + protocol.commandLoop(); + } + +} diff --git a/tdehtml/java/org/kde/kjas/server/StatusListener.java b/tdehtml/java/org/kde/kjas/server/StatusListener.java new file mode 100644 index 000000000..be17c2b29 --- /dev/null +++ b/tdehtml/java/org/kde/kjas/server/StatusListener.java @@ -0,0 +1,5 @@ +package org.kde.kjas.server; + +public interface StatusListener { + public void showStatus(String message); +} \ No newline at end of file diff --git a/tdehtml/java/pluginsinfo b/tdehtml/java/pluginsinfo new file mode 100644 index 000000000..7d37ed7c8 --- /dev/null +++ b/tdehtml/java/pluginsinfo @@ -0,0 +1,7 @@ +number=1 + +[0] +description=Java Plug-in KJAS for Konqueror +file=kjavaappletviewer.so +mime=application/x-java-applet:class:Java Applet;application/x-java-bean:jar:JavaBeans +name=Java Plug-in diff --git a/tdehtml/java/tests/Makefile.am b/tdehtml/java/tests/Makefile.am new file mode 100644 index 000000000..55e6fc732 --- /dev/null +++ b/tdehtml/java/tests/Makefile.am @@ -0,0 +1,9 @@ +INCLUDES = -I$(top_srcdir)/tdehtml/java -I$(top_srcdir)/tdehtml \ + -I$(top_srcdir) $(all_includes) + +check_PROGRAMS = testserver + +testserver_SOURCES = testkjavaappletserver.cpp +testserver_LDADD = ../libkjava.la + +METASOURCES = AUTO diff --git a/tdehtml/java/tests/badapplets/BadApplet.jar b/tdehtml/java/tests/badapplets/BadApplet.jar new file mode 100644 index 000000000..fc9c274a2 Binary files /dev/null and b/tdehtml/java/tests/badapplets/BadApplet.jar differ diff --git a/tdehtml/java/tests/badapplets/BadApplet.java b/tdehtml/java/tests/badapplets/BadApplet.java new file mode 100644 index 000000000..c8217d256 --- /dev/null +++ b/tdehtml/java/tests/badapplets/BadApplet.java @@ -0,0 +1,202 @@ +import java.awt.*; +import java.awt.event.*; +import java.applet.*; +import javax.swing.*; +import java.io.*; +import java.net.*; +import java.awt.datatransfer.*; + +public class BadApplet extends JApplet { + JTabbedPane tabs = new JTabbedPane(); + JPanel FileSystemTests = new JPanel(); + JPanel NetworkTests = new JPanel(); + JPanel EnvironmentTests = new JPanel(); + + JButton writeFileButton = new JButton("Write File"); + JButton readFileButton = new JButton("Read File"); + JButton connectSocketButton = new JButton("Connect Socket"); + JButton frameButton = new JButton("Open Frame Without Warning Tag"); + JButton readSystemPropButton = new JButton("Read System Property"); + JButton printButton = new JButton("Print"); + JButton clipBoardButton = new JButton("Read Clipboard"); + + JTextField writePath = new JTextField( "/amd/ns/root/home/sbarnes/test.txt" ); + JTextField readPath = new JTextField("/amd/ns/root/home/sbarnes/test.txt"); + JTextField url = new JTextField("URL"); + JTextField port = new JTextField("port"); + JTextField systemProp = new JTextField("os.name"); + JTextField output = new JTextField(); + + //Construct the applet + public BadApplet() { + try { + //event handlers ****************************************************** + writeFileButton.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(ActionEvent e) { + writeFileButton_actionPerformed(e); + } + }); + readFileButton.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(ActionEvent e) { + readFileButton_actionPerformed(e); + } + }); + connectSocketButton.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(ActionEvent e) { + connectSocketButton_actionPerformed(e); + } + }); + frameButton.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(ActionEvent e) { + frameButton_actionPerformed(e); + } + }); + readSystemPropButton.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(ActionEvent e) { + readSystemPropButton_actionPerformed(e); + } + }); + printButton.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(ActionEvent e) { + printButton_actionPerformed(e); + } + }); + clipBoardButton.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(ActionEvent e) { + clipBoard_actionPerformed(e); + } + }); + + //do layout *********************************************************** + getContentPane().setLayout( new BorderLayout() ); + + FileSystemTests.setLayout( new FlowLayout( FlowLayout.LEFT ) ); + FileSystemTests.add( writeFileButton ); + FileSystemTests.add( writePath ); + FileSystemTests.add( readFileButton ); + FileSystemTests.add( readPath ); + + NetworkTests.setLayout( new FlowLayout( FlowLayout.LEFT ) ); + NetworkTests.add( connectSocketButton ); + NetworkTests.add( url ); + NetworkTests.add( port ); + + EnvironmentTests.setLayout( new FlowLayout( FlowLayout.LEFT ) ); + EnvironmentTests.add( frameButton ); + EnvironmentTests.add( readSystemPropButton ); + EnvironmentTests.add( systemProp ); + EnvironmentTests.add( printButton ); + EnvironmentTests.add( clipBoardButton ); + + tabs.add( FileSystemTests, "File System" ); + tabs.add( NetworkTests, "Network" ); + tabs.add( EnvironmentTests, "Environment" ); + + this.getContentPane().add( tabs, BorderLayout.CENTER ); + this.getContentPane().add( output, BorderLayout.SOUTH ); + } + catch(Exception e) { + e.printStackTrace(); + } + } + + public void paint( Graphics g ) + { + System.out.println( "graphics g = " + g ); + System.out.println( "clip area = " + g.getClip() ); + System.out.println( "bounds of the clip area = " + g.getClipBounds() ); + + super.paint( g ); + } + + //Initialize the applet + public void init() {} + + void writeFileButton_actionPerformed(ActionEvent e) { + try{ + PrintWriter writer = new PrintWriter(new FileOutputStream(writePath.getText())); + writer.println("Here is some text"); + writer.close(); + output.setText("Write was successful"); + } catch (Exception ex){output.setText(ex.getMessage());} + } + + void readSystemPropButton_actionPerformed(ActionEvent e) { + try{ + output.setText(System.getProperty(systemProp.getText())); + } catch (Exception ex){output.setText("Error getting prop: " + ex.getMessage());} + } + + void readFileButton_actionPerformed(ActionEvent e) { + try{ + BufferedReader reader = new BufferedReader(new FileReader(readPath.getText())); + output.setText("Read was successful: " + reader.readLine()); + } catch (Exception ex){output.setText(ex.getMessage());} + } + + void connectSocketButton_actionPerformed(ActionEvent e) { + try{ + Integer thePort = new Integer(port.getText()); + Socket socket = new Socket(url.getText(), thePort.intValue()); + socket.getOutputStream(); + output.setText("Socket connection successful"); + } catch (Exception ex){output.setText("Socket unsuccessfull: " + ex.getMessage());} + } + + void frameButton_actionPerformed(ActionEvent e) { + JFrame frame = new JFrame("Does this Frame have a warning sign"); + frame.setSize(200,200); + frame.show(); + if (frame.getWarningString() == null) + output.setText("No warning string in frame"); + else + output.setText(frame.getWarningString()); + } + + void clipBoard_actionPerformed(ActionEvent e) { + try { + Clipboard clip = Toolkit.getDefaultToolkit().getSystemClipboard(); + + Transferable trans = clip.getContents(null); + if (trans == null){ + output.setText("Clipboard is empty"); + return; + } + output.setText((String)trans.getTransferData(DataFlavor.stringFlavor)); + }catch(Exception ex){ex.getMessage();} + } + + void printButton_actionPerformed(ActionEvent e) { + try{ + JFrame testFrame = new JFrame("test"); + testFrame.getContentPane().add(this, BorderLayout.CENTER); + PrintJob printer = Toolkit.getDefaultToolkit().getPrintJob(testFrame, "Applet Print Test", null); + + if (printer == null){ + output.setText("PrintJob is null"); + return; + } + + Graphics g = printer.getGraphics(); + g.drawString("This is the applet print test", 50, 50); + g.dispose(); + printer.end(); + }catch(Exception ex){ex.getMessage();} + } + + //Main method + public static void main(String[] args) { + BadApplet applet = new BadApplet(); + + JFrame frame = new JFrame(); + frame.setDefaultCloseOperation( WindowConstants.DISPOSE_ON_CLOSE ); + frame.setTitle("Applet Frame"); + frame.getContentPane().add(applet, BorderLayout.CENTER); + frame.setSize(400,320); + frame.setVisible(true); + + applet.init(); + applet.start(); + } + +} diff --git a/tdehtml/java/tests/badapplets/applet.html b/tdehtml/java/tests/badapplets/applet.html new file mode 100644 index 000000000..fe9e47ef9 --- /dev/null +++ b/tdehtml/java/tests/badapplets/applet.html @@ -0,0 +1,14 @@ +<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> +<html> + <head> + <title>SwingSet demo + + + +

SwingSet demo

+ + + + diff --git a/tdehtml/java/tests/good_sites b/tdehtml/java/tests/good_sites new file mode 100644 index 000000000..f9699fe2a --- /dev/null +++ b/tdehtml/java/tests/good_sites @@ -0,0 +1,44 @@ +http Sites +--------------------------------------------------------- +http://java.sun.com/products/plugin/1.3.1_01a/demos/applets.html +www.soda.co.uk +java.sun.com +www.javaboutique.com +www.teledyn.com/fun/SaubleBeach (redraw problems, also in netscape) +www.fxapplets.com +www.quote.com/quotecom/livecharts/ +games.yahoo.com/games/klondike.html (security exception) +www.webtrac.co.za/cgi-bin/demo/demo.pl (classloader problem) +www.sodaplay.com/constructor/player.htm +www.sodaplay.com +www.dseffects.com/applets.html +www.controlzed.com +javaboutique.internet.com/Durius/ +www.chess.net/play/java +www.kmelektronik.de/root/index.html +rdufour.mytradecenter.com/applets/Tetris/Tetris.html +http://www.shiatsu-austria.at + +currently unavailable: +---------------------- +screening.nasdaq.com/screening/NASDAQSearch.asp + +unavailable: +------------ +www.indegocomputer.de +http://aktien.onvista.de/risk-return-map/ + +https Sites +--------------------------------------------------------- +https://brokerage-m3.consors.de/ConSors/ +https://homebanking.dvg-ka.de/045/index.html +https://spk-ihb.izb-hb.de/SPK_Deggendorf/index.html +https://www3.genodirekt.de/homebank.nsf/(rzbks)/xxq1050x?OpenDocument +https://banking.sonline.de/kreissparkasse-duesseldorf/ + +Security Test Sites +--------------------------------------------------------- +http://java.sun.com/sfaq/#examples +http://www.heise.de/ct/browsercheck/java.shtml +http://www.heise.de/ct/browsercheck/n4demo1.shtml + diff --git a/tdehtml/java/tests/testkjavaappletserver.cpp b/tdehtml/java/tests/testkjavaappletserver.cpp new file mode 100644 index 000000000..ea8a7656b --- /dev/null +++ b/tdehtml/java/tests/testkjavaappletserver.cpp @@ -0,0 +1,41 @@ +#include +#include +#include +#include +#include +#include + +#include "java/kjavaappletserver.h" +#include "java/kjavaapplet.h" +#include "java/kjavaappletwidget.h" + +static KCmdLineOptions options[] = +{ + { "+[tdelibs_path]", "path to tdelibs directory", 0 }, + KCmdLineLastOption +}; + +int main(int argc, char **argv) +{ + TDECmdLineArgs::init( argc, argv, "testKJASSever", "testKJASServer", "test program", "0.0" ); + + TDECmdLineArgs::addCmdLineOptions( options ); + + TDEApplication app; + + TQString path_to_tdelibs = "/build/wynnw/kde-src"; + + KJavaAppletWidget *a = new KJavaAppletWidget; + + a->show(); + + a->applet()->setBaseURL( "file:" + path_to_tdelibs + "/tdelibs/tdehtml/test/" ); + a->applet()->setAppletName( "Lake" ); + a->applet()->setAppletClass( "lake.class" ); + a->applet()->setParameter( "image", "konqi.gif" ); + + a->showApplet(); + a->applet()->start(); + + app.exec(); +} -- cgit v1.2.3 From 5159cd2beb2e87806a5b54e9991b7895285c9d3e Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Sun, 27 Jan 2013 01:04:16 -0600 Subject: Rename a number of libraries and executables to avoid conflicts with KDE4 --- CMakeLists.txt | 18 +- KDE2PORTING.html | 16 +- KDE3PORTING.html | 16 +- Mainpage.dox | 4 +- Makefile.am.in | 2 +- README | 4 +- TODO | 6 +- arts/kde/CMakeLists.txt | 6 +- arts/kde/kioinputstream_impl.cpp | 6 +- arts/kde/kioinputstream_impl.h | 2 +- arts/kde/kplayobjectcreator.cc | 2 +- arts/kde/kplayobjectfactory.cc | 4 +- arts/knotify/knotify.cpp | 2 +- configure.in.in | 8 +- configure.in.mid | 2 +- dcop/client/dcopfind.cpp | 6 +- dcop/client/dcopstart.cpp | 2 +- dcop/dcopidlng/kalyptus | 2 +- dnssd/CMakeLists.txt | 2 +- doc/api/kfiledialog.png | Bin 43589 -> 0 bytes doc/api/tdefiledialog.png | Bin 0 -> 43589 bytes doc/tdelibs/man-kbuildsycoca.8.docbook | 221 - doc/tdelibs/man-tdebuildsycoca.8.docbook | 221 + interfaces/kio/CMakeLists.txt | 2 +- interfaces/kio/Makefile.am | 2 +- interfaces/kregexpeditor/Makefile.am | 2 +- interfaces/tdeimproxy/library/CMakeLists.txt | 4 +- interfaces/tdemediaplayer/CMakeLists.txt | 2 +- interfaces/tdemediaplayer/Makefile.am | 4 +- .../kfileaudiopreview/CMakeLists.txt | 46 - .../tdemediaplayer/kfileaudiopreview/Makefile.am | 13 - .../kfileaudiopreview/kfileaudiopreview.cpp | 146 - .../kfileaudiopreview/kfileaudiopreview.h | 64 - .../tdefileaudiopreview/CMakeLists.txt | 46 + .../tdemediaplayer/tdefileaudiopreview/Makefile.am | 13 + .../tdefileaudiopreview/tdefileaudiopreview.cpp | 146 + .../tdefileaudiopreview/tdefileaudiopreview.h | 64 + interfaces/tdescript/CMakeLists.txt | 6 +- interfaces/tdescript/Makefile.am | 2 +- interfaces/tdescript/sample/Makefile.am | 2 +- interfaces/tdescript/scriptloader.cpp | 2 +- interfaces/tdetexteditor/CMakeLists.txt | 4 +- interfaces/tdetexteditor/Makefile.am | 2 +- interfaces/tdetexteditor/configinterface.h | 2 +- interfaces/tdetexteditor/editorchooser.cpp | 2 +- kabc/CMakeLists.txt | 14 +- kabc/Makefile.am | 10 +- kabc/addresseehelper.cpp | 2 +- kabc/addresslineedit.cpp | 2 +- kabc/formatfactory.h | 2 +- kabc/formats/CMakeLists.txt | 4 +- kabc/kab2kabc.cpp | 476 -- kabc/kab2kabc.desktop | 105 - kabc/ldapclient.cpp | 2 +- kabc/ldapclient.h | 2 +- kabc/ldapconfigwidget.h | 2 +- kabc/plugins/dir/CMakeLists.txt | 6 +- kabc/plugins/dir/resourcedir.cpp | 2 +- kabc/plugins/dir/resourcedir.h | 2 +- kabc/plugins/file/CMakeLists.txt | 6 +- kabc/plugins/file/resourcefile.cpp | 4 +- kabc/plugins/file/resourcefile.h | 2 +- kabc/plugins/ldapkio/CMakeLists.txt | 8 +- kabc/plugins/ldapkio/resourceldapkio.cpp | 4 +- kabc/plugins/ldapkio/resourceldapkio.h | 2 +- kabc/plugins/ldapkio/resourceldapkioconfig.cpp | 2 +- kabc/plugins/net/CMakeLists.txt | 6 +- kabc/plugins/net/resourcenet.cpp | 4 +- kabc/plugins/net/resourcenet.h | 2 +- kabc/plugins/sql/resourcesql.h | 2 +- kabc/scripts/field.src.cpp | 2 +- kabc/tdeab2tdeabc.cpp | 476 ++ kabc/tdeab2tdeabc.desktop | 105 + kate/data/bash.xml | 2 +- kate/data/tcsh.xml | 2 +- kate/data/zsh.xml | 2 +- kate/interfaces/katecmd.cpp | 2 +- kate/part/CMakeLists.txt | 6 +- kate/part/kateconfig.cpp | 2 +- kate/part/katedialogs.cpp | 8 +- kate/part/katedocument.cpp | 34 +- kate/part/katefiletype.cpp | 2 +- kate/part/katehighlight.cpp | 2 +- kate/part/katehighlight.h | 2 +- kate/part/katejscript.cpp | 4 +- kate/part/kateluaindentscript.cpp | 2 +- kate/part/kateschema.h | 4 +- kate/part/katesyntaxdocument.cpp | 2 +- kate/part/kateview.cpp | 4 +- kate/part/test_regression.cpp | 2 +- kate/plugins/autobookmarker/autobookmarker.cpp | 2 +- kate/plugins/insertfile/CMakeLists.txt | 6 +- kate/plugins/insertfile/insertfileplugin.cpp | 4 +- kate/plugins/isearch/ISearchPlugin.cpp | 2 +- kate/plugins/kdatatool/CMakeLists.txt | 4 +- kate/plugins/wordcompletion/docwordcompletion.cpp | 2 +- kcmshell/CMakeLists.txt | 41 - kcmshell/Makefile.am | 39 - kcmshell/main.cpp | 350 -- kcmshell/main.h | 104 - kconf_update/CMakeLists.txt | 34 - kconf_update/Mainpage.dox | 31 - kconf_update/Makefile.am | 33 - kconf_update/README.kconf_update | 251 - kconf_update/kconf_update.cpp | 959 --- kded/CMakeLists.txt | 30 +- kded/DESIGN | 4 +- kded/Makefile.am | 22 +- kded/README.kded | 16 +- kded/kbuildsycoca.cpp | 959 --- kded/kbuildsycoca.h | 104 - kded/kde-menu.cpp | 171 - kded/kded.cpp | 16 +- kded/kded.h | 2 +- kded/kdedmodule.cpp | 2 +- kded/kmimelist.cpp | 54 - kded/tde-menu.cpp | 171 + kded/tdebuildsycoca.cpp | 959 +++ kded/tdebuildsycoca.h | 104 + kded/tdemimelist.cpp | 54 + kdewidgets/CMakeLists.txt | 4 +- kdewidgets/Makefile.am | 2 +- kdewidgets/makekdewidgets.cpp | 2 +- kdoctools/CMakeLists.txt | 14 +- kdoctools/Makefile.am | 8 +- kdoctools/docbook/README.kde | 2 +- kdoctools/kio_help.h | 4 +- kdoctools/kio_help.upd | 2 +- kdoctools/move_kio_help_cache.sh | 2 +- kfile-plugins/CMakeLists.txt | 12 - kfile-plugins/elf/CMakeLists.txt | 42 - kfile-plugins/elf/kfile_elf.cpp | 133 - kfile-plugins/elf/kfile_elf.desktop | 66 - kfile-plugins/elf/kfile_elf.h | 50 - kimgio/Makefile.am | 2 +- kimgio/README | 2 +- kinit/CMakeLists.txt | 32 +- kinit/Makefile.am | 30 +- kinit/autostart.cpp | 2 +- kinit/kdostartupconfig.cpp | 143 - kinit/kinit.cpp | 46 +- kinit/kioslave.cpp | 93 - kinit/klauncher.cpp | 1421 ----- kinit/klauncher.h | 200 - kinit/klauncher_cmds.h | 185 - kinit/klauncher_main.cpp | 116 - kinit/kstartupconfig.cpp | 176 - kinit/tdedostartupconfig.cpp | 143 + kinit/tdeioslave.cpp | 93 + kinit/tdelauncher.cpp | 1421 +++++ kinit/tdelauncher.h | 200 + kinit/tdelauncher_cmds.h | 185 + kinit/tdelauncher_main.cpp | 116 + kinit/tdestartupconfig.cpp | 176 + kinit/tests/Makefile.am | 6 +- kinit/tests/klaunchertest.cpp | 54 - kinit/tests/tdelaunchertest.cpp | 54 + kinit/wrapper.c | 4 +- kio/CMakeLists.txt | 71 - kio/DESIGN | 272 - kio/DESIGN.krun | 35 - kio/DESIGN.metadata | 147 - kio/DESIGN.mimetypes | 34 - kio/DESKTOP_ENTRY_STANDARD | 373 -- kio/Mainpage.dox | 120 - kio/Makefile.am | 67 - kio/application.desktop | 124 - kio/bookmarks/CMakeLists.txt | 55 - kio/bookmarks/Makefile.am | 40 - kio/bookmarks/dptrtemplate.h | 57 - kio/bookmarks/kbookmark.cc | 535 -- kio/bookmarks/kbookmark.h | 329 -- kio/bookmarks/kbookmarkbar.cc | 554 -- kio/bookmarks/kbookmarkbar.h | 131 - kio/bookmarks/kbookmarkdombuilder.cc | 81 - kio/bookmarks/kbookmarkdombuilder.h | 48 - kio/bookmarks/kbookmarkdrag.cc | 169 - kio/bookmarks/kbookmarkdrag.h | 57 - kio/bookmarks/kbookmarkexporter.cc | 32 - kio/bookmarks/kbookmarkexporter.h | 50 - kio/bookmarks/kbookmarkimporter.cc | 101 - kio/bookmarks/kbookmarkimporter.h | 106 - kio/bookmarks/kbookmarkimporter_crash.cc | 215 - kio/bookmarks/kbookmarkimporter_crash.h | 74 - kio/bookmarks/kbookmarkimporter_ie.cc | 185 - kio/bookmarks/kbookmarkimporter_ie.h | 90 - kio/bookmarks/kbookmarkimporter_kde1.cc | 156 - kio/bookmarks/kbookmarkimporter_kde1.h | 49 - kio/bookmarks/kbookmarkimporter_ns.cc | 243 - kio/bookmarks/kbookmarkimporter_ns.h | 132 - kio/bookmarks/kbookmarkimporter_opera.cc | 170 - kio/bookmarks/kbookmarkimporter_opera.h | 86 - kio/bookmarks/kbookmarkmanager.cc | 727 --- kio/bookmarks/kbookmarkmanager.h | 367 -- kio/bookmarks/kbookmarkmenu.cc | 1187 ---- kio/bookmarks/kbookmarkmenu.h | 265 - kio/bookmarks/kbookmarkmenu_p.h | 224 - kio/bookmarks/kbookmarknotifier.h | 45 - kio/data.protocol | 71 - kio/httpfilter/CMakeLists.txt | 32 - kio/httpfilter/Makefile.am | 8 - kio/httpfilter/httpfilter.cc | 372 -- kio/httpfilter/httpfilter.h | 119 - kio/kcomprfilter.desktop | 82 - kio/kdatatool.desktop | 96 - kio/kfile/CMakeLists.txt | 76 - kio/kfile/ChangeLog | 725 --- kio/kfile/Makefile.am | 78 - kio/kfile/NOTES | 100 - kio/kfile/TODO | 17 - kio/kfile/config-kfile.h | 32 - kio/kfile/images.h | 277 - kio/kfile/kacleditwidget.cpp | 1054 ---- kio/kfile/kacleditwidget.h | 65 - kio/kfile/kacleditwidget_p.h | 206 - kio/kfile/kcombiview.cpp | 371 -- kio/kfile/kcombiview.h | 133 - kio/kfile/kcustommenueditor.cpp | 242 - kio/kfile/kcustommenueditor.h | 67 - kio/kfile/kdiroperator.cpp | 1740 ------ kio/kfile/kdiroperator.h | 950 --- kio/kfile/kdirselectdialog.cpp | 481 -- kio/kfile/kdirselectdialog.h | 131 - kio/kfile/kdirsize.cpp | 166 - kio/kfile/kdirsize.h | 106 - kio/kfile/kdiskfreesp.cpp | 169 - kio/kfile/kdiskfreesp.h | 89 - kio/kfile/kencodingfiledialog.cpp | 223 - kio/kfile/kencodingfiledialog.h | 313 - kio/kfile/kfile.h | 129 - kio/kfile/kfilebookmarkhandler.cpp | 81 - kio/kfile/kfilebookmarkhandler.h | 63 - kio/kfile/kfiledetailview.cpp | 686 --- kio/kfile/kfiledetailview.h | 219 - kio/kfile/kfiledialog.cpp | 2380 -------- kio/kfile/kfiledialog.h | 989 ---- kio/kfile/kfilefiltercombo.cpp | 203 - kio/kfile/kfilefiltercombo.h | 104 - kio/kfile/kfileiconview.cpp | 943 --- kio/kfile/kfileiconview.h | 267 - kio/kfile/kfilemetainfowidget.cpp | 375 -- kio/kfile/kfilemetainfowidget.h | 95 - kio/kfile/kfilemetapreview.cpp | 196 - kio/kfile/kfilemetapreview.h | 56 - kio/kfile/kfilepreview.cpp | 279 - kio/kfile/kfilepreview.h | 122 - kio/kfile/kfilesharedlg.cpp | 325 -- kio/kfile/kfilesharedlg.h | 70 - kio/kfile/kfilespeedbar.cpp | 147 - kio/kfile/kfilespeedbar.h | 41 - kio/kfile/kfiletreebranch.cpp | 528 -- kio/kfile/kfiletreebranch.h | 242 - kio/kfile/kfiletreeview.cpp | 677 --- kio/kfile/kfiletreeview.h | 273 - kio/kfile/kfiletreeviewitem.cpp | 83 - kio/kfile/kfiletreeviewitem.h | 106 - kio/kfile/kfileview.cpp | 429 -- kio/kfile/kfileview.h | 444 -- kio/kfile/kicondialog.cpp | 772 --- kio/kfile/kicondialog.h | 350 -- kio/kfile/kimagefilepreview.cpp | 187 - kio/kfile/kimagefilepreview.h | 77 - kio/kfile/kmetaprops.cpp | 268 - kio/kfile/kmetaprops.h | 69 - kio/kfile/knotifydialog.cpp | 1191 ---- kio/kfile/knotifydialog.h | 341 -- kio/kfile/knotifywidgetbase.ui | 469 -- kio/kfile/kopenwith.cpp | 851 --- kio/kfile/kopenwith.h | 209 - kio/kfile/kopenwith_p.h | 101 - kio/kfile/kpreviewprops.cpp | 89 - kio/kfile/kpreviewprops.h | 57 - kio/kfile/kpreviewwidgetbase.cpp | 49 - kio/kfile/kpreviewwidgetbase.h | 92 - kio/kfile/kpropertiesdesktopadvbase.ui | 280 - kio/kfile/kpropertiesdesktopbase.ui | 316 - kio/kfile/kpropertiesdialog.cpp | 4170 ------------- kio/kfile/kpropertiesdialog.h | 918 --- kio/kfile/kpropertiesmimetypebase.ui | 70 - kio/kfile/kpropsdlg.h | 4 - kio/kfile/kpropsdlgplugin.desktop | 87 - kio/kfile/krecentdirs.cpp | 99 - kio/kfile/krecentdirs.h | 70 - kio/kfile/krecentdocument.cpp | 177 - kio/kfile/krecentdocument.h | 105 - kio/kfile/kurlbar.cpp | 1049 ---- kio/kfile/kurlbar.h | 660 --- kio/kfile/kurlcombobox.cpp | 363 -- kio/kfile/kurlcombobox.h | 229 - kio/kfile/kurlrequester.cpp | 430 -- kio/kfile/kurlrequester.h | 301 - kio/kfile/kurlrequesterdlg.cpp | 135 - kio/kfile/kurlrequesterdlg.h | 114 - kio/kfile/tests/Makefile.am | 41 - kio/kfile/tests/kcustommenueditortest.cpp | 19 - kio/kfile/tests/kdirselectdialogtest.cpp | 17 - kio/kfile/tests/kfdtest.cpp | 34 - kio/kfile/tests/kfdtest.h | 28 - kio/kfile/tests/kfiletreeviewtest.cpp | 165 - kio/kfile/tests/kfiletreeviewtest.h | 42 - kio/kfile/tests/kfstest.cpp | 183 - kio/kfile/tests/kicondialogtest.cpp | 19 - kio/kfile/tests/knotifytest.cpp | 10 - kio/kfile/tests/kopenwithtest.cpp | 67 - kio/kfile/tests/kurlrequestertest.cpp | 16 - kio/kfileplugin.desktop | 88 - kio/kio/CMakeLists.txt | 138 - kio/kio/KFILEMETAINFO_ISSUES | 4 - kio/kio/Makefile.am | 129 - kio/kio/authinfo.cpp | 332 -- kio/kio/authinfo.h | 320 - kio/kio/chmodjob.cpp | 258 - kio/kio/chmodjob.h | 109 - kio/kio/configure.in.in | 167 - kio/kio/connection.cpp | 273 - kio/kio/connection.h | 158 - kio/kio/dataprotocol.cpp | 339 -- kio/kio/dataprotocol.h | 71 - kio/kio/dataslave.cpp | 213 - kio/kio/dataslave.h | 126 - kio/kio/davjob.cpp | 142 - kio/kio/davjob.h | 127 - kio/kio/defaultprogress.cpp | 507 -- kio/kio/defaultprogress.h | 164 - kio/kio/forwardingslavebase.cpp | 475 -- kio/kio/forwardingslavebase.h | 204 - kio/kio/global.cpp | 2009 ------- kio/kio/global.h | 547 -- kio/kio/http_slave_defaults.h | 49 - kio/kio/ioslave_defaults.h | 53 - kio/kio/job.cpp | 4814 --------------- kio/kio/job.h | 532 -- kio/kio/jobclasses.h | 1909 ------ kio/kio/kacl.cpp | 682 --- kio/kio/kacl.h | 207 - kio/kio/kar.cpp | 170 - kio/kio/kar.h | 103 - kio/kio/karchive.cpp | 717 --- kio/kio/karchive.h | 639 -- kio/kio/kautomount.cpp | 117 - kio/kio/kautomount.h | 122 - kio/kio/kdatatool.cpp | 285 - kio/kio/kdatatool.h | 303 - kio/kio/kdcopservicestarter.cpp | 97 - kio/kio/kdcopservicestarter.h | 103 - kio/kio/kdirlister.cpp | 2538 -------- kio/kio/kdirlister.h | 634 -- kio/kio/kdirlister_p.h | 358 -- kio/kio/kdirnotify.cpp | 40 - kio/kio/kdirnotify.h | 84 - kio/kio/kdirnotify_stub.cpp | 101 - kio/kio/kdirnotify_stub.h | 32 - kio/kio/kdirwatch.cpp | 1774 ------ kio/kio/kdirwatch.h | 290 - kio/kio/kdirwatch_p.h | 158 - kio/kio/kemailsettings.cpp | 272 - kio/kio/kemailsettings.h | 147 - kio/kio/kfilefilter.cpp | 134 - kio/kio/kfilefilter.h | 170 - kio/kio/kfileitem.cpp | 1202 ---- kio/kio/kfileitem.h | 671 --- kio/kio/kfilemetainfo.cpp | 1859 ------ kio/kio/kfilemetainfo.h | 1738 ------ kio/kio/kfileshare.cpp | 346 -- kio/kio/kfileshare.h | 165 - kio/kio/kfilterbase.cpp | 76 - kio/kio/kfilterbase.h | 116 - kio/kio/kfilterdev.cpp | 484 -- kio/kio/kfilterdev.h | 204 - kio/kio/kimageio.cpp | 566 -- kio/kio/kimageio.h | 170 - kio/kio/kimageiofactory.h | 142 - kio/kio/klimitediodevice.h | 105 - kio/kio/kmdbase.h | 6 - kio/kio/kmessageboxwrapper.h | 56 - kio/kio/kmimemagic.cpp | 2317 -------- kio/kio/kmimemagic.h | 218 - kio/kio/kmimetype.cpp | 1172 ---- kio/kio/kmimetype.h | 641 -- kio/kio/kmimetypechooser.cpp | 298 - kio/kio/kmimetypechooser.h | 180 - kio/kio/kmimetyperesolver.h | 255 - kio/kio/knfsshare.cpp | 219 - kio/kio/knfsshare.h | 86 - kio/kio/kprotocolinfo.cpp | 257 - kio/kio/kprotocolinfo.h | 688 --- kio/kio/kprotocolmanager.cpp | 534 -- kio/kio/kprotocolmanager.h | 389 -- kio/kio/kremoteencoding.cpp | 95 - kio/kio/kremoteencoding.h | 127 - kio/kio/krun.cpp | 1574 ----- kio/kio/krun.h | 512 -- kio/kio/ksambashare.cpp | 239 - kio/kio/ksambashare.h | 85 - kio/kio/kscan.cpp | 185 - kio/kio/kscan.h | 370 -- kio/kio/kservice.cpp | 934 --- kio/kio/kservice.h | 562 -- kio/kio/kservice_p.h | 41 - kio/kio/kservicefactory.cpp | 291 - kio/kio/kservicefactory.h | 113 - kio/kio/kservicegroup.cpp | 724 --- kio/kio/kservicegroup.h | 353 -- kio/kio/kservicegroupfactory.cpp | 148 - kio/kio/kservicegroupfactory.h | 80 - kio/kio/kservicetype.cpp | 366 -- kio/kio/kservicetype.h | 251 - kio/kio/kservicetypefactory.cpp | 300 - kio/kio/kservicetypefactory.h | 123 - kio/kio/kshellcompletion.cpp | 311 - kio/kio/kshellcompletion.h | 85 - kio/kio/kshred.cpp | 276 - kio/kio/kshred.h | 156 - kio/kio/ktar.cpp | 980 ---- kio/kio/ktar.h | 171 - kio/kio/ktrader.cpp | 186 - kio/kio/ktrader.h | 295 - kio/kio/ktraderparse.cpp | 159 - kio/kio/ktraderparse.h | 52 - kio/kio/ktraderparsetree.cpp | 714 --- kio/kio/ktraderparsetree.h | 371 -- kio/kio/kurifilter.cpp | 451 -- kio/kio/kurifilter.h | 667 --- kio/kio/kurlcompletion.cpp | 1604 ----- kio/kio/kurlcompletion.h | 236 - kio/kio/kurlpixmapprovider.cpp | 33 - kio/kio/kurlpixmapprovider.h | 59 - kio/kio/kuserprofile.cpp | 355 -- kio/kio/kuserprofile.h | 282 - kio/kio/kzip.cpp | 1460 ----- kio/kio/kzip.h | 284 - kio/kio/lex.c | 1759 ------ kio/kio/lex.l | 126 - kio/kio/metainfojob.cpp | 184 - kio/kio/metainfojob.h | 119 - kio/kio/netaccess.cpp | 536 -- kio/kio/netaccess.h | 540 -- kio/kio/observer.cpp | 417 -- kio/kio/observer.h | 213 - kio/kio/passdlg.cpp | 367 -- kio/kio/passdlg.h | 175 - kio/kio/paste.cpp | 308 - kio/kio/paste.h | 125 - kio/kio/pastedialog.cpp | 84 - kio/kio/pastedialog.h | 64 - kio/kio/posixacladdons.cpp | 236 - kio/kio/posixacladdons.h | 47 - kio/kio/previewjob.cpp | 597 -- kio/kio/previewjob.h | 182 - kio/kio/progressbase.cpp | 180 - kio/kio/progressbase.h | 271 - kio/kio/renamedlg.cpp | 574 -- kio/kio/renamedlg.h | 153 - kio/kio/renamedlgplugin.h | 59 - kio/kio/scheduler.cpp | 922 --- kio/kio/scheduler.h | 364 -- kio/kio/sessiondata.cpp | 311 - kio/kio/sessiondata.h | 67 - kio/kio/skipdlg.cpp | 143 - kio/kio/skipdlg.h | 61 - kio/kio/slave.cpp | 519 -- kio/kio/slave.h | 270 - kio/kio/slavebase.cpp | 1315 ----- kio/kio/slavebase.h | 847 --- kio/kio/slaveconfig.cpp | 225 - kio/kio/slaveconfig.h | 106 - kio/kio/slaveinterface.cpp | 550 -- kio/kio/slaveinterface.h | 290 - kio/kio/statusbarprogress.cpp | 166 - kio/kio/statusbarprogress.h | 112 - kio/kio/tcpslavebase.cpp | 1343 ----- kio/kio/tcpslavebase.h | 389 -- kio/kio/tdelficon.cpp | 89 - kio/kio/tdelficon.h | 54 - kio/kio/thumbcreator.h | 124 - kio/kio/yacc.c | 1522 ----- kio/kio/yacc.h | 93 - kio/kio/yacc.y | 126 - kio/kioexec/CMakeLists.txt | 42 - kio/kioexec/Makefile.am | 19 - kio/kioexec/README | 26 - kio/kioexec/main.cpp | 294 - kio/kioexec/main.h | 35 - kio/kioslave.upd | 18 - kio/kpasswdserver.desktop | 157 - kio/kpasswdserver/CMakeLists.txt | 43 - kio/kpasswdserver/DESIGN | 56 - kio/kpasswdserver/Makefile.am | 15 - kio/kpasswdserver/kpasswdserver.cpp | 715 --- kio/kpasswdserver/kpasswdserver.h | 118 - kio/kscan.desktop | 19 - kio/kssl/CMakeLists.txt | 57 - kio/kssl/KPMG-CA-16389.0.DC80502.pdf | Bin 91118 -> 0 bytes kio/kssl/Makefile.am | 72 - kio/kssl/README | 15 - kio/kssl/SECURITY-HOLES | 17 - kio/kssl/TODO | 25 - kio/kssl/configure.in.in | 7 - kio/kssl/keygenwizard.ui | 46 - kio/kssl/keygenwizard2.ui | 78 - kio/kssl/kopenssl.cc | 1601 ----- kio/kssl/kopenssl.h | 920 --- kio/kssl/ksmimecrypto.cc | 424 -- kio/kssl/ksmimecrypto.h | 128 - kio/kssl/kssl.cc | 688 --- kio/kssl/kssl.h | 301 - kio/kssl/kssl/CMakeLists.txt | 14 - kio/kssl/kssl/DigiCertAssuredIDRootCA.pem | 22 - kio/kssl/kssl/DigiCertGlobalRootCA.pem | 22 - kio/kssl/kssl/DigiCertHighAssuranceEVRootCA.pem | 23 - kio/kssl/kssl/GeoTrust_Universal_CA.pem | 32 - kio/kssl/kssl/GeoTrust_Universal_CA2.pem | 31 - kio/kssl/kssl/HOWTO | 30 - kio/kssl/kssl/Makefile.am | 6 - kio/kssl/kssl/StartCom.pem | 148 - kio/kssl/kssl/SwissSign-Gold-G2.pem | 33 - kio/kssl/kssl/SwissSign-Platinum-G2.pem | 33 - kio/kssl/kssl/SwissSign-Silver-G2.pem | 33 - kio/kssl/kssl/WiseKey.pem | 24 - kio/kssl/kssl/ac_offline_raiz_certicamara.pem | 37 - kio/kssl/kssl/argedaten-root-ca-cert.pem | 23 - kio/kssl/kssl/belgacom.pem | 16 - kio/kssl/kssl/caroot/CMakeLists.txt | 12 - kio/kssl/kssl/caroot/Makefile.am | 4 - kio/kssl/kssl/caroot/ca-bundle.crt | 2973 ---------- kio/kssl/kssl/cert_bundle | 47 - kio/kssl/kssl/cert_extract.c | 183 - kio/kssl/kssl/certbundle_Makefile | 43 - kio/kssl/kssl/certkde | 75 - kio/kssl/kssl/certum.pem | 19 - kio/kssl/kssl/certum1.pem | 16 - kio/kssl/kssl/certum2.pem | 16 - kio/kssl/kssl/certum3.pem | 16 - kio/kssl/kssl/certum4.pem | 16 - kio/kssl/kssl/comodo1.pem | 25 - kio/kssl/kssl/comodo2.pem | 25 - kio/kssl/kssl/comodo3.pem | 25 - kio/kssl/kssl/comodo4.pem | 26 - kio/kssl/kssl/comodo5.pem | 26 - kio/kssl/kssl/comodo6.pem | 27 - kio/kssl/kssl/comodo7.pem | 26 - kio/kssl/kssl/dfn-root-ca-cert.pem | 39 - kio/kssl/kssl/gd-class2-root.pem | 24 - kio/kssl/kssl/geotrust-global-1.pem | 20 - kio/kssl/kssl/geotrust-global-2.pem | 22 - kio/kssl/kssl/globalsign-root-r1.pem | 21 - kio/kssl/kssl/globalsign-root-r2.pem | 22 - kio/kssl/kssl/icpbrasil.pem | 28 - kio/kssl/kssl/ipsservidores.pem | 17 - kio/kssl/kssl/ksslcalist | 787 --- kio/kssl/kssl/localcerts | 36 - kio/kssl/kssl/mergelocal | 65 - kio/kssl/kssl/netlock1.pem | 31 - kio/kssl/kssl/netlock2.pem | 37 - kio/kssl/kssl/netlock3.pem | 31 - kio/kssl/kssl/netlock4.pem | 39 - kio/kssl/kssl/oces.pem | 30 - kio/kssl/kssl/quovadis.pem | 34 - kio/kssl/kssl/qvrca2.pem | 33 - kio/kssl/kssl/qvrca3.pem | 38 - kio/kssl/kssl/sf-class2-root.pem | 24 - kio/kssl/kssl/sonera1.pem | 19 - kio/kssl/kssl/sonera2.pem | 19 - kio/kssl/kssl/staatdernederlandenrotca.pem | 22 - kio/kssl/kssl/startcom.pem | 30 - kio/kssl/kssl/startssl.pem | 44 - kio/kssl/kssl/tcclass2-2011.pem | 20 - kio/kssl/kssl/tcclass3-2011.pem | 20 - kio/kssl/kssl/utn-network.pem | 26 - kio/kssl/kssl/utn-sgc.pem | 26 - kio/kssl/kssl/xgca.pem | 25 - kio/kssl/ksslall.h | 41 - kio/kssl/ksslcallback.c | 89 - kio/kssl/ksslcertchain.cc | 216 - kio/kssl/ksslcertchain.h | 136 - kio/kssl/ksslcertdlg.cc | 174 - kio/kssl/ksslcertdlg.h | 138 - kio/kssl/ksslcertificate.cc | 1157 ---- kio/kssl/ksslcertificate.h | 376 -- kio/kssl/ksslcertificatecache.cc | 399 -- kio/kssl/ksslcertificatecache.h | 107 - kio/kssl/ksslcertificatefactory.cc | 122 - kio/kssl/ksslcertificatefactory.h | 50 - kio/kssl/ksslcertificatehome.cc | 246 - kio/kssl/ksslcertificatehome.h | 90 - kio/kssl/ksslconfig.h.cmake | 26 - kio/kssl/ksslconfig.h.in | 26 - kio/kssl/ksslconfig_win.h | 26 - kio/kssl/ksslconnectioninfo.cc | 66 - kio/kssl/ksslconnectioninfo.h | 95 - kio/kssl/ksslcsessioncache.cc | 120 - kio/kssl/ksslcsessioncache.h | 47 - kio/kssl/kssldefs.h | 37 - kio/kssl/ksslinfodlg.cc | 463 -- kio/kssl/ksslinfodlg.h | 173 - kio/kssl/ksslkeygen.cc | 223 - kio/kssl/ksslkeygen.h | 95 - kio/kssl/ksslpeerinfo.cc | 171 - kio/kssl/ksslpeerinfo.h | 108 - kio/kssl/ksslpemcallback.cc | 61 - kio/kssl/ksslpemcallback.h | 29 - kio/kssl/ksslpkcs12.cc | 295 - kio/kssl/ksslpkcs12.h | 194 - kio/kssl/ksslpkcs7.cc | 208 - kio/kssl/ksslpkcs7.h | 156 - kio/kssl/ksslsession.cc | 82 - kio/kssl/ksslsession.h | 73 - kio/kssl/ksslsettings.cc | 356 -- kio/kssl/ksslsettings.h | 224 - kio/kssl/ksslsigners.cc | 251 - kio/kssl/ksslsigners.h | 172 - kio/kssl/ksslutils.cc | 94 - kio/kssl/ksslutils.h | 77 - kio/kssl/ksslx509map.cc | 103 - kio/kssl/ksslx509map.h | 86 - kio/kssl/ksslx509v3.cc | 143 - kio/kssl/ksslx509v3.h | 122 - kio/kurifilterplugin.desktop | 84 - kio/magic | 1065 ---- kio/misc/CMakeLists.txt | 100 - kio/misc/Makefile.am | 60 - kio/misc/fileshareset | 430 -- kio/misc/kfile/CMakeLists.txt | 39 - kio/misc/kfile/Makefile.am | 10 - kio/misc/kfile/README | 4 - kio/misc/kfile/fileprops.cpp | 480 -- kio/misc/kfile/fileprops.h | 74 - kio/misc/kio_uiserver.desktop | 100 - kio/misc/kmailservice.cpp | 45 - kio/misc/kmailservice.protocol | 15 - kio/misc/kpac/CMakeLists.txt | 66 - kio/misc/kpac/Makefile.am | 30 - kio/misc/kpac/README | 9 - kio/misc/kpac/README.wpad | 73 - kio/misc/kpac/TODO | 1 - kio/misc/kpac/configure.in.in | 26 - kio/misc/kpac/dhcp.h | 78 - kio/misc/kpac/discovery.cpp | 147 - kio/misc/kpac/discovery.h | 55 - kio/misc/kpac/downloader.cpp | 89 - kio/misc/kpac/downloader.h | 64 - kio/misc/kpac/eventsrc | 530 -- kio/misc/kpac/kpac_dhcp_helper.c | 229 - kio/misc/kpac/kpactest.pac | 169 - kio/misc/kpac/proxyscout.cpp | 196 - kio/misc/kpac/proxyscout.desktop | 131 - kio/misc/kpac/proxyscout.h | 82 - kio/misc/kpac/script.cpp | 465 -- kio/misc/kpac/script.h | 56 - kio/misc/ksendbugmail/CMakeLists.txt | 37 - kio/misc/ksendbugmail/Makefile.am | 26 - kio/misc/ksendbugmail/main.cpp | 142 - kio/misc/ksendbugmail/main.h | 20 - kio/misc/ksendbugmail/smtp.cpp | 336 -- kio/misc/ksendbugmail/smtp.h | 144 - kio/misc/kssld/CMakeLists.txt | 47 - kio/misc/kssld/Makefile.am | 33 - kio/misc/kssld/kssld.cpp | 1027 ---- kio/misc/kssld/kssld.desktop | 156 - kio/misc/kssld/kssld.h | 154 - kio/misc/ktelnetservice.cpp | 112 - kio/misc/mms.protocol | 73 - kio/misc/mmst.protocol | 15 - kio/misc/mmsu.protocol | 15 - kio/misc/pnm.protocol | 15 - kio/misc/rlogin.protocol | 13 - kio/misc/rtsp.protocol | 15 - kio/misc/rtspt.protocol | 15 - kio/misc/rtspu.protocol | 15 - kio/misc/ssh.protocol | 13 - kio/misc/tdentlm/CMakeLists.txt | 43 - kio/misc/tdentlm/Makefile.am | 12 - kio/misc/tdentlm/des.cpp | 513 -- kio/misc/tdentlm/des.h | 19 - kio/misc/tdentlm/kswap.h | 428 -- kio/misc/tdentlm/tdentlm.cpp | 389 -- kio/misc/tdentlm/tdentlm.h | 233 - kio/misc/tdesasl/CMakeLists.txt | 42 - kio/misc/tdesasl/Makefile.am | 12 - kio/misc/tdesasl/tdesasl.cpp | 285 - kio/misc/tdesasl/tdesasl.h | 169 - kio/misc/tdewalletd/CMakeLists.txt | 49 - kio/misc/tdewalletd/Makefile.am | 35 - kio/misc/tdewalletd/kbetterthankdialogbase.ui | 154 - kio/misc/tdewalletd/kbetterthankdialogbase.ui.h | 50 - kio/misc/tdewalletd/ktimeout.cpp | 84 - kio/misc/tdewalletd/ktimeout.h | 52 - kio/misc/tdewalletd/tdewalletd.cpp | 1514 ----- kio/misc/tdewalletd/tdewalletd.desktop | 151 - kio/misc/tdewalletd/tdewalletd.h | 199 - kio/misc/tdewalletd/tdewalletwizard.ui | 545 -- kio/misc/tdewalletd/tdewalletwizard.ui.h | 74 - kio/misc/telnet.protocol | 13 - kio/misc/uiserver.cpp | 1413 ----- kio/misc/uiserver.h | 430 -- kio/pics/CMakeLists.txt | 14 - kio/pics/Makefile.am | 3 - kio/pics/cr16-app-kio_uiserver.png | Bin 838 -> 0 bytes kio/proxytype.pl | 11 - kio/renamedlgplugin.desktop | 84 - kio/tdecmodule.desktop | 109 - kio/tests/CMakeLists.txt | 36 - kio/tests/Makefile.am | 91 - kio/tests/dataprotocoltest.cpp | 287 - kio/tests/dummymeta.cpp | 20 - kio/tests/dummymeta.desktop | 54 - kio/tests/dummymeta.h | 20 - kio/tests/getalltest.cpp | 44 - kio/tests/jobtest.cpp | 613 -- kio/tests/jobtest.h | 79 - kio/tests/kacltest.cpp | 309 - kio/tests/kacltest.h | 53 - kio/tests/kdcopcheck.cpp | 132 - kio/tests/kdcopcheck.h | 28 - kio/tests/kdefaultprogresstest.cpp | 39 - kio/tests/kdirlistertest.cpp | 162 - kio/tests/kdirlistertest.h | 120 - kio/tests/kdirwatchtest.cpp | 82 - kio/tests/kdirwatchtest.h | 33 - kio/tests/kdirwatchunittest.cpp | 180 - kio/tests/kdirwatchunittest.h | 66 - kio/tests/kfiltertest.cpp | 118 - kio/tests/kionetrctest.cpp | 71 - kio/tests/kiopassdlgtest.cpp | 32 - kio/tests/kioslavetest.cpp | 555 -- kio/tests/kioslavetest.h | 108 - kio/tests/kmfitest.cpp | 28 - kio/tests/kmimefromext.cpp | 53 - kio/tests/kmimemagictest.cpp | 54 - kio/tests/kmimetypetest.cpp | 76 - kio/tests/kpropsdlgtest.cpp | 35 - kio/tests/kprotocolinfotest.cpp | 59 - kio/tests/kruntest.cpp | 209 - kio/tests/kruntest.h | 58 - kio/tests/kscantest.cpp | 16 - kio/tests/kshredtest.cpp | 74 - kio/tests/ktartest.cpp | 178 - kio/tests/ktradertest.cpp | 108 - kio/tests/kurifiltertest.cpp | 361 -- kio/tests/kurlcompletiontest.cpp | 189 - kio/tests/kziptest.cpp | 435 -- kio/tests/metatest.cpp | 321 - kio/tests/netaccesstest.cpp | 48 - kio/tests/previewtest.cpp | 64 - kio/tests/previewtest.h | 25 - kio/tests/speed.cpp | 139 - kio/tests/speed.h | 24 - kio/tests/tdesycocatest.cpp | 360 -- kio/tests/tdesycocaupdatetest.cpp | 11 - kio/tests/wronglocalsizes.zip | Bin 325 -> 0 bytes kio/useragent.pl | 13 - kioslave/CMakeLists.txt | 18 - kioslave/Mainpage.dox | 9 - kioslave/Makefile.am | 27 - kioslave/bzip2/CMakeLists.txt | 42 - kioslave/bzip2/Makefile.am | 11 - kioslave/bzip2/configure.in.in | 11 - kioslave/bzip2/kbzip2filter.cpp | 187 - kioslave/bzip2/kbzip2filter.desktop | 86 - kioslave/bzip2/kbzip2filter.h | 54 - kioslave/file/CMakeLists.txt | 55 - kioslave/file/Makefile.am | 22 - kioslave/file/file.cc | 1831 ------ kioslave/file/file.h | 98 - kioslave/file/file.protocol | 15 - kioslave/ftp/CMakeLists.txt | 44 - kioslave/ftp/Makefile.am | 16 - kioslave/ftp/configure.in.in | 5 - kioslave/ftp/ftp.cc | 2675 --------- kioslave/ftp/ftp.h | 603 -- kioslave/ftp/ftp.protocol | 18 - kioslave/gzip/CMakeLists.txt | 41 - kioslave/gzip/Makefile.am | 12 - kioslave/gzip/kgzipfilter.cpp | 336 -- kioslave/gzip/kgzipfilter.desktop | 86 - kioslave/gzip/kgzipfilter.h | 52 - kioslave/http/CMakeLists.txt | 69 - kioslave/http/Makefile.am | 31 - kioslave/http/README.http_cache_cleaner | 20 - kioslave/http/README.webdav | 184 - kioslave/http/THOUGHTS | 28 - kioslave/http/TODO | 45 - kioslave/http/configure.in.bot | 10 - kioslave/http/configure.in.in | 110 - kioslave/http/http.cc | 6108 -------------------- kioslave/http/http.h | 577 -- kioslave/http/http.protocol | 12 - kioslave/http/http_cache_cleaner.cpp | 284 - kioslave/http/http_cache_cleaner.desktop | 168 - kioslave/http/https.protocol | 12 - kioslave/http/kcookiejar/CMakeLists.txt | 63 - kioslave/http/kcookiejar/Makefile.am | 31 - kioslave/http/kcookiejar/domain_info | 1 - kioslave/http/kcookiejar/kcookiejar.cpp | 1559 ----- kioslave/http/kcookiejar/kcookiejar.desktop | 157 - kioslave/http/kcookiejar/kcookiejar.h | 365 -- kioslave/http/kcookiejar/kcookiescfg.upd | 16 - kioslave/http/kcookiejar/kcookieserver.cpp | 606 -- kioslave/http/kcookiejar/kcookieserver.h | 98 - kioslave/http/kcookiejar/kcookiewin.cpp | 382 -- kioslave/http/kcookiejar/kcookiewin.h | 84 - kioslave/http/kcookiejar/main.cpp | 92 - kioslave/http/kcookiejar/netscape_cookie_spec.html | 331 -- kioslave/http/kcookiejar/rfc2109 | 1179 ---- kioslave/http/kcookiejar/rfc2965 | 1459 ----- kioslave/http/kcookiejar/tests/Makefile.am | 18 - kioslave/http/kcookiejar/tests/cookie.test | 162 - kioslave/http/kcookiejar/tests/cookie_rfc.test | 148 - kioslave/http/kcookiejar/tests/cookie_saving.test | 430 -- .../http/kcookiejar/tests/cookie_settings.test | 116 - kioslave/http/kcookiejar/tests/kcookiejartest.cpp | 270 - kioslave/http/rfc2518.txt | 1 - kioslave/http/rfc2616.txt | 1 - kioslave/http/rfc2617.txt | 1 - kioslave/http/rfc2817.txt | 1 - kioslave/http/rfc2818.txt | 1 - kioslave/http/rfc3229.txt | 1 - kioslave/http/rfc3253.txt | 1 - kioslave/http/shoutcast-icecast.txt | 605 -- kioslave/http/webdav.protocol | 18 - kioslave/http/webdavs.protocol | 18 - kioslave/iso/CMakeLists.txt | 51 - kioslave/iso/Makefile.am | 67 - kioslave/iso/iso.cpp | 525 -- kioslave/iso/iso.h | 51 - kioslave/iso/iso.protocol | 11 - kioslave/iso/isoservice.desktop | 14 - kioslave/iso/kio_iso.desktop | 13 - kioslave/iso/kio_isorc | 2 - kioslave/iso/kiso.cpp | 460 -- kioslave/iso/kiso.h | 112 - kioslave/iso/kisodirectory.cpp | 31 - kioslave/iso/kisodirectory.h | 40 - kioslave/iso/kisofile.cpp | 53 - kioslave/iso/kisofile.h | 49 - kioslave/iso/libisofs/CMakeLists.txt | 23 - kioslave/iso/libisofs/COPYING | 280 - kioslave/iso/libisofs/ChangeLog | 6 - kioslave/iso/libisofs/Makefile.am | 18 - kioslave/iso/libisofs/README | 24 - kioslave/iso/libisofs/bswap.h | 94 - kioslave/iso/libisofs/el_torito.h | 63 - kioslave/iso/libisofs/iso_fs.h | 219 - kioslave/iso/libisofs/isofs.c | 876 --- kioslave/iso/libisofs/isofs.h | 161 - kioslave/iso/libisofs/rock.h | 127 - kioslave/iso/qfilehack.cpp | 40 - kioslave/iso/qfilehack.h | 38 - kioslave/metainfo/CMakeLists.txt | 43 - kioslave/metainfo/Makefile.am | 24 - kioslave/metainfo/metainfo.cpp | 103 - kioslave/metainfo/metainfo.h | 38 - kioslave/metainfo/metainfo.protocol | 9 - knewstuff/CMakeLists.txt | 16 +- knewstuff/Makefile.am | 10 +- knewstuff/downloaddialog.cpp | 6 +- knewstuff/engine.cpp | 2 +- knewstuff/khotnewstuff.cpp | 55 - knewstuff/khotnewstuffrc | 3 - knewstuff/knewstuffgeneric.cpp | 2 +- knewstuff/knewstuffsecure.cpp | 4 +- knewstuff/provider.cpp | 4 +- knewstuff/tdehotnewstuff.cpp | 55 + knewstuff/tdehotnewstuffrc | 3 + knewstuff/uploaddialog.cpp | 2 +- kstyles/plastik/config/CMakeLists.txt | 2 +- kstyles/plastik/config/Makefile.am | 4 +- kstyles/plastik/config/plastikconf.cpp | 223 - kstyles/plastik/config/plastikconf.h | 85 - kstyles/plastik/config/plastitdeconf.cpp | 223 + kstyles/plastik/config/plastitdeconf.h | 85 + libtdemid/deviceman.cc | 2 +- tdecert/CMakeLists.txt | 12 +- tdecert/Makefile.am | 2 +- tdecert/tdecertpart.cc | 8 +- tdecmshell/CMakeLists.txt | 41 + tdecmshell/Makefile.am | 39 + tdecmshell/main.cpp | 350 ++ tdecmshell/main.h | 104 + tdeconf_update/CMakeLists.txt | 34 + tdeconf_update/Mainpage.dox | 31 + tdeconf_update/Makefile.am | 33 + tdeconf_update/README.tdeconf_update | 251 + tdeconf_update/tdeconf_update.cpp | 959 +++ tdecore/CMakeLists.txt | 16 +- tdecore/DESIGN.kconfig | 224 - tdecore/DESIGN.tdeconfig | 224 + tdecore/MAINTAINERS | 10 +- tdecore/Makefile.am | 22 +- tdecore/README.kiosk | 2 +- tdecore/README.kstartupinfo | 2 +- tdecore/kaccelaction.cpp | 2 +- tdecore/kaccelbase.cpp | 2 +- tdecore/kappdcopiface.cpp | 2 +- tdecore/kapplication.cpp | 4 +- tdecore/kcharsets.cpp | 2 +- tdecore/kcheckaccelerators.cpp | 2 +- tdecore/kclipboard.cpp | 2 +- tdecore/kconfig.cpp | 367 -- tdecore/kconfig.h | 296 - tdecore/kconfig_compiler/CMakeLists.txt | 29 - tdecore/kconfig_compiler/Makefile.am | 18 - tdecore/kconfig_compiler/README.dox | 255 - tdecore/kconfig_compiler/TODO | 0 tdecore/kconfig_compiler/checkkcfg.pl | 83 - tdecore/kconfig_compiler/example/Makefile.am | 27 - tdecore/kconfig_compiler/example/autoexample.cpp | 64 - tdecore/kconfig_compiler/example/example.cpp | 52 - tdecore/kconfig_compiler/example/example.kcfg | 63 - .../example/exampleprefs_base.kcfgc | 18 - tdecore/kconfig_compiler/example/general_base.ui | 46 - tdecore/kconfig_compiler/example/myoptions_base.ui | 35 - tdecore/kconfig_compiler/kcfg.xsd | 192 - tdecore/kconfig_compiler/kconfig_compiler.cpp | 1700 ------ tdecore/kconfig_compiler/tests/Makefile.am | 134 - .../tests/kconfigcompiler_test.cpp | 96 - .../kconfig_compiler/tests/kconfigcompiler_test.h | 35 - tdecore/kconfig_compiler/tests/myprefs.h | 7 - tdecore/kconfig_compiler/tests/test1.cpp.ref | 72 - tdecore/kconfig_compiler/tests/test1.h.ref | 196 - tdecore/kconfig_compiler/tests/test1.kcfg | 55 - tdecore/kconfig_compiler/tests/test1.kcfgc | 18 - tdecore/kconfig_compiler/tests/test1main.cpp | 29 - tdecore/kconfig_compiler/tests/test2.cpp.ref | 98 - tdecore/kconfig_compiler/tests/test2.h.ref | 333 -- tdecore/kconfig_compiler/tests/test2.kcfg | 78 - tdecore/kconfig_compiler/tests/test2.kcfgc | 11 - tdecore/kconfig_compiler/tests/test2main.cpp | 29 - tdecore/kconfig_compiler/tests/test3.cpp.ref | 29 - tdecore/kconfig_compiler/tests/test3.h.ref | 138 - tdecore/kconfig_compiler/tests/test3.kcfg | 26 - tdecore/kconfig_compiler/tests/test3.kcfgc | 12 - tdecore/kconfig_compiler/tests/test3main.cpp | 29 - tdecore/kconfig_compiler/tests/test4.cpp.ref | 82 - tdecore/kconfig_compiler/tests/test4.h.ref | 135 - tdecore/kconfig_compiler/tests/test4.kcfg | 42 - tdecore/kconfig_compiler/tests/test4.kcfgc | 11 - tdecore/kconfig_compiler/tests/test4main.cpp | 30 - tdecore/kconfig_compiler/tests/test5.cpp.ref | 82 - tdecore/kconfig_compiler/tests/test5.h.ref | 127 - tdecore/kconfig_compiler/tests/test5.kcfg | 42 - tdecore/kconfig_compiler/tests/test5.kcfgc | 11 - tdecore/kconfig_compiler/tests/test5main.cpp | 30 - tdecore/kconfig_compiler/tests/test6.cpp.ref | 31 - tdecore/kconfig_compiler/tests/test6.h.ref | 93 - tdecore/kconfig_compiler/tests/test6.kcfg | 25 - tdecore/kconfig_compiler/tests/test6.kcfgc | 11 - tdecore/kconfig_compiler/tests/test6main.cpp | 30 - tdecore/kconfig_compiler/tests/test7.cpp.ref | 31 - tdecore/kconfig_compiler/tests/test7.h.ref | 93 - tdecore/kconfig_compiler/tests/test7.kcfg | 25 - tdecore/kconfig_compiler/tests/test7.kcfgc | 11 - tdecore/kconfig_compiler/tests/test7main.cpp | 30 - tdecore/kconfig_compiler/tests/test8a.cpp.ref | 22 - tdecore/kconfig_compiler/tests/test8a.h.ref | 61 - tdecore/kconfig_compiler/tests/test8a.kcfg | 17 - tdecore/kconfig_compiler/tests/test8a.kcfgc | 3 - tdecore/kconfig_compiler/tests/test8b.cpp.ref | 46 - tdecore/kconfig_compiler/tests/test8b.h.ref | 96 - tdecore/kconfig_compiler/tests/test8b.kcfg | 21 - tdecore/kconfig_compiler/tests/test8b.kcfgc | 6 - tdecore/kconfig_compiler/tests/test8main.cpp | 34 - tdecore/kconfig_compiler/tests/test9.cpp.ref | 35 - tdecore/kconfig_compiler/tests/test9.h.ref | 82 - tdecore/kconfig_compiler/tests/test9.kcfg | 24 - tdecore/kconfig_compiler/tests/test9.kcfgc | 18 - tdecore/kconfig_compiler/tests/test9main.cpp | 43 - .../kconfig_compiler/tests/test_dpointer.cpp.ref | 344 -- tdecore/kconfig_compiler/tests/test_dpointer.h.ref | 224 - tdecore/kconfig_compiler/tests/test_dpointer.kcfg | 78 - tdecore/kconfig_compiler/tests/test_dpointer.kcfgc | 11 - .../kconfig_compiler/tests/test_dpointer_main.cpp | 30 - tdecore/kconfigbackend.cpp | 1190 ---- tdecore/kconfigbackend.h | 299 - tdecore/kconfigbase.cpp | 1937 ------- tdecore/kconfigbase.h | 2180 ------- tdecore/kconfigdata.h | 146 - tdecore/kconfigdialogmanager.cpp | 398 -- tdecore/kconfigdialogmanager.h | 236 - tdecore/kconfigskeleton.cpp | 1207 ---- tdecore/kconfigskeleton.h | 1230 ---- tdecore/kcrash.cpp | 4 +- tdecore/kdebug.areas | 20 +- tdecore/kdebug.cpp | 2 +- tdecore/kdesktopfile.cpp | 2 +- tdecore/kdesktopfile.h | 2 +- tdecore/kdetcompmgr.cpp | 2 +- tdecore/kglobal.cpp | 2 +- tdecore/kglobalsettings.cpp | 2 +- tdecore/kiconeffect.cpp | 2 +- tdecore/kiconloader.cpp | 2 +- tdecore/kicontheme.cpp | 2 +- tdecore/kinstance.cpp | 2 +- tdecore/kkeyserver_x11.cpp | 2 +- tdecore/klocale.cpp | 4 +- tdecore/kmdcodec_compat.h | 2 +- tdecore/knotifyclient.cpp | 2 +- tdecore/kprotocolinfo_tdecore.cpp | 4 +- tdecore/kprotocolinfofactory.h | 2 +- tdecore/kshortcutlist.cpp | 2 +- tdecore/ksimpleconfig.cpp | 2 +- tdecore/ksimpleconfig.h | 2 +- tdecore/ksimpledirwatch.cpp | 4 +- tdecore/ksocks.cpp | 2 +- tdecore/kstandarddirs.cpp | 2 +- tdecore/kstdaccel.cpp | 2 +- tdecore/kuniqueapplication.cpp | 2 +- .../network-manager/network-manager.cpp | 10 +- tdecore/tdeconfig.cpp | 367 ++ tdecore/tdeconfig.h | 296 + tdecore/tdeconfig_compiler/CMakeLists.txt | 29 + tdecore/tdeconfig_compiler/Makefile.am | 18 + tdecore/tdeconfig_compiler/README.dox | 255 + tdecore/tdeconfig_compiler/TODO | 0 tdecore/tdeconfig_compiler/checkkcfg.pl | 83 + tdecore/tdeconfig_compiler/example/Makefile.am | 27 + tdecore/tdeconfig_compiler/example/autoexample.cpp | 64 + tdecore/tdeconfig_compiler/example/example.cpp | 52 + tdecore/tdeconfig_compiler/example/example.kcfg | 63 + .../example/exampleprefs_base.kcfgc | 18 + tdecore/tdeconfig_compiler/example/general_base.ui | 46 + .../tdeconfig_compiler/example/myoptions_base.ui | 35 + tdecore/tdeconfig_compiler/kcfg.xsd | 192 + tdecore/tdeconfig_compiler/tdeconfig_compiler.cpp | 1700 ++++++ tdecore/tdeconfig_compiler/tests/Makefile.am | 134 + tdecore/tdeconfig_compiler/tests/myprefs.h | 7 + .../tests/tdeconfigcompiler_test.cpp | 96 + .../tests/tdeconfigcompiler_test.h | 35 + tdecore/tdeconfig_compiler/tests/test1.cpp.ref | 72 + tdecore/tdeconfig_compiler/tests/test1.h.ref | 196 + tdecore/tdeconfig_compiler/tests/test1.kcfg | 55 + tdecore/tdeconfig_compiler/tests/test1.kcfgc | 18 + tdecore/tdeconfig_compiler/tests/test1main.cpp | 29 + tdecore/tdeconfig_compiler/tests/test2.cpp.ref | 98 + tdecore/tdeconfig_compiler/tests/test2.h.ref | 333 ++ tdecore/tdeconfig_compiler/tests/test2.kcfg | 78 + tdecore/tdeconfig_compiler/tests/test2.kcfgc | 11 + tdecore/tdeconfig_compiler/tests/test2main.cpp | 29 + tdecore/tdeconfig_compiler/tests/test3.cpp.ref | 29 + tdecore/tdeconfig_compiler/tests/test3.h.ref | 138 + tdecore/tdeconfig_compiler/tests/test3.kcfg | 26 + tdecore/tdeconfig_compiler/tests/test3.kcfgc | 12 + tdecore/tdeconfig_compiler/tests/test3main.cpp | 29 + tdecore/tdeconfig_compiler/tests/test4.cpp.ref | 82 + tdecore/tdeconfig_compiler/tests/test4.h.ref | 135 + tdecore/tdeconfig_compiler/tests/test4.kcfg | 42 + tdecore/tdeconfig_compiler/tests/test4.kcfgc | 11 + tdecore/tdeconfig_compiler/tests/test4main.cpp | 30 + tdecore/tdeconfig_compiler/tests/test5.cpp.ref | 82 + tdecore/tdeconfig_compiler/tests/test5.h.ref | 127 + tdecore/tdeconfig_compiler/tests/test5.kcfg | 42 + tdecore/tdeconfig_compiler/tests/test5.kcfgc | 11 + tdecore/tdeconfig_compiler/tests/test5main.cpp | 30 + tdecore/tdeconfig_compiler/tests/test6.cpp.ref | 31 + tdecore/tdeconfig_compiler/tests/test6.h.ref | 93 + tdecore/tdeconfig_compiler/tests/test6.kcfg | 25 + tdecore/tdeconfig_compiler/tests/test6.kcfgc | 11 + tdecore/tdeconfig_compiler/tests/test6main.cpp | 30 + tdecore/tdeconfig_compiler/tests/test7.cpp.ref | 31 + tdecore/tdeconfig_compiler/tests/test7.h.ref | 93 + tdecore/tdeconfig_compiler/tests/test7.kcfg | 25 + tdecore/tdeconfig_compiler/tests/test7.kcfgc | 11 + tdecore/tdeconfig_compiler/tests/test7main.cpp | 30 + tdecore/tdeconfig_compiler/tests/test8a.cpp.ref | 22 + tdecore/tdeconfig_compiler/tests/test8a.h.ref | 61 + tdecore/tdeconfig_compiler/tests/test8a.kcfg | 17 + tdecore/tdeconfig_compiler/tests/test8a.kcfgc | 3 + tdecore/tdeconfig_compiler/tests/test8b.cpp.ref | 46 + tdecore/tdeconfig_compiler/tests/test8b.h.ref | 96 + tdecore/tdeconfig_compiler/tests/test8b.kcfg | 21 + tdecore/tdeconfig_compiler/tests/test8b.kcfgc | 6 + tdecore/tdeconfig_compiler/tests/test8main.cpp | 34 + tdecore/tdeconfig_compiler/tests/test9.cpp.ref | 35 + tdecore/tdeconfig_compiler/tests/test9.h.ref | 82 + tdecore/tdeconfig_compiler/tests/test9.kcfg | 24 + tdecore/tdeconfig_compiler/tests/test9.kcfgc | 18 + tdecore/tdeconfig_compiler/tests/test9main.cpp | 43 + .../tdeconfig_compiler/tests/test_dpointer.cpp.ref | 344 ++ .../tdeconfig_compiler/tests/test_dpointer.h.ref | 224 + .../tdeconfig_compiler/tests/test_dpointer.kcfg | 78 + .../tdeconfig_compiler/tests/test_dpointer.kcfgc | 11 + .../tests/test_dpointer_main.cpp | 30 + tdecore/tdeconfigbackend.cpp | 1190 ++++ tdecore/tdeconfigbackend.h | 299 + tdecore/tdeconfigbase.cpp | 1937 +++++++ tdecore/tdeconfigbase.h | 2180 +++++++ tdecore/tdeconfigdata.h | 146 + tdecore/tdeconfigdialogmanager.cpp | 398 ++ tdecore/tdeconfigdialogmanager.h | 236 + tdecore/tdeconfigskeleton.cpp | 1207 ++++ tdecore/tdeconfigskeleton.h | 1230 ++++ tdecore/tdehardwaredevices.cpp | 2 +- tdecore/tdesycoca.cpp | 2 +- tdecore/tdesycoca.h | 4 +- tdecore/tests/Makefile.am | 12 +- tdecore/tests/kconfigtest.cpp | 162 - tdecore/tests/kconfigtestgui.cpp | 200 - tdecore/tests/kconfigtestgui.h | 72 - tdecore/tests/ksimpleconfigtest.cpp | 2 +- tdecore/tests/kstddirstest.cpp | 2 +- tdecore/tests/kurltest.cpp | 10 +- tdecore/tests/tdeconfigtest.cpp | 162 + tdecore/tests/tdeconfigtestgui.cpp | 200 + tdecore/tests/tdeconfigtestgui.h | 72 + tdefile-plugins/CMakeLists.txt | 12 + tdefile-plugins/elf/CMakeLists.txt | 42 + tdefile-plugins/elf/tdefile_elf.cpp | 133 + tdefile-plugins/elf/tdefile_elf.desktop | 66 + tdefile-plugins/elf/tdefile_elf.h | 50 + tdehtml/CMakeLists.txt | 10 +- tdehtml/Makefile.am | 2 +- tdehtml/css/CMakeLists.txt | 4 +- tdehtml/css/Makefile.am | 2 +- tdehtml/css/cssstyleselector.cpp | 2 +- tdehtml/dom/CMakeLists.txt | 2 +- tdehtml/dom/Makefile.am | 2 +- tdehtml/ecma/CMakeLists.txt | 6 +- tdehtml/ecma/Makefile.am | 2 +- tdehtml/ecma/kjs_debugwin.cpp | 4 +- tdehtml/ecma/kjs_navigator.cpp | 10 +- tdehtml/ecma/xmlhttprequest.cpp | 6 +- tdehtml/ecma/xmlhttprequest.h | 2 +- tdehtml/ecma/xmlserializer.h | 2 +- tdehtml/html/CMakeLists.txt | 8 +- tdehtml/html/Makefile.am | 2 +- tdehtml/html/html_formimpl.cpp | 2 +- tdehtml/java/CMakeLists.txt | 6 +- tdehtml/java/Makefile.am | 2 +- tdehtml/java/kjavaappletserver.cpp | 6 +- tdehtml/java/kjavaappletviewer.cpp | 4 +- tdehtml/java/kjavadownloader.cpp | 4 +- tdehtml/java/kjavaprocess.cpp | 2 +- tdehtml/misc/CMakeLists.txt | 6 +- tdehtml/misc/Makefile.am | 2 +- tdehtml/misc/helper.cpp | 2 +- tdehtml/misc/loader.cpp | 6 +- tdehtml/misc/loader.h | 2 +- tdehtml/rendering/CMakeLists.txt | 6 +- tdehtml/rendering/Makefile.am | 4 +- tdehtml/rendering/render_form.cpp | 2 +- tdehtml/tdehtml_ext.cpp | 4 +- tdehtml/tdehtml_ext.h | 2 +- tdehtml/tdehtml_iface.cc | 2 +- tdehtml/tdehtml_part.cpp | 12 +- tdehtml/tdehtml_run.cpp | 2 +- tdehtml/tdehtml_settings.cc | 2 +- tdehtml/tdehtmlimage.cpp | 2 +- tdehtml/tdemultipart/CMakeLists.txt | 4 +- tdehtml/tdemultipart/Makefile.am | 4 +- tdehtml/tdemultipart/tdemultipart.cpp | 2 +- tdehtml/test_regression.cpp | 2 +- tdehtml/testtdehtml.cpp | 2 +- tdehtml/xml/CMakeLists.txt | 4 +- tdehtml/xml/Makefile.am | 2 +- tdehtml/xml/dom_docimpl.cpp | 2 +- tdeio/CMakeLists.txt | 71 + tdeio/DESIGN | 272 + tdeio/DESIGN.krun | 35 + tdeio/DESIGN.metadata | 147 + tdeio/DESIGN.mimetypes | 34 + tdeio/DESKTOP_ENTRY_STANDARD | 373 ++ tdeio/Mainpage.dox | 120 + tdeio/Makefile.am | 67 + tdeio/application.desktop | 124 + tdeio/bookmarks/CMakeLists.txt | 55 + tdeio/bookmarks/Makefile.am | 40 + tdeio/bookmarks/dptrtemplate.h | 57 + tdeio/bookmarks/kbookmark.cc | 535 ++ tdeio/bookmarks/kbookmark.h | 329 ++ tdeio/bookmarks/kbookmarkbar.cc | 554 ++ tdeio/bookmarks/kbookmarkbar.h | 131 + tdeio/bookmarks/kbookmarkdombuilder.cc | 81 + tdeio/bookmarks/kbookmarkdombuilder.h | 48 + tdeio/bookmarks/kbookmarkdrag.cc | 169 + tdeio/bookmarks/kbookmarkdrag.h | 57 + tdeio/bookmarks/kbookmarkexporter.cc | 32 + tdeio/bookmarks/kbookmarkexporter.h | 50 + tdeio/bookmarks/kbookmarkimporter.cc | 101 + tdeio/bookmarks/kbookmarkimporter.h | 106 + tdeio/bookmarks/kbookmarkimporter_crash.cc | 215 + tdeio/bookmarks/kbookmarkimporter_crash.h | 74 + tdeio/bookmarks/kbookmarkimporter_ie.cc | 185 + tdeio/bookmarks/kbookmarkimporter_ie.h | 90 + tdeio/bookmarks/kbookmarkimporter_kde1.cc | 156 + tdeio/bookmarks/kbookmarkimporter_kde1.h | 49 + tdeio/bookmarks/kbookmarkimporter_ns.cc | 243 + tdeio/bookmarks/kbookmarkimporter_ns.h | 132 + tdeio/bookmarks/kbookmarkimporter_opera.cc | 170 + tdeio/bookmarks/kbookmarkimporter_opera.h | 86 + tdeio/bookmarks/kbookmarkmanager.cc | 727 +++ tdeio/bookmarks/kbookmarkmanager.h | 367 ++ tdeio/bookmarks/kbookmarkmenu.cc | 1187 ++++ tdeio/bookmarks/kbookmarkmenu.h | 265 + tdeio/bookmarks/kbookmarkmenu_p.h | 224 + tdeio/bookmarks/kbookmarknotifier.h | 45 + tdeio/data.protocol | 71 + tdeio/httpfilter/CMakeLists.txt | 32 + tdeio/httpfilter/Makefile.am | 8 + tdeio/httpfilter/httpfilter.cc | 372 ++ tdeio/httpfilter/httpfilter.h | 119 + tdeio/kcomprfilter.desktop | 82 + tdeio/kdatatool.desktop | 96 + tdeio/kpasswdserver.desktop | 157 + tdeio/kpasswdserver/CMakeLists.txt | 43 + tdeio/kpasswdserver/DESIGN | 56 + tdeio/kpasswdserver/Makefile.am | 15 + tdeio/kpasswdserver/kpasswdserver.cpp | 715 +++ tdeio/kpasswdserver/kpasswdserver.h | 118 + tdeio/kscan.desktop | 19 + tdeio/kssl/CMakeLists.txt | 57 + tdeio/kssl/KPMG-CA-16389.0.DC80502.pdf | Bin 0 -> 91118 bytes tdeio/kssl/Makefile.am | 72 + tdeio/kssl/README | 15 + tdeio/kssl/SECURITY-HOLES | 17 + tdeio/kssl/TODO | 25 + tdeio/kssl/configure.in.in | 7 + tdeio/kssl/keygenwizard.ui | 46 + tdeio/kssl/keygenwizard2.ui | 78 + tdeio/kssl/kopenssl.cc | 1601 +++++ tdeio/kssl/kopenssl.h | 920 +++ tdeio/kssl/ksmimecrypto.cc | 424 ++ tdeio/kssl/ksmimecrypto.h | 128 + tdeio/kssl/kssl.cc | 688 +++ tdeio/kssl/kssl.h | 301 + tdeio/kssl/kssl/CMakeLists.txt | 14 + tdeio/kssl/kssl/DigiCertAssuredIDRootCA.pem | 22 + tdeio/kssl/kssl/DigiCertGlobalRootCA.pem | 22 + tdeio/kssl/kssl/DigiCertHighAssuranceEVRootCA.pem | 23 + tdeio/kssl/kssl/GeoTrust_Universal_CA.pem | 32 + tdeio/kssl/kssl/GeoTrust_Universal_CA2.pem | 31 + tdeio/kssl/kssl/HOWTO | 30 + tdeio/kssl/kssl/Makefile.am | 6 + tdeio/kssl/kssl/StartCom.pem | 148 + tdeio/kssl/kssl/SwissSign-Gold-G2.pem | 33 + tdeio/kssl/kssl/SwissSign-Platinum-G2.pem | 33 + tdeio/kssl/kssl/SwissSign-Silver-G2.pem | 33 + tdeio/kssl/kssl/WiseKey.pem | 24 + tdeio/kssl/kssl/ac_offline_raiz_certicamara.pem | 37 + tdeio/kssl/kssl/argedaten-root-ca-cert.pem | 23 + tdeio/kssl/kssl/belgacom.pem | 16 + tdeio/kssl/kssl/caroot/CMakeLists.txt | 12 + tdeio/kssl/kssl/caroot/Makefile.am | 4 + tdeio/kssl/kssl/caroot/ca-bundle.crt | 2973 ++++++++++ tdeio/kssl/kssl/cert_bundle | 47 + tdeio/kssl/kssl/cert_extract.c | 183 + tdeio/kssl/kssl/certbundle_Makefile | 43 + tdeio/kssl/kssl/certkde | 75 + tdeio/kssl/kssl/certum.pem | 19 + tdeio/kssl/kssl/certum1.pem | 16 + tdeio/kssl/kssl/certum2.pem | 16 + tdeio/kssl/kssl/certum3.pem | 16 + tdeio/kssl/kssl/certum4.pem | 16 + tdeio/kssl/kssl/comodo1.pem | 25 + tdeio/kssl/kssl/comodo2.pem | 25 + tdeio/kssl/kssl/comodo3.pem | 25 + tdeio/kssl/kssl/comodo4.pem | 26 + tdeio/kssl/kssl/comodo5.pem | 26 + tdeio/kssl/kssl/comodo6.pem | 27 + tdeio/kssl/kssl/comodo7.pem | 26 + tdeio/kssl/kssl/dfn-root-ca-cert.pem | 39 + tdeio/kssl/kssl/gd-class2-root.pem | 24 + tdeio/kssl/kssl/geotrust-global-1.pem | 20 + tdeio/kssl/kssl/geotrust-global-2.pem | 22 + tdeio/kssl/kssl/globalsign-root-r1.pem | 21 + tdeio/kssl/kssl/globalsign-root-r2.pem | 22 + tdeio/kssl/kssl/icpbrasil.pem | 28 + tdeio/kssl/kssl/ipsservidores.pem | 17 + tdeio/kssl/kssl/ksslcalist | 787 +++ tdeio/kssl/kssl/localcerts | 36 + tdeio/kssl/kssl/mergelocal | 65 + tdeio/kssl/kssl/netlock1.pem | 31 + tdeio/kssl/kssl/netlock2.pem | 37 + tdeio/kssl/kssl/netlock3.pem | 31 + tdeio/kssl/kssl/netlock4.pem | 39 + tdeio/kssl/kssl/oces.pem | 30 + tdeio/kssl/kssl/quovadis.pem | 34 + tdeio/kssl/kssl/qvrca2.pem | 33 + tdeio/kssl/kssl/qvrca3.pem | 38 + tdeio/kssl/kssl/sf-class2-root.pem | 24 + tdeio/kssl/kssl/sonera1.pem | 19 + tdeio/kssl/kssl/sonera2.pem | 19 + tdeio/kssl/kssl/staatdernederlandenrotca.pem | 22 + tdeio/kssl/kssl/startcom.pem | 30 + tdeio/kssl/kssl/startssl.pem | 44 + tdeio/kssl/kssl/tcclass2-2011.pem | 20 + tdeio/kssl/kssl/tcclass3-2011.pem | 20 + tdeio/kssl/kssl/utn-network.pem | 26 + tdeio/kssl/kssl/utn-sgc.pem | 26 + tdeio/kssl/kssl/xgca.pem | 25 + tdeio/kssl/ksslall.h | 41 + tdeio/kssl/ksslcallback.c | 89 + tdeio/kssl/ksslcertchain.cc | 216 + tdeio/kssl/ksslcertchain.h | 136 + tdeio/kssl/ksslcertdlg.cc | 174 + tdeio/kssl/ksslcertdlg.h | 138 + tdeio/kssl/ksslcertificate.cc | 1157 ++++ tdeio/kssl/ksslcertificate.h | 376 ++ tdeio/kssl/ksslcertificatecache.cc | 399 ++ tdeio/kssl/ksslcertificatecache.h | 107 + tdeio/kssl/ksslcertificatefactory.cc | 122 + tdeio/kssl/ksslcertificatefactory.h | 50 + tdeio/kssl/ksslcertificatehome.cc | 246 + tdeio/kssl/ksslcertificatehome.h | 90 + tdeio/kssl/ksslconfig.h.cmake | 26 + tdeio/kssl/ksslconfig.h.in | 26 + tdeio/kssl/ksslconfig_win.h | 26 + tdeio/kssl/ksslconnectioninfo.cc | 66 + tdeio/kssl/ksslconnectioninfo.h | 95 + tdeio/kssl/ksslcsessioncache.cc | 120 + tdeio/kssl/ksslcsessioncache.h | 47 + tdeio/kssl/kssldefs.h | 37 + tdeio/kssl/ksslinfodlg.cc | 463 ++ tdeio/kssl/ksslinfodlg.h | 173 + tdeio/kssl/ksslkeygen.cc | 223 + tdeio/kssl/ksslkeygen.h | 95 + tdeio/kssl/ksslpeerinfo.cc | 171 + tdeio/kssl/ksslpeerinfo.h | 108 + tdeio/kssl/ksslpemcallback.cc | 61 + tdeio/kssl/ksslpemcallback.h | 29 + tdeio/kssl/ksslpkcs12.cc | 295 + tdeio/kssl/ksslpkcs12.h | 194 + tdeio/kssl/ksslpkcs7.cc | 208 + tdeio/kssl/ksslpkcs7.h | 156 + tdeio/kssl/ksslsession.cc | 82 + tdeio/kssl/ksslsession.h | 73 + tdeio/kssl/ksslsettings.cc | 356 ++ tdeio/kssl/ksslsettings.h | 224 + tdeio/kssl/ksslsigners.cc | 251 + tdeio/kssl/ksslsigners.h | 172 + tdeio/kssl/ksslutils.cc | 94 + tdeio/kssl/ksslutils.h | 77 + tdeio/kssl/ksslx509map.cc | 103 + tdeio/kssl/ksslx509map.h | 86 + tdeio/kssl/ksslx509v3.cc | 143 + tdeio/kssl/ksslx509v3.h | 122 + tdeio/kurifilterplugin.desktop | 84 + tdeio/magic | 1065 ++++ tdeio/misc/CMakeLists.txt | 100 + tdeio/misc/Makefile.am | 60 + tdeio/misc/fileshareset | 430 ++ tdeio/misc/kpac/CMakeLists.txt | 66 + tdeio/misc/kpac/Makefile.am | 30 + tdeio/misc/kpac/README | 9 + tdeio/misc/kpac/README.wpad | 73 + tdeio/misc/kpac/TODO | 1 + tdeio/misc/kpac/configure.in.in | 26 + tdeio/misc/kpac/dhcp.h | 78 + tdeio/misc/kpac/discovery.cpp | 147 + tdeio/misc/kpac/discovery.h | 55 + tdeio/misc/kpac/downloader.cpp | 89 + tdeio/misc/kpac/downloader.h | 64 + tdeio/misc/kpac/eventsrc | 530 ++ tdeio/misc/kpac/kpac_dhcp_helper.c | 229 + tdeio/misc/kpac/kpactest.pac | 169 + tdeio/misc/kpac/proxyscout.cpp | 196 + tdeio/misc/kpac/proxyscout.desktop | 131 + tdeio/misc/kpac/proxyscout.h | 82 + tdeio/misc/kpac/script.cpp | 465 ++ tdeio/misc/kpac/script.h | 56 + tdeio/misc/kssld/CMakeLists.txt | 47 + tdeio/misc/kssld/Makefile.am | 33 + tdeio/misc/kssld/kssld.cpp | 1027 ++++ tdeio/misc/kssld/kssld.desktop | 156 + tdeio/misc/kssld/kssld.h | 154 + tdeio/misc/mms.protocol | 73 + tdeio/misc/mmst.protocol | 15 + tdeio/misc/mmsu.protocol | 15 + tdeio/misc/pnm.protocol | 15 + tdeio/misc/rlogin.protocol | 13 + tdeio/misc/rtsp.protocol | 15 + tdeio/misc/rtspt.protocol | 15 + tdeio/misc/rtspu.protocol | 15 + tdeio/misc/ssh.protocol | 13 + tdeio/misc/tdefile/CMakeLists.txt | 39 + tdeio/misc/tdefile/Makefile.am | 10 + tdeio/misc/tdefile/README | 4 + tdeio/misc/tdefile/fileprops.cpp | 480 ++ tdeio/misc/tdefile/fileprops.h | 74 + tdeio/misc/tdeio_uiserver.desktop | 100 + tdeio/misc/tdemailservice.cpp | 45 + tdeio/misc/tdemailservice.protocol | 15 + tdeio/misc/tdentlm/CMakeLists.txt | 43 + tdeio/misc/tdentlm/Makefile.am | 12 + tdeio/misc/tdentlm/des.cpp | 513 ++ tdeio/misc/tdentlm/des.h | 19 + tdeio/misc/tdentlm/kswap.h | 428 ++ tdeio/misc/tdentlm/tdentlm.cpp | 389 ++ tdeio/misc/tdentlm/tdentlm.h | 233 + tdeio/misc/tdesasl/CMakeLists.txt | 42 + tdeio/misc/tdesasl/Makefile.am | 12 + tdeio/misc/tdesasl/tdesasl.cpp | 285 + tdeio/misc/tdesasl/tdesasl.h | 169 + tdeio/misc/tdesendbugmail/CMakeLists.txt | 37 + tdeio/misc/tdesendbugmail/Makefile.am | 26 + tdeio/misc/tdesendbugmail/main.cpp | 142 + tdeio/misc/tdesendbugmail/main.h | 20 + tdeio/misc/tdesendbugmail/smtp.cpp | 336 ++ tdeio/misc/tdesendbugmail/smtp.h | 144 + tdeio/misc/tdetelnetservice.cpp | 112 + tdeio/misc/tdewalletd/CMakeLists.txt | 49 + tdeio/misc/tdewalletd/Makefile.am | 35 + tdeio/misc/tdewalletd/kbetterthankdialogbase.ui | 154 + tdeio/misc/tdewalletd/kbetterthankdialogbase.ui.h | 50 + tdeio/misc/tdewalletd/ktimeout.cpp | 84 + tdeio/misc/tdewalletd/ktimeout.h | 52 + tdeio/misc/tdewalletd/tdewalletd.cpp | 1514 +++++ tdeio/misc/tdewalletd/tdewalletd.desktop | 151 + tdeio/misc/tdewalletd/tdewalletd.h | 199 + tdeio/misc/tdewalletd/tdewalletwizard.ui | 545 ++ tdeio/misc/tdewalletd/tdewalletwizard.ui.h | 74 + tdeio/misc/telnet.protocol | 13 + tdeio/misc/uiserver.cpp | 1413 +++++ tdeio/misc/uiserver.h | 430 ++ tdeio/pics/CMakeLists.txt | 14 + tdeio/pics/Makefile.am | 3 + tdeio/pics/cr16-app-tdeio_uiserver.png | Bin 0 -> 838 bytes tdeio/proxytype.pl | 11 + tdeio/renamedlgplugin.desktop | 84 + tdeio/tdecmodule.desktop | 109 + tdeio/tdefile/CMakeLists.txt | 76 + tdeio/tdefile/ChangeLog | 725 +++ tdeio/tdefile/Makefile.am | 78 + tdeio/tdefile/NOTES | 100 + tdeio/tdefile/TODO | 17 + tdeio/tdefile/config-tdefile.h | 32 + tdeio/tdefile/images.h | 277 + tdeio/tdefile/kacleditwidget.cpp | 1054 ++++ tdeio/tdefile/kacleditwidget.h | 65 + tdeio/tdefile/kacleditwidget_p.h | 206 + tdeio/tdefile/kcombiview.cpp | 371 ++ tdeio/tdefile/kcombiview.h | 133 + tdeio/tdefile/kcustommenueditor.cpp | 242 + tdeio/tdefile/kcustommenueditor.h | 67 + tdeio/tdefile/kdiroperator.cpp | 1740 ++++++ tdeio/tdefile/kdiroperator.h | 950 +++ tdeio/tdefile/kdirselectdialog.cpp | 481 ++ tdeio/tdefile/kdirselectdialog.h | 131 + tdeio/tdefile/kdirsize.cpp | 166 + tdeio/tdefile/kdirsize.h | 106 + tdeio/tdefile/kdiskfreesp.cpp | 169 + tdeio/tdefile/kdiskfreesp.h | 89 + tdeio/tdefile/kencodingfiledialog.cpp | 223 + tdeio/tdefile/kencodingfiledialog.h | 313 + tdeio/tdefile/kicondialog.cpp | 772 +++ tdeio/tdefile/kicondialog.h | 350 ++ tdeio/tdefile/kimagefilepreview.cpp | 187 + tdeio/tdefile/kimagefilepreview.h | 77 + tdeio/tdefile/kmetaprops.cpp | 268 + tdeio/tdefile/kmetaprops.h | 69 + tdeio/tdefile/knotifydialog.cpp | 1191 ++++ tdeio/tdefile/knotifydialog.h | 341 ++ tdeio/tdefile/knotifywidgetbase.ui | 469 ++ tdeio/tdefile/kopenwith.cpp | 851 +++ tdeio/tdefile/kopenwith.h | 209 + tdeio/tdefile/kopenwith_p.h | 101 + tdeio/tdefile/kpreviewprops.cpp | 89 + tdeio/tdefile/kpreviewprops.h | 57 + tdeio/tdefile/kpreviewwidgetbase.cpp | 49 + tdeio/tdefile/kpreviewwidgetbase.h | 92 + tdeio/tdefile/kpropertiesdesktopadvbase.ui | 280 + tdeio/tdefile/kpropertiesdesktopbase.ui | 316 + tdeio/tdefile/kpropertiesdialog.cpp | 4170 +++++++++++++ tdeio/tdefile/kpropertiesdialog.h | 918 +++ tdeio/tdefile/kpropertiesmimetypebase.ui | 70 + tdeio/tdefile/kpropsdlg.h | 4 + tdeio/tdefile/kpropsdlgplugin.desktop | 87 + tdeio/tdefile/krecentdirs.cpp | 99 + tdeio/tdefile/krecentdirs.h | 70 + tdeio/tdefile/krecentdocument.cpp | 177 + tdeio/tdefile/krecentdocument.h | 105 + tdeio/tdefile/kurlbar.cpp | 1049 ++++ tdeio/tdefile/kurlbar.h | 660 +++ tdeio/tdefile/kurlcombobox.cpp | 363 ++ tdeio/tdefile/kurlcombobox.h | 229 + tdeio/tdefile/kurlrequester.cpp | 430 ++ tdeio/tdefile/kurlrequester.h | 301 + tdeio/tdefile/kurlrequesterdlg.cpp | 135 + tdeio/tdefile/kurlrequesterdlg.h | 114 + tdeio/tdefile/tdefile.h | 129 + tdeio/tdefile/tdefilebookmarkhandler.cpp | 81 + tdeio/tdefile/tdefilebookmarkhandler.h | 63 + tdeio/tdefile/tdefiledetailview.cpp | 686 +++ tdeio/tdefile/tdefiledetailview.h | 219 + tdeio/tdefile/tdefiledialog.cpp | 2380 ++++++++ tdeio/tdefile/tdefiledialog.h | 989 ++++ tdeio/tdefile/tdefilefiltercombo.cpp | 203 + tdeio/tdefile/tdefilefiltercombo.h | 104 + tdeio/tdefile/tdefileiconview.cpp | 943 +++ tdeio/tdefile/tdefileiconview.h | 267 + tdeio/tdefile/tdefilemetainfowidget.cpp | 375 ++ tdeio/tdefile/tdefilemetainfowidget.h | 95 + tdeio/tdefile/tdefilemetapreview.cpp | 196 + tdeio/tdefile/tdefilemetapreview.h | 56 + tdeio/tdefile/tdefilepreview.cpp | 279 + tdeio/tdefile/tdefilepreview.h | 122 + tdeio/tdefile/tdefilesharedlg.cpp | 325 ++ tdeio/tdefile/tdefilesharedlg.h | 70 + tdeio/tdefile/tdefilespeedbar.cpp | 147 + tdeio/tdefile/tdefilespeedbar.h | 41 + tdeio/tdefile/tdefiletreebranch.cpp | 528 ++ tdeio/tdefile/tdefiletreebranch.h | 242 + tdeio/tdefile/tdefiletreeview.cpp | 677 +++ tdeio/tdefile/tdefiletreeview.h | 273 + tdeio/tdefile/tdefiletreeviewitem.cpp | 83 + tdeio/tdefile/tdefiletreeviewitem.h | 106 + tdeio/tdefile/tdefileview.cpp | 429 ++ tdeio/tdefile/tdefileview.h | 444 ++ tdeio/tdefile/tests/Makefile.am | 41 + tdeio/tdefile/tests/kcustommenueditortest.cpp | 19 + tdeio/tdefile/tests/kdirselectdialogtest.cpp | 17 + tdeio/tdefile/tests/kfdtest.cpp | 34 + tdeio/tdefile/tests/kfdtest.h | 28 + tdeio/tdefile/tests/kfstest.cpp | 183 + tdeio/tdefile/tests/kicondialogtest.cpp | 19 + tdeio/tdefile/tests/knotifytest.cpp | 10 + tdeio/tdefile/tests/kopenwithtest.cpp | 67 + tdeio/tdefile/tests/kurlrequestertest.cpp | 16 + tdeio/tdefile/tests/tdefiletreeviewtest.cpp | 165 + tdeio/tdefile/tests/tdefiletreeviewtest.h | 42 + tdeio/tdefileplugin.desktop | 88 + tdeio/tdeio/CMakeLists.txt | 138 + tdeio/tdeio/KFILEMETAINFO_ISSUES | 4 + tdeio/tdeio/Makefile.am | 129 + tdeio/tdeio/authinfo.cpp | 332 ++ tdeio/tdeio/authinfo.h | 320 + tdeio/tdeio/chmodjob.cpp | 258 + tdeio/tdeio/chmodjob.h | 109 + tdeio/tdeio/configure.in.in | 167 + tdeio/tdeio/connection.cpp | 273 + tdeio/tdeio/connection.h | 158 + tdeio/tdeio/dataprotocol.cpp | 339 ++ tdeio/tdeio/dataprotocol.h | 71 + tdeio/tdeio/dataslave.cpp | 213 + tdeio/tdeio/dataslave.h | 126 + tdeio/tdeio/davjob.cpp | 142 + tdeio/tdeio/davjob.h | 127 + tdeio/tdeio/defaultprogress.cpp | 507 ++ tdeio/tdeio/defaultprogress.h | 164 + tdeio/tdeio/forwardingslavebase.cpp | 475 ++ tdeio/tdeio/forwardingslavebase.h | 204 + tdeio/tdeio/global.cpp | 2009 +++++++ tdeio/tdeio/global.h | 547 ++ tdeio/tdeio/http_slave_defaults.h | 49 + tdeio/tdeio/ioslave_defaults.h | 53 + tdeio/tdeio/job.cpp | 4814 +++++++++++++++ tdeio/tdeio/job.h | 532 ++ tdeio/tdeio/jobclasses.h | 1909 ++++++ tdeio/tdeio/kacl.cpp | 682 +++ tdeio/tdeio/kacl.h | 207 + tdeio/tdeio/kar.cpp | 170 + tdeio/tdeio/kar.h | 103 + tdeio/tdeio/karchive.cpp | 717 +++ tdeio/tdeio/karchive.h | 639 ++ tdeio/tdeio/kautomount.cpp | 117 + tdeio/tdeio/kautomount.h | 122 + tdeio/tdeio/kdatatool.cpp | 285 + tdeio/tdeio/kdatatool.h | 303 + tdeio/tdeio/kdcopservicestarter.cpp | 97 + tdeio/tdeio/kdcopservicestarter.h | 103 + tdeio/tdeio/kdirlister.cpp | 2538 ++++++++ tdeio/tdeio/kdirlister.h | 634 ++ tdeio/tdeio/kdirlister_p.h | 358 ++ tdeio/tdeio/kdirnotify.cpp | 40 + tdeio/tdeio/kdirnotify.h | 84 + tdeio/tdeio/kdirnotify_stub.cpp | 101 + tdeio/tdeio/kdirnotify_stub.h | 32 + tdeio/tdeio/kdirwatch.cpp | 1774 ++++++ tdeio/tdeio/kdirwatch.h | 290 + tdeio/tdeio/kdirwatch_p.h | 158 + tdeio/tdeio/kemailsettings.cpp | 272 + tdeio/tdeio/kemailsettings.h | 147 + tdeio/tdeio/kfilterbase.cpp | 76 + tdeio/tdeio/kfilterbase.h | 116 + tdeio/tdeio/kfilterdev.cpp | 484 ++ tdeio/tdeio/kfilterdev.h | 204 + tdeio/tdeio/kimageio.cpp | 566 ++ tdeio/tdeio/kimageio.h | 170 + tdeio/tdeio/kimageiofactory.h | 142 + tdeio/tdeio/klimitediodevice.h | 105 + tdeio/tdeio/kmdbase.h | 6 + tdeio/tdeio/kmessageboxwrapper.h | 56 + tdeio/tdeio/kmimemagic.cpp | 2317 ++++++++ tdeio/tdeio/kmimemagic.h | 218 + tdeio/tdeio/kmimetype.cpp | 1172 ++++ tdeio/tdeio/kmimetype.h | 641 ++ tdeio/tdeio/kmimetypechooser.cpp | 298 + tdeio/tdeio/kmimetypechooser.h | 180 + tdeio/tdeio/kmimetyperesolver.h | 255 + tdeio/tdeio/knfsshare.cpp | 219 + tdeio/tdeio/knfsshare.h | 86 + tdeio/tdeio/kprotocolinfo.cpp | 257 + tdeio/tdeio/kprotocolinfo.h | 688 +++ tdeio/tdeio/kprotocolmanager.cpp | 534 ++ tdeio/tdeio/kprotocolmanager.h | 389 ++ tdeio/tdeio/kremoteencoding.cpp | 95 + tdeio/tdeio/kremoteencoding.h | 127 + tdeio/tdeio/krun.cpp | 1574 +++++ tdeio/tdeio/krun.h | 512 ++ tdeio/tdeio/ksambashare.cpp | 239 + tdeio/tdeio/ksambashare.h | 85 + tdeio/tdeio/kscan.cpp | 185 + tdeio/tdeio/kscan.h | 370 ++ tdeio/tdeio/kservice.cpp | 934 +++ tdeio/tdeio/kservice.h | 562 ++ tdeio/tdeio/kservice_p.h | 41 + tdeio/tdeio/kservicefactory.cpp | 291 + tdeio/tdeio/kservicefactory.h | 113 + tdeio/tdeio/kservicegroup.cpp | 724 +++ tdeio/tdeio/kservicegroup.h | 353 ++ tdeio/tdeio/kservicegroupfactory.cpp | 148 + tdeio/tdeio/kservicegroupfactory.h | 80 + tdeio/tdeio/kservicetype.cpp | 366 ++ tdeio/tdeio/kservicetype.h | 251 + tdeio/tdeio/kservicetypefactory.cpp | 300 + tdeio/tdeio/kservicetypefactory.h | 123 + tdeio/tdeio/kshellcompletion.cpp | 311 + tdeio/tdeio/kshellcompletion.h | 85 + tdeio/tdeio/kshred.cpp | 276 + tdeio/tdeio/kshred.h | 156 + tdeio/tdeio/ktar.cpp | 980 ++++ tdeio/tdeio/ktar.h | 171 + tdeio/tdeio/ktrader.cpp | 186 + tdeio/tdeio/ktrader.h | 295 + tdeio/tdeio/ktraderparse.cpp | 159 + tdeio/tdeio/ktraderparse.h | 52 + tdeio/tdeio/ktraderparsetree.cpp | 714 +++ tdeio/tdeio/ktraderparsetree.h | 371 ++ tdeio/tdeio/kurifilter.cpp | 451 ++ tdeio/tdeio/kurifilter.h | 667 +++ tdeio/tdeio/kurlcompletion.cpp | 1604 +++++ tdeio/tdeio/kurlcompletion.h | 236 + tdeio/tdeio/kurlpixmapprovider.cpp | 33 + tdeio/tdeio/kurlpixmapprovider.h | 59 + tdeio/tdeio/kuserprofile.cpp | 355 ++ tdeio/tdeio/kuserprofile.h | 282 + tdeio/tdeio/kzip.cpp | 1460 +++++ tdeio/tdeio/kzip.h | 284 + tdeio/tdeio/lex.c | 1759 ++++++ tdeio/tdeio/lex.l | 126 + tdeio/tdeio/metainfojob.cpp | 184 + tdeio/tdeio/metainfojob.h | 119 + tdeio/tdeio/netaccess.cpp | 536 ++ tdeio/tdeio/netaccess.h | 540 ++ tdeio/tdeio/observer.cpp | 417 ++ tdeio/tdeio/observer.h | 213 + tdeio/tdeio/passdlg.cpp | 367 ++ tdeio/tdeio/passdlg.h | 175 + tdeio/tdeio/paste.cpp | 308 + tdeio/tdeio/paste.h | 125 + tdeio/tdeio/pastedialog.cpp | 84 + tdeio/tdeio/pastedialog.h | 64 + tdeio/tdeio/posixacladdons.cpp | 236 + tdeio/tdeio/posixacladdons.h | 47 + tdeio/tdeio/previewjob.cpp | 597 ++ tdeio/tdeio/previewjob.h | 182 + tdeio/tdeio/progressbase.cpp | 180 + tdeio/tdeio/progressbase.h | 271 + tdeio/tdeio/renamedlg.cpp | 574 ++ tdeio/tdeio/renamedlg.h | 153 + tdeio/tdeio/renamedlgplugin.h | 59 + tdeio/tdeio/scheduler.cpp | 922 +++ tdeio/tdeio/scheduler.h | 364 ++ tdeio/tdeio/sessiondata.cpp | 311 + tdeio/tdeio/sessiondata.h | 67 + tdeio/tdeio/skipdlg.cpp | 143 + tdeio/tdeio/skipdlg.h | 61 + tdeio/tdeio/slave.cpp | 519 ++ tdeio/tdeio/slave.h | 270 + tdeio/tdeio/slavebase.cpp | 1315 +++++ tdeio/tdeio/slavebase.h | 847 +++ tdeio/tdeio/slaveconfig.cpp | 225 + tdeio/tdeio/slaveconfig.h | 106 + tdeio/tdeio/slaveinterface.cpp | 550 ++ tdeio/tdeio/slaveinterface.h | 290 + tdeio/tdeio/statusbarprogress.cpp | 166 + tdeio/tdeio/statusbarprogress.h | 112 + tdeio/tdeio/tcpslavebase.cpp | 1343 +++++ tdeio/tdeio/tcpslavebase.h | 389 ++ tdeio/tdeio/tdefilefilter.cpp | 134 + tdeio/tdeio/tdefilefilter.h | 170 + tdeio/tdeio/tdefileitem.cpp | 1202 ++++ tdeio/tdeio/tdefileitem.h | 671 +++ tdeio/tdeio/tdefilemetainfo.cpp | 1859 ++++++ tdeio/tdeio/tdefilemetainfo.h | 1738 ++++++ tdeio/tdeio/tdefileshare.cpp | 346 ++ tdeio/tdeio/tdefileshare.h | 165 + tdeio/tdeio/tdelficon.cpp | 89 + tdeio/tdeio/tdelficon.h | 54 + tdeio/tdeio/thumbcreator.h | 124 + tdeio/tdeio/yacc.c | 1522 +++++ tdeio/tdeio/yacc.h | 93 + tdeio/tdeio/yacc.y | 126 + tdeio/tdeioexec/CMakeLists.txt | 42 + tdeio/tdeioexec/Makefile.am | 19 + tdeio/tdeioexec/README | 26 + tdeio/tdeioexec/main.cpp | 294 + tdeio/tdeioexec/main.h | 35 + tdeio/tdeioslave.upd | 18 + tdeio/tests/CMakeLists.txt | 36 + tdeio/tests/Makefile.am | 91 + tdeio/tests/dataprotocoltest.cpp | 287 + tdeio/tests/dummymeta.cpp | 20 + tdeio/tests/dummymeta.desktop | 54 + tdeio/tests/dummymeta.h | 20 + tdeio/tests/getalltest.cpp | 44 + tdeio/tests/jobtest.cpp | 613 ++ tdeio/tests/jobtest.h | 79 + tdeio/tests/kacltest.cpp | 309 + tdeio/tests/kacltest.h | 53 + tdeio/tests/kdcopcheck.cpp | 132 + tdeio/tests/kdcopcheck.h | 28 + tdeio/tests/kdefaultprogresstest.cpp | 39 + tdeio/tests/kdirlistertest.cpp | 162 + tdeio/tests/kdirlistertest.h | 120 + tdeio/tests/kdirwatchtest.cpp | 82 + tdeio/tests/kdirwatchtest.h | 33 + tdeio/tests/kdirwatchunittest.cpp | 180 + tdeio/tests/kdirwatchunittest.h | 66 + tdeio/tests/kfiltertest.cpp | 118 + tdeio/tests/kionetrctest.cpp | 71 + tdeio/tests/kiopassdlgtest.cpp | 32 + tdeio/tests/kmfitest.cpp | 28 + tdeio/tests/kmimefromext.cpp | 53 + tdeio/tests/kmimemagictest.cpp | 54 + tdeio/tests/kmimetypetest.cpp | 76 + tdeio/tests/kpropsdlgtest.cpp | 35 + tdeio/tests/kprotocolinfotest.cpp | 59 + tdeio/tests/kruntest.cpp | 209 + tdeio/tests/kruntest.h | 58 + tdeio/tests/kscantest.cpp | 16 + tdeio/tests/kshredtest.cpp | 74 + tdeio/tests/ktartest.cpp | 178 + tdeio/tests/kurifiltertest.cpp | 361 ++ tdeio/tests/kurlcompletiontest.cpp | 189 + tdeio/tests/kziptest.cpp | 435 ++ tdeio/tests/metatest.cpp | 321 + tdeio/tests/netaccesstest.cpp | 48 + tdeio/tests/previewtest.cpp | 64 + tdeio/tests/previewtest.h | 25 + tdeio/tests/speed.cpp | 139 + tdeio/tests/speed.h | 24 + tdeio/tests/tdeioslavetest.cpp | 555 ++ tdeio/tests/tdeioslavetest.h | 108 + tdeio/tests/tdesycocatest.cpp | 360 ++ tdeio/tests/tdesycocaupdatetest.cpp | 11 + tdeio/tests/tdetradertest.cpp | 108 + tdeio/tests/wronglocalsizes.zip | Bin 0 -> 325 bytes tdeio/useragent.pl | 13 + tdeioslave/CMakeLists.txt | 18 + tdeioslave/Mainpage.dox | 9 + tdeioslave/Makefile.am | 27 + tdeioslave/bzip2/CMakeLists.txt | 42 + tdeioslave/bzip2/Makefile.am | 11 + tdeioslave/bzip2/configure.in.in | 11 + tdeioslave/bzip2/kbzip2filter.cpp | 187 + tdeioslave/bzip2/kbzip2filter.desktop | 86 + tdeioslave/bzip2/kbzip2filter.h | 54 + tdeioslave/file/CMakeLists.txt | 55 + tdeioslave/file/Makefile.am | 22 + tdeioslave/file/file.cc | 1831 ++++++ tdeioslave/file/file.h | 98 + tdeioslave/file/file.protocol | 15 + tdeioslave/ftp/CMakeLists.txt | 44 + tdeioslave/ftp/Makefile.am | 16 + tdeioslave/ftp/configure.in.in | 5 + tdeioslave/ftp/ftp.cc | 2675 +++++++++ tdeioslave/ftp/ftp.h | 603 ++ tdeioslave/ftp/ftp.protocol | 18 + tdeioslave/gzip/CMakeLists.txt | 41 + tdeioslave/gzip/Makefile.am | 12 + tdeioslave/gzip/kgzipfilter.cpp | 336 ++ tdeioslave/gzip/kgzipfilter.desktop | 86 + tdeioslave/gzip/kgzipfilter.h | 52 + tdeioslave/http/CMakeLists.txt | 69 + tdeioslave/http/Makefile.am | 31 + tdeioslave/http/README.http_cache_cleaner | 20 + tdeioslave/http/README.webdav | 184 + tdeioslave/http/THOUGHTS | 28 + tdeioslave/http/TODO | 45 + tdeioslave/http/configure.in.bot | 10 + tdeioslave/http/configure.in.in | 110 + tdeioslave/http/http.cc | 6108 ++++++++++++++++++++ tdeioslave/http/http.h | 577 ++ tdeioslave/http/http.protocol | 12 + tdeioslave/http/http_cache_cleaner.cpp | 284 + tdeioslave/http/http_cache_cleaner.desktop | 168 + tdeioslave/http/https.protocol | 12 + tdeioslave/http/kcookiejar/CMakeLists.txt | 63 + tdeioslave/http/kcookiejar/Makefile.am | 31 + tdeioslave/http/kcookiejar/domain_info | 1 + tdeioslave/http/kcookiejar/kcookiejar.cpp | 1559 +++++ tdeioslave/http/kcookiejar/kcookiejar.desktop | 157 + tdeioslave/http/kcookiejar/kcookiejar.h | 365 ++ tdeioslave/http/kcookiejar/kcookiescfg.upd | 16 + tdeioslave/http/kcookiejar/kcookieserver.cpp | 606 ++ tdeioslave/http/kcookiejar/kcookieserver.h | 98 + tdeioslave/http/kcookiejar/kcookiewin.cpp | 382 ++ tdeioslave/http/kcookiejar/kcookiewin.h | 84 + tdeioslave/http/kcookiejar/main.cpp | 92 + .../http/kcookiejar/netscape_cookie_spec.html | 331 ++ tdeioslave/http/kcookiejar/rfc2109 | 1179 ++++ tdeioslave/http/kcookiejar/rfc2965 | 1459 +++++ tdeioslave/http/kcookiejar/tests/Makefile.am | 18 + tdeioslave/http/kcookiejar/tests/cookie.test | 162 + tdeioslave/http/kcookiejar/tests/cookie_rfc.test | 148 + .../http/kcookiejar/tests/cookie_saving.test | 430 ++ .../http/kcookiejar/tests/cookie_settings.test | 116 + .../http/kcookiejar/tests/kcookiejartest.cpp | 270 + tdeioslave/http/rfc2518.txt | 1 + tdeioslave/http/rfc2616.txt | 1 + tdeioslave/http/rfc2617.txt | 1 + tdeioslave/http/rfc2817.txt | 1 + tdeioslave/http/rfc2818.txt | 1 + tdeioslave/http/rfc3229.txt | 1 + tdeioslave/http/rfc3253.txt | 1 + tdeioslave/http/shoutcast-icecast.txt | 605 ++ tdeioslave/http/webdav.protocol | 18 + tdeioslave/http/webdavs.protocol | 18 + tdeioslave/iso/CMakeLists.txt | 51 + tdeioslave/iso/Makefile.am | 67 + tdeioslave/iso/iso.cpp | 525 ++ tdeioslave/iso/iso.h | 51 + tdeioslave/iso/iso.protocol | 11 + tdeioslave/iso/isoservice.desktop | 14 + tdeioslave/iso/kio_iso.desktop | 13 + tdeioslave/iso/kio_isorc | 2 + tdeioslave/iso/kiso.cpp | 460 ++ tdeioslave/iso/kiso.h | 112 + tdeioslave/iso/kisodirectory.cpp | 31 + tdeioslave/iso/kisodirectory.h | 40 + tdeioslave/iso/kisofile.cpp | 53 + tdeioslave/iso/kisofile.h | 49 + tdeioslave/iso/libisofs/CMakeLists.txt | 23 + tdeioslave/iso/libisofs/COPYING | 280 + tdeioslave/iso/libisofs/ChangeLog | 6 + tdeioslave/iso/libisofs/Makefile.am | 18 + tdeioslave/iso/libisofs/README | 24 + tdeioslave/iso/libisofs/bswap.h | 94 + tdeioslave/iso/libisofs/el_torito.h | 63 + tdeioslave/iso/libisofs/iso_fs.h | 219 + tdeioslave/iso/libisofs/isofs.c | 876 +++ tdeioslave/iso/libisofs/isofs.h | 161 + tdeioslave/iso/libisofs/rock.h | 127 + tdeioslave/iso/qfilehack.cpp | 40 + tdeioslave/iso/qfilehack.h | 38 + tdeioslave/metainfo/CMakeLists.txt | 43 + tdeioslave/metainfo/Makefile.am | 24 + tdeioslave/metainfo/metainfo.cpp | 103 + tdeioslave/metainfo/metainfo.h | 38 + tdeioslave/metainfo/metainfo.protocol | 9 + tdemdi/tdemdi/dockcontainer.cpp | 2 +- tdemdi/tdemdi/guiclient.cpp | 2 +- tdemdi/tdemdichildarea.cpp | 2 +- tdemdi/tdemdidockcontainer.cpp | 2 +- tdemdi/tdemdiguiclient.cpp | 2 +- tdeparts/CMakeLists.txt | 8 +- tdeparts/COMMENTS | 2 +- tdeparts/Makefile.am | 4 +- tdeparts/browserrun.cpp | 6 +- tdeparts/part.cpp | 4 +- tdeparts/part.h | 2 +- tdeparts/plugin.cpp | 2 +- tdeparts/tests/Makefile.am | 2 +- tdeparts/tests/ghostview.cpp | 2 +- tdeprint/CMakeLists.txt | 12 +- tdeprint/Makefile.am | 6 +- tdeprint/cups/CMakeLists.txt | 6 +- tdeprint/cups/Makefile.am | 2 +- tdeprint/cups/cupsaddsmb2.cpp | 2 +- tdeprint/cups/cupsdconf2/CMakeLists.txt | 8 +- tdeprint/cups/cupsdconf2/Makefile.am | 2 +- tdeprint/cups/cupsdconf2/cupsdconf.cpp | 2 +- tdeprint/cups/cupsdconf2/cupsddialog.cpp | 2 +- tdeprint/cups/cupsdconf2/cupsdlogpage.cpp | 2 +- tdeprint/cups/cupsdconf2/qdirlineedit.cpp | 2 +- tdeprint/cups/cupsdconf2/qdirmultilineedit.cpp | 2 +- tdeprint/cups/cupsinfos.cpp | 6 +- tdeprint/cups/kmconfigcups.cpp | 2 +- tdeprint/cups/kmconfigcupsdir.cpp | 2 +- tdeprint/cups/kmcupsconfigwidget.cpp | 2 +- tdeprint/cups/kmcupsmanager.cpp | 2 +- tdeprint/ext/kextprinterimpl.cpp | 2 +- tdeprint/kfilelist.cpp | 326 -- tdeprint/kfilelist.h | 62 - tdeprint/kmfactory.cpp | 4 +- tdeprint/kmjobmanager.cpp | 2 +- tdeprint/kmmanager.cpp | 2 +- tdeprint/kmprinter.cpp | 2 +- tdeprint/kpfileselectpage.cpp | 2 +- tdeprint/kprintdialog.cpp | 6 +- tdeprint/kprinter.cpp | 2 +- tdeprint/kprinterimpl.cpp | 2 +- tdeprint/kprintpreview.cpp | 2 +- tdeprint/lpd/kmlpdmanager.cpp | 2 +- tdeprint/lpr/kmconfiglpr.cpp | 2 +- tdeprint/lpr/lprsettings.cpp | 2 +- tdeprint/management/CMakeLists.txt | 6 +- tdeprint/management/Makefile.am | 2 +- tdeprint/management/kmconfigdialog.cpp | 2 +- tdeprint/management/kmconfigfilter.cpp | 2 +- tdeprint/management/kmconfigfonts.cpp | 4 +- tdeprint/management/kmconfiggeneral.cpp | 2 +- tdeprint/management/kmconfigjobs.cpp | 2 +- tdeprint/management/kmconfigpreview.cpp | 2 +- tdeprint/management/kmdriverdbwidget.cpp | 4 +- tdeprint/management/kmjobviewer.cpp | 4 +- tdeprint/management/kmmainview.cpp | 2 +- tdeprint/management/kmspecialprinterdlg.cpp | 2 +- tdeprint/management/kmtimer.cpp | 2 +- tdeprint/management/kmwdrivertest.cpp | 2 +- tdeprint/management/kmwfile.cpp | 2 +- tdeprint/management/kxmlcommandselector.cpp | 2 +- tdeprint/printerfilter.cpp | 2 +- tdeprint/rlpr/kmproxywidget.cpp | 2 +- tdeprint/rlpr/krlprprinterimpl.cpp | 2 +- tdeprint/specials.desktop | 2 +- tdeprint/tdefilelist.cpp | 326 ++ tdeprint/tdefilelist.h | 62 + tdeprint/tdeprintcheck.h | 2 +- tdeprint/tdeprintd.cpp | 4 +- tderandr/libtderandr.h | 2 +- tderandr/randr.h | 2 +- tderesources/CMakeLists.txt | 8 +- tderesources/configwidget.h | 2 +- tderesources/factory.h | 4 +- tderesources/managerimpl.cpp | 2 +- tderesources/resource.cpp | 2 +- tderesources/resource.h | 4 +- tderesources/tderesources.desktop | 2 +- tdersync/CMakeLists.txt | 6 +- tdersync/rsyncconfigdialog.cpp | 2 +- tdersync/rsyncconfigdialog.h | 2 +- tdersync/tdersync.cpp | 4 +- tdersync/tdersync.h | 8 +- tdespell2/CMakeLists.txt | 4 +- tdespell2/broker.cpp | 2 +- tdespell2/plugins/ispell/ispell_checker.cpp | 2 +- tdespell2/plugins/ispell/ispell_checker.h | 2 +- tdespell2/settings.cpp | 2 +- tdespell2/ui/dialog.cpp | 2 +- tdespell2/ui/highlighter.cpp | 2 +- tdesu/Makefile.am | 2 +- tdesu/process.cpp | 2 +- tdesu/su.cpp | 2 +- tdeui/CMakeLists.txt | 10 +- tdeui/Makefile.am | 4 +- tdeui/kactionclasses.cpp | 2 +- tdeui/kbugreport.cpp | 10 +- tdeui/kbugreport.h | 2 +- tdeui/kcmenumngr.cpp | 2 +- tdeui/kcolorcombo.cpp | 2 +- tdeui/kcolordialog.cpp | 2 +- tdeui/kcombobox.h | 2 +- tdeui/kcompletionbox.cpp | 2 +- tdeui/kconfigdialog.cpp | 259 - tdeui/kconfigdialog.h | 279 - tdeui/kcursor.cpp | 2 +- tdeui/kdatetbl.cpp | 2 +- tdeui/kdepackages.h | 126 +- tdeui/kdialog.cpp | 2 +- tdeui/kdialogbase.cpp | 2 +- tdeui/kdockwidget.cpp | 2 +- tdeui/kedittoolbar.cpp | 6 +- tdeui/kfontcombo.cpp | 2 +- tdeui/kfontdialog.cpp | 2 +- tdeui/kiconview.cpp | 2 +- tdeui/kkeydialog.cpp | 2 +- tdeui/klineedit.cpp | 2 +- tdeui/klistview.cpp | 2 +- tdeui/kmainwindow.cpp | 2 +- tdeui/kmainwindow.h | 2 +- tdeui/kmenubar.cpp | 2 +- tdeui/kmessagebox.cpp | 2 +- tdeui/kpanelapplet.cpp | 2 +- tdeui/kpanelapplet.h | 2 +- tdeui/kpanelextension.cpp | 2 +- tdeui/kpanelmenu.cpp | 2 +- tdeui/kpassdlg.cpp | 2 +- tdeui/kpassivepopup.cpp | 2 +- tdeui/kpixmapio.cpp | 2 +- tdeui/kpushbutton.cpp | 2 +- tdeui/ksconfig.cpp | 4 +- tdeui/kscrollview.cpp | 2 +- tdeui/kshortcutdialog.cpp | 2 +- tdeui/ksplashscreen.cpp | 2 +- tdeui/kstatusbar.cpp | 2 +- tdeui/kswitchlanguagedialog.cpp | 2 +- tdeui/ksyntaxhighlighter.cpp | 2 +- tdeui/ksystemtray.cpp | 2 +- tdeui/ktabwidget.cpp | 2 +- tdeui/ktimezonewidget.cpp | 2 +- tdeui/ktip.cpp | 2 +- tdeui/ktoolbar.cpp | 2 +- tdeui/tdecmodule.cpp | 4 +- tdeui/tdecmodule.h | 4 +- tdeui/tdeconfigdialog.cpp | 259 + tdeui/tdeconfigdialog.h | 279 + tdeui/tests/itemcontainertest.cpp | 2 +- tdeui/tests/kcolordlgtest.cpp | 2 +- tdeui/tests/kdockwidgetdemo.cpp | 2 +- tdeui/tests/kfontdialogtest.cpp | 2 +- tdeutils/CMakeLists.txt | 2 +- tdeutils/Makefile.am | 2 +- tdeutils/kplugininfo.cpp | 2 +- tdeutils/ksettings/CMakeLists.txt | 2 +- tdeutils/ksettings/componentsdialog.cpp | 2 +- tdeutils/ksettings/dispatcher.cpp | 2 +- tdeutils/tdecmoduleloader.cpp | 4 +- tdeutils/tdecmoduleproxy.cpp | 10 +- tdeutils/tdecmoduleproxyIface.h | 4 +- tdeutils/tdecmoduleproxyIfaceImpl.cpp | 2 +- tdewallet/client/tdewallet.cc | 2 +- win/pro_files/kate/part/part.pro | 2 +- win/pro_files/kded/kded.pro | 10 +- win/pro_files/kded/kded_rel.pro | 2 +- win/pro_files/kdewidgets/kdewidgets.pro | 2 +- .../kio/kfile/tests/kfiletreeviewtest.pro | 29 - win/pro_files/kio/kio.pro | 246 +- .../kio/tdefile/tests/tdefiletreeviewtest.pro | 29 + win/pro_files/kioslave/bzip2/bzip2.pro | 10 - win/pro_files/kioslave/common.pro | 8 - win/pro_files/kioslave/gzip/gzip.pro | 9 - win/pro_files/kioslave/kioslave.pro | 11 - .../tdecore/kconfig_compiler/kconfig_compiler.pro | 18 - .../tdeconfig_compiler/tdeconfig_compiler.pro | 18 + win/pro_files/tdecore/tdecore.pro | 12 +- win/pro_files/tdeioslave/bzip2/bzip2.pro | 10 + win/pro_files/tdeioslave/common.pro | 8 + win/pro_files/tdeioslave/gzip/gzip.pro | 9 + win/pro_files/tdeioslave/tdeioslave.pro | 11 + win/pro_files/tdeparts/tdeparts.pro | 4 +- win/pro_files/tdeui/tdeui.pro | 2 +- win/pro_files/tdeutils/tdeutils.pro | 2 +- win/resources/kbuildsycoca.res | Bin 2332 -> 0 bytes win/resources/tdebuildsycoca.res | Bin 0 -> 2332 bytes win/tools/build_tdelibs_dbg | 4 +- win/tools/build_tdelibs_rel | 4 +- win/tools/kde_env | 2 +- win/win32_utils.h | 2 +- 2039 files changed, 207695 insertions(+), 207695 deletions(-) delete mode 100644 doc/api/kfiledialog.png create mode 100644 doc/api/tdefiledialog.png delete mode 100644 doc/tdelibs/man-kbuildsycoca.8.docbook create mode 100644 doc/tdelibs/man-tdebuildsycoca.8.docbook delete mode 100644 interfaces/tdemediaplayer/kfileaudiopreview/CMakeLists.txt delete mode 100644 interfaces/tdemediaplayer/kfileaudiopreview/Makefile.am delete mode 100644 interfaces/tdemediaplayer/kfileaudiopreview/kfileaudiopreview.cpp delete mode 100644 interfaces/tdemediaplayer/kfileaudiopreview/kfileaudiopreview.h create mode 100644 interfaces/tdemediaplayer/tdefileaudiopreview/CMakeLists.txt create mode 100644 interfaces/tdemediaplayer/tdefileaudiopreview/Makefile.am create mode 100644 interfaces/tdemediaplayer/tdefileaudiopreview/tdefileaudiopreview.cpp create mode 100644 interfaces/tdemediaplayer/tdefileaudiopreview/tdefileaudiopreview.h delete mode 100644 kabc/kab2kabc.cpp delete mode 100644 kabc/kab2kabc.desktop create mode 100644 kabc/tdeab2tdeabc.cpp create mode 100644 kabc/tdeab2tdeabc.desktop delete mode 100644 kcmshell/CMakeLists.txt delete mode 100644 kcmshell/Makefile.am delete mode 100644 kcmshell/main.cpp delete mode 100644 kcmshell/main.h delete mode 100644 kconf_update/CMakeLists.txt delete mode 100644 kconf_update/Mainpage.dox delete mode 100644 kconf_update/Makefile.am delete mode 100644 kconf_update/README.kconf_update delete mode 100644 kconf_update/kconf_update.cpp delete mode 100644 kded/kbuildsycoca.cpp delete mode 100644 kded/kbuildsycoca.h delete mode 100644 kded/kde-menu.cpp delete mode 100644 kded/kmimelist.cpp create mode 100644 kded/tde-menu.cpp create mode 100644 kded/tdebuildsycoca.cpp create mode 100644 kded/tdebuildsycoca.h create mode 100644 kded/tdemimelist.cpp delete mode 100644 kfile-plugins/CMakeLists.txt delete mode 100644 kfile-plugins/elf/CMakeLists.txt delete mode 100644 kfile-plugins/elf/kfile_elf.cpp delete mode 100644 kfile-plugins/elf/kfile_elf.desktop delete mode 100644 kfile-plugins/elf/kfile_elf.h delete mode 100644 kinit/kdostartupconfig.cpp delete mode 100644 kinit/kioslave.cpp delete mode 100644 kinit/klauncher.cpp delete mode 100644 kinit/klauncher.h delete mode 100644 kinit/klauncher_cmds.h delete mode 100644 kinit/klauncher_main.cpp delete mode 100644 kinit/kstartupconfig.cpp create mode 100644 kinit/tdedostartupconfig.cpp create mode 100644 kinit/tdeioslave.cpp create mode 100644 kinit/tdelauncher.cpp create mode 100644 kinit/tdelauncher.h create mode 100644 kinit/tdelauncher_cmds.h create mode 100644 kinit/tdelauncher_main.cpp create mode 100644 kinit/tdestartupconfig.cpp delete mode 100644 kinit/tests/klaunchertest.cpp create mode 100644 kinit/tests/tdelaunchertest.cpp delete mode 100644 kio/CMakeLists.txt delete mode 100644 kio/DESIGN delete mode 100644 kio/DESIGN.krun delete mode 100644 kio/DESIGN.metadata delete mode 100644 kio/DESIGN.mimetypes delete mode 100644 kio/DESKTOP_ENTRY_STANDARD delete mode 100644 kio/Mainpage.dox delete mode 100644 kio/Makefile.am delete mode 100644 kio/application.desktop delete mode 100644 kio/bookmarks/CMakeLists.txt delete mode 100644 kio/bookmarks/Makefile.am delete mode 100644 kio/bookmarks/dptrtemplate.h delete mode 100644 kio/bookmarks/kbookmark.cc delete mode 100644 kio/bookmarks/kbookmark.h delete mode 100644 kio/bookmarks/kbookmarkbar.cc delete mode 100644 kio/bookmarks/kbookmarkbar.h delete mode 100644 kio/bookmarks/kbookmarkdombuilder.cc delete mode 100644 kio/bookmarks/kbookmarkdombuilder.h delete mode 100644 kio/bookmarks/kbookmarkdrag.cc delete mode 100644 kio/bookmarks/kbookmarkdrag.h delete mode 100644 kio/bookmarks/kbookmarkexporter.cc delete mode 100644 kio/bookmarks/kbookmarkexporter.h delete mode 100644 kio/bookmarks/kbookmarkimporter.cc delete mode 100644 kio/bookmarks/kbookmarkimporter.h delete mode 100644 kio/bookmarks/kbookmarkimporter_crash.cc delete mode 100644 kio/bookmarks/kbookmarkimporter_crash.h delete mode 100644 kio/bookmarks/kbookmarkimporter_ie.cc delete mode 100644 kio/bookmarks/kbookmarkimporter_ie.h delete mode 100644 kio/bookmarks/kbookmarkimporter_kde1.cc delete mode 100644 kio/bookmarks/kbookmarkimporter_kde1.h delete mode 100644 kio/bookmarks/kbookmarkimporter_ns.cc delete mode 100644 kio/bookmarks/kbookmarkimporter_ns.h delete mode 100644 kio/bookmarks/kbookmarkimporter_opera.cc delete mode 100644 kio/bookmarks/kbookmarkimporter_opera.h delete mode 100644 kio/bookmarks/kbookmarkmanager.cc delete mode 100644 kio/bookmarks/kbookmarkmanager.h delete mode 100644 kio/bookmarks/kbookmarkmenu.cc delete mode 100644 kio/bookmarks/kbookmarkmenu.h delete mode 100644 kio/bookmarks/kbookmarkmenu_p.h delete mode 100644 kio/bookmarks/kbookmarknotifier.h delete mode 100644 kio/data.protocol delete mode 100644 kio/httpfilter/CMakeLists.txt delete mode 100644 kio/httpfilter/Makefile.am delete mode 100644 kio/httpfilter/httpfilter.cc delete mode 100644 kio/httpfilter/httpfilter.h delete mode 100644 kio/kcomprfilter.desktop delete mode 100644 kio/kdatatool.desktop delete mode 100644 kio/kfile/CMakeLists.txt delete mode 100644 kio/kfile/ChangeLog delete mode 100644 kio/kfile/Makefile.am delete mode 100644 kio/kfile/NOTES delete mode 100644 kio/kfile/TODO delete mode 100644 kio/kfile/config-kfile.h delete mode 100644 kio/kfile/images.h delete mode 100644 kio/kfile/kacleditwidget.cpp delete mode 100644 kio/kfile/kacleditwidget.h delete mode 100644 kio/kfile/kacleditwidget_p.h delete mode 100644 kio/kfile/kcombiview.cpp delete mode 100644 kio/kfile/kcombiview.h delete mode 100644 kio/kfile/kcustommenueditor.cpp delete mode 100644 kio/kfile/kcustommenueditor.h delete mode 100644 kio/kfile/kdiroperator.cpp delete mode 100644 kio/kfile/kdiroperator.h delete mode 100644 kio/kfile/kdirselectdialog.cpp delete mode 100644 kio/kfile/kdirselectdialog.h delete mode 100644 kio/kfile/kdirsize.cpp delete mode 100644 kio/kfile/kdirsize.h delete mode 100644 kio/kfile/kdiskfreesp.cpp delete mode 100644 kio/kfile/kdiskfreesp.h delete mode 100644 kio/kfile/kencodingfiledialog.cpp delete mode 100644 kio/kfile/kencodingfiledialog.h delete mode 100644 kio/kfile/kfile.h delete mode 100644 kio/kfile/kfilebookmarkhandler.cpp delete mode 100644 kio/kfile/kfilebookmarkhandler.h delete mode 100644 kio/kfile/kfiledetailview.cpp delete mode 100644 kio/kfile/kfiledetailview.h delete mode 100644 kio/kfile/kfiledialog.cpp delete mode 100644 kio/kfile/kfiledialog.h delete mode 100644 kio/kfile/kfilefiltercombo.cpp delete mode 100644 kio/kfile/kfilefiltercombo.h delete mode 100644 kio/kfile/kfileiconview.cpp delete mode 100644 kio/kfile/kfileiconview.h delete mode 100644 kio/kfile/kfilemetainfowidget.cpp delete mode 100644 kio/kfile/kfilemetainfowidget.h delete mode 100644 kio/kfile/kfilemetapreview.cpp delete mode 100644 kio/kfile/kfilemetapreview.h delete mode 100644 kio/kfile/kfilepreview.cpp delete mode 100644 kio/kfile/kfilepreview.h delete mode 100644 kio/kfile/kfilesharedlg.cpp delete mode 100644 kio/kfile/kfilesharedlg.h delete mode 100644 kio/kfile/kfilespeedbar.cpp delete mode 100644 kio/kfile/kfilespeedbar.h delete mode 100644 kio/kfile/kfiletreebranch.cpp delete mode 100644 kio/kfile/kfiletreebranch.h delete mode 100644 kio/kfile/kfiletreeview.cpp delete mode 100644 kio/kfile/kfiletreeview.h delete mode 100644 kio/kfile/kfiletreeviewitem.cpp delete mode 100644 kio/kfile/kfiletreeviewitem.h delete mode 100644 kio/kfile/kfileview.cpp delete mode 100644 kio/kfile/kfileview.h delete mode 100644 kio/kfile/kicondialog.cpp delete mode 100644 kio/kfile/kicondialog.h delete mode 100644 kio/kfile/kimagefilepreview.cpp delete mode 100644 kio/kfile/kimagefilepreview.h delete mode 100644 kio/kfile/kmetaprops.cpp delete mode 100644 kio/kfile/kmetaprops.h delete mode 100644 kio/kfile/knotifydialog.cpp delete mode 100644 kio/kfile/knotifydialog.h delete mode 100644 kio/kfile/knotifywidgetbase.ui delete mode 100644 kio/kfile/kopenwith.cpp delete mode 100644 kio/kfile/kopenwith.h delete mode 100644 kio/kfile/kopenwith_p.h delete mode 100644 kio/kfile/kpreviewprops.cpp delete mode 100644 kio/kfile/kpreviewprops.h delete mode 100644 kio/kfile/kpreviewwidgetbase.cpp delete mode 100644 kio/kfile/kpreviewwidgetbase.h delete mode 100644 kio/kfile/kpropertiesdesktopadvbase.ui delete mode 100644 kio/kfile/kpropertiesdesktopbase.ui delete mode 100644 kio/kfile/kpropertiesdialog.cpp delete mode 100644 kio/kfile/kpropertiesdialog.h delete mode 100644 kio/kfile/kpropertiesmimetypebase.ui delete mode 100644 kio/kfile/kpropsdlg.h delete mode 100644 kio/kfile/kpropsdlgplugin.desktop delete mode 100644 kio/kfile/krecentdirs.cpp delete mode 100644 kio/kfile/krecentdirs.h delete mode 100644 kio/kfile/krecentdocument.cpp delete mode 100644 kio/kfile/krecentdocument.h delete mode 100644 kio/kfile/kurlbar.cpp delete mode 100644 kio/kfile/kurlbar.h delete mode 100644 kio/kfile/kurlcombobox.cpp delete mode 100644 kio/kfile/kurlcombobox.h delete mode 100644 kio/kfile/kurlrequester.cpp delete mode 100644 kio/kfile/kurlrequester.h delete mode 100644 kio/kfile/kurlrequesterdlg.cpp delete mode 100644 kio/kfile/kurlrequesterdlg.h delete mode 100644 kio/kfile/tests/Makefile.am delete mode 100644 kio/kfile/tests/kcustommenueditortest.cpp delete mode 100644 kio/kfile/tests/kdirselectdialogtest.cpp delete mode 100644 kio/kfile/tests/kfdtest.cpp delete mode 100644 kio/kfile/tests/kfdtest.h delete mode 100644 kio/kfile/tests/kfiletreeviewtest.cpp delete mode 100644 kio/kfile/tests/kfiletreeviewtest.h delete mode 100644 kio/kfile/tests/kfstest.cpp delete mode 100644 kio/kfile/tests/kicondialogtest.cpp delete mode 100644 kio/kfile/tests/knotifytest.cpp delete mode 100644 kio/kfile/tests/kopenwithtest.cpp delete mode 100644 kio/kfile/tests/kurlrequestertest.cpp delete mode 100644 kio/kfileplugin.desktop delete mode 100644 kio/kio/CMakeLists.txt delete mode 100644 kio/kio/KFILEMETAINFO_ISSUES delete mode 100644 kio/kio/Makefile.am delete mode 100644 kio/kio/authinfo.cpp delete mode 100644 kio/kio/authinfo.h delete mode 100644 kio/kio/chmodjob.cpp delete mode 100644 kio/kio/chmodjob.h delete mode 100644 kio/kio/configure.in.in delete mode 100644 kio/kio/connection.cpp delete mode 100644 kio/kio/connection.h delete mode 100644 kio/kio/dataprotocol.cpp delete mode 100644 kio/kio/dataprotocol.h delete mode 100644 kio/kio/dataslave.cpp delete mode 100644 kio/kio/dataslave.h delete mode 100644 kio/kio/davjob.cpp delete mode 100644 kio/kio/davjob.h delete mode 100644 kio/kio/defaultprogress.cpp delete mode 100644 kio/kio/defaultprogress.h delete mode 100644 kio/kio/forwardingslavebase.cpp delete mode 100644 kio/kio/forwardingslavebase.h delete mode 100644 kio/kio/global.cpp delete mode 100644 kio/kio/global.h delete mode 100644 kio/kio/http_slave_defaults.h delete mode 100644 kio/kio/ioslave_defaults.h delete mode 100644 kio/kio/job.cpp delete mode 100644 kio/kio/job.h delete mode 100644 kio/kio/jobclasses.h delete mode 100644 kio/kio/kacl.cpp delete mode 100644 kio/kio/kacl.h delete mode 100644 kio/kio/kar.cpp delete mode 100644 kio/kio/kar.h delete mode 100644 kio/kio/karchive.cpp delete mode 100644 kio/kio/karchive.h delete mode 100644 kio/kio/kautomount.cpp delete mode 100644 kio/kio/kautomount.h delete mode 100644 kio/kio/kdatatool.cpp delete mode 100644 kio/kio/kdatatool.h delete mode 100644 kio/kio/kdcopservicestarter.cpp delete mode 100644 kio/kio/kdcopservicestarter.h delete mode 100644 kio/kio/kdirlister.cpp delete mode 100644 kio/kio/kdirlister.h delete mode 100644 kio/kio/kdirlister_p.h delete mode 100644 kio/kio/kdirnotify.cpp delete mode 100644 kio/kio/kdirnotify.h delete mode 100644 kio/kio/kdirnotify_stub.cpp delete mode 100644 kio/kio/kdirnotify_stub.h delete mode 100644 kio/kio/kdirwatch.cpp delete mode 100644 kio/kio/kdirwatch.h delete mode 100644 kio/kio/kdirwatch_p.h delete mode 100644 kio/kio/kemailsettings.cpp delete mode 100644 kio/kio/kemailsettings.h delete mode 100644 kio/kio/kfilefilter.cpp delete mode 100644 kio/kio/kfilefilter.h delete mode 100644 kio/kio/kfileitem.cpp delete mode 100644 kio/kio/kfileitem.h delete mode 100644 kio/kio/kfilemetainfo.cpp delete mode 100644 kio/kio/kfilemetainfo.h delete mode 100644 kio/kio/kfileshare.cpp delete mode 100644 kio/kio/kfileshare.h delete mode 100644 kio/kio/kfilterbase.cpp delete mode 100644 kio/kio/kfilterbase.h delete mode 100644 kio/kio/kfilterdev.cpp delete mode 100644 kio/kio/kfilterdev.h delete mode 100644 kio/kio/kimageio.cpp delete mode 100644 kio/kio/kimageio.h delete mode 100644 kio/kio/kimageiofactory.h delete mode 100644 kio/kio/klimitediodevice.h delete mode 100644 kio/kio/kmdbase.h delete mode 100644 kio/kio/kmessageboxwrapper.h delete mode 100644 kio/kio/kmimemagic.cpp delete mode 100644 kio/kio/kmimemagic.h delete mode 100644 kio/kio/kmimetype.cpp delete mode 100644 kio/kio/kmimetype.h delete mode 100644 kio/kio/kmimetypechooser.cpp delete mode 100644 kio/kio/kmimetypechooser.h delete mode 100644 kio/kio/kmimetyperesolver.h delete mode 100644 kio/kio/knfsshare.cpp delete mode 100644 kio/kio/knfsshare.h delete mode 100644 kio/kio/kprotocolinfo.cpp delete mode 100644 kio/kio/kprotocolinfo.h delete mode 100644 kio/kio/kprotocolmanager.cpp delete mode 100644 kio/kio/kprotocolmanager.h delete mode 100644 kio/kio/kremoteencoding.cpp delete mode 100644 kio/kio/kremoteencoding.h delete mode 100644 kio/kio/krun.cpp delete mode 100644 kio/kio/krun.h delete mode 100644 kio/kio/ksambashare.cpp delete mode 100644 kio/kio/ksambashare.h delete mode 100644 kio/kio/kscan.cpp delete mode 100644 kio/kio/kscan.h delete mode 100644 kio/kio/kservice.cpp delete mode 100644 kio/kio/kservice.h delete mode 100644 kio/kio/kservice_p.h delete mode 100644 kio/kio/kservicefactory.cpp delete mode 100644 kio/kio/kservicefactory.h delete mode 100644 kio/kio/kservicegroup.cpp delete mode 100644 kio/kio/kservicegroup.h delete mode 100644 kio/kio/kservicegroupfactory.cpp delete mode 100644 kio/kio/kservicegroupfactory.h delete mode 100644 kio/kio/kservicetype.cpp delete mode 100644 kio/kio/kservicetype.h delete mode 100644 kio/kio/kservicetypefactory.cpp delete mode 100644 kio/kio/kservicetypefactory.h delete mode 100644 kio/kio/kshellcompletion.cpp delete mode 100644 kio/kio/kshellcompletion.h delete mode 100644 kio/kio/kshred.cpp delete mode 100644 kio/kio/kshred.h delete mode 100644 kio/kio/ktar.cpp delete mode 100644 kio/kio/ktar.h delete mode 100644 kio/kio/ktrader.cpp delete mode 100644 kio/kio/ktrader.h delete mode 100644 kio/kio/ktraderparse.cpp delete mode 100644 kio/kio/ktraderparse.h delete mode 100644 kio/kio/ktraderparsetree.cpp delete mode 100644 kio/kio/ktraderparsetree.h delete mode 100644 kio/kio/kurifilter.cpp delete mode 100644 kio/kio/kurifilter.h delete mode 100644 kio/kio/kurlcompletion.cpp delete mode 100644 kio/kio/kurlcompletion.h delete mode 100644 kio/kio/kurlpixmapprovider.cpp delete mode 100644 kio/kio/kurlpixmapprovider.h delete mode 100644 kio/kio/kuserprofile.cpp delete mode 100644 kio/kio/kuserprofile.h delete mode 100644 kio/kio/kzip.cpp delete mode 100644 kio/kio/kzip.h delete mode 100644 kio/kio/lex.c delete mode 100644 kio/kio/lex.l delete mode 100644 kio/kio/metainfojob.cpp delete mode 100644 kio/kio/metainfojob.h delete mode 100644 kio/kio/netaccess.cpp delete mode 100644 kio/kio/netaccess.h delete mode 100644 kio/kio/observer.cpp delete mode 100644 kio/kio/observer.h delete mode 100644 kio/kio/passdlg.cpp delete mode 100644 kio/kio/passdlg.h delete mode 100644 kio/kio/paste.cpp delete mode 100644 kio/kio/paste.h delete mode 100644 kio/kio/pastedialog.cpp delete mode 100644 kio/kio/pastedialog.h delete mode 100644 kio/kio/posixacladdons.cpp delete mode 100644 kio/kio/posixacladdons.h delete mode 100644 kio/kio/previewjob.cpp delete mode 100644 kio/kio/previewjob.h delete mode 100644 kio/kio/progressbase.cpp delete mode 100644 kio/kio/progressbase.h delete mode 100644 kio/kio/renamedlg.cpp delete mode 100644 kio/kio/renamedlg.h delete mode 100644 kio/kio/renamedlgplugin.h delete mode 100644 kio/kio/scheduler.cpp delete mode 100644 kio/kio/scheduler.h delete mode 100644 kio/kio/sessiondata.cpp delete mode 100644 kio/kio/sessiondata.h delete mode 100644 kio/kio/skipdlg.cpp delete mode 100644 kio/kio/skipdlg.h delete mode 100644 kio/kio/slave.cpp delete mode 100644 kio/kio/slave.h delete mode 100644 kio/kio/slavebase.cpp delete mode 100644 kio/kio/slavebase.h delete mode 100644 kio/kio/slaveconfig.cpp delete mode 100644 kio/kio/slaveconfig.h delete mode 100644 kio/kio/slaveinterface.cpp delete mode 100644 kio/kio/slaveinterface.h delete mode 100644 kio/kio/statusbarprogress.cpp delete mode 100644 kio/kio/statusbarprogress.h delete mode 100644 kio/kio/tcpslavebase.cpp delete mode 100644 kio/kio/tcpslavebase.h delete mode 100644 kio/kio/tdelficon.cpp delete mode 100644 kio/kio/tdelficon.h delete mode 100644 kio/kio/thumbcreator.h delete mode 100644 kio/kio/yacc.c delete mode 100644 kio/kio/yacc.h delete mode 100644 kio/kio/yacc.y delete mode 100644 kio/kioexec/CMakeLists.txt delete mode 100644 kio/kioexec/Makefile.am delete mode 100644 kio/kioexec/README delete mode 100644 kio/kioexec/main.cpp delete mode 100644 kio/kioexec/main.h delete mode 100644 kio/kioslave.upd delete mode 100644 kio/kpasswdserver.desktop delete mode 100644 kio/kpasswdserver/CMakeLists.txt delete mode 100644 kio/kpasswdserver/DESIGN delete mode 100644 kio/kpasswdserver/Makefile.am delete mode 100644 kio/kpasswdserver/kpasswdserver.cpp delete mode 100644 kio/kpasswdserver/kpasswdserver.h delete mode 100644 kio/kscan.desktop delete mode 100644 kio/kssl/CMakeLists.txt delete mode 100644 kio/kssl/KPMG-CA-16389.0.DC80502.pdf delete mode 100644 kio/kssl/Makefile.am delete mode 100644 kio/kssl/README delete mode 100644 kio/kssl/SECURITY-HOLES delete mode 100644 kio/kssl/TODO delete mode 100644 kio/kssl/configure.in.in delete mode 100644 kio/kssl/keygenwizard.ui delete mode 100644 kio/kssl/keygenwizard2.ui delete mode 100644 kio/kssl/kopenssl.cc delete mode 100644 kio/kssl/kopenssl.h delete mode 100644 kio/kssl/ksmimecrypto.cc delete mode 100644 kio/kssl/ksmimecrypto.h delete mode 100644 kio/kssl/kssl.cc delete mode 100644 kio/kssl/kssl.h delete mode 100644 kio/kssl/kssl/CMakeLists.txt delete mode 100644 kio/kssl/kssl/DigiCertAssuredIDRootCA.pem delete mode 100644 kio/kssl/kssl/DigiCertGlobalRootCA.pem delete mode 100644 kio/kssl/kssl/DigiCertHighAssuranceEVRootCA.pem delete mode 100644 kio/kssl/kssl/GeoTrust_Universal_CA.pem delete mode 100644 kio/kssl/kssl/GeoTrust_Universal_CA2.pem delete mode 100644 kio/kssl/kssl/HOWTO delete mode 100644 kio/kssl/kssl/Makefile.am delete mode 100644 kio/kssl/kssl/StartCom.pem delete mode 100644 kio/kssl/kssl/SwissSign-Gold-G2.pem delete mode 100644 kio/kssl/kssl/SwissSign-Platinum-G2.pem delete mode 100644 kio/kssl/kssl/SwissSign-Silver-G2.pem delete mode 100644 kio/kssl/kssl/WiseKey.pem delete mode 100644 kio/kssl/kssl/ac_offline_raiz_certicamara.pem delete mode 100644 kio/kssl/kssl/argedaten-root-ca-cert.pem delete mode 100644 kio/kssl/kssl/belgacom.pem delete mode 100644 kio/kssl/kssl/caroot/CMakeLists.txt delete mode 100644 kio/kssl/kssl/caroot/Makefile.am delete mode 100644 kio/kssl/kssl/caroot/ca-bundle.crt delete mode 100755 kio/kssl/kssl/cert_bundle delete mode 100644 kio/kssl/kssl/cert_extract.c delete mode 100644 kio/kssl/kssl/certbundle_Makefile delete mode 100755 kio/kssl/kssl/certkde delete mode 100644 kio/kssl/kssl/certum.pem delete mode 100644 kio/kssl/kssl/certum1.pem delete mode 100644 kio/kssl/kssl/certum2.pem delete mode 100644 kio/kssl/kssl/certum3.pem delete mode 100644 kio/kssl/kssl/certum4.pem delete mode 100644 kio/kssl/kssl/comodo1.pem delete mode 100644 kio/kssl/kssl/comodo2.pem delete mode 100644 kio/kssl/kssl/comodo3.pem delete mode 100644 kio/kssl/kssl/comodo4.pem delete mode 100644 kio/kssl/kssl/comodo5.pem delete mode 100644 kio/kssl/kssl/comodo6.pem delete mode 100644 kio/kssl/kssl/comodo7.pem delete mode 100644 kio/kssl/kssl/dfn-root-ca-cert.pem delete mode 100644 kio/kssl/kssl/gd-class2-root.pem delete mode 100644 kio/kssl/kssl/geotrust-global-1.pem delete mode 100644 kio/kssl/kssl/geotrust-global-2.pem delete mode 100644 kio/kssl/kssl/globalsign-root-r1.pem delete mode 100644 kio/kssl/kssl/globalsign-root-r2.pem delete mode 100644 kio/kssl/kssl/icpbrasil.pem delete mode 100644 kio/kssl/kssl/ipsservidores.pem delete mode 100644 kio/kssl/kssl/ksslcalist delete mode 100644 kio/kssl/kssl/localcerts delete mode 100755 kio/kssl/kssl/mergelocal delete mode 100644 kio/kssl/kssl/netlock1.pem delete mode 100644 kio/kssl/kssl/netlock2.pem delete mode 100644 kio/kssl/kssl/netlock3.pem delete mode 100644 kio/kssl/kssl/netlock4.pem delete mode 100644 kio/kssl/kssl/oces.pem delete mode 100644 kio/kssl/kssl/quovadis.pem delete mode 100644 kio/kssl/kssl/qvrca2.pem delete mode 100644 kio/kssl/kssl/qvrca3.pem delete mode 100644 kio/kssl/kssl/sf-class2-root.pem delete mode 100644 kio/kssl/kssl/sonera1.pem delete mode 100644 kio/kssl/kssl/sonera2.pem delete mode 100644 kio/kssl/kssl/staatdernederlandenrotca.pem delete mode 100644 kio/kssl/kssl/startcom.pem delete mode 100644 kio/kssl/kssl/startssl.pem delete mode 100644 kio/kssl/kssl/tcclass2-2011.pem delete mode 100644 kio/kssl/kssl/tcclass3-2011.pem delete mode 100644 kio/kssl/kssl/utn-network.pem delete mode 100644 kio/kssl/kssl/utn-sgc.pem delete mode 100644 kio/kssl/kssl/xgca.pem delete mode 100644 kio/kssl/ksslall.h delete mode 100644 kio/kssl/ksslcallback.c delete mode 100644 kio/kssl/ksslcertchain.cc delete mode 100644 kio/kssl/ksslcertchain.h delete mode 100644 kio/kssl/ksslcertdlg.cc delete mode 100644 kio/kssl/ksslcertdlg.h delete mode 100644 kio/kssl/ksslcertificate.cc delete mode 100644 kio/kssl/ksslcertificate.h delete mode 100644 kio/kssl/ksslcertificatecache.cc delete mode 100644 kio/kssl/ksslcertificatecache.h delete mode 100644 kio/kssl/ksslcertificatefactory.cc delete mode 100644 kio/kssl/ksslcertificatefactory.h delete mode 100644 kio/kssl/ksslcertificatehome.cc delete mode 100644 kio/kssl/ksslcertificatehome.h delete mode 100644 kio/kssl/ksslconfig.h.cmake delete mode 100644 kio/kssl/ksslconfig.h.in delete mode 100644 kio/kssl/ksslconfig_win.h delete mode 100644 kio/kssl/ksslconnectioninfo.cc delete mode 100644 kio/kssl/ksslconnectioninfo.h delete mode 100644 kio/kssl/ksslcsessioncache.cc delete mode 100644 kio/kssl/ksslcsessioncache.h delete mode 100644 kio/kssl/kssldefs.h delete mode 100644 kio/kssl/ksslinfodlg.cc delete mode 100644 kio/kssl/ksslinfodlg.h delete mode 100644 kio/kssl/ksslkeygen.cc delete mode 100644 kio/kssl/ksslkeygen.h delete mode 100644 kio/kssl/ksslpeerinfo.cc delete mode 100644 kio/kssl/ksslpeerinfo.h delete mode 100644 kio/kssl/ksslpemcallback.cc delete mode 100644 kio/kssl/ksslpemcallback.h delete mode 100644 kio/kssl/ksslpkcs12.cc delete mode 100644 kio/kssl/ksslpkcs12.h delete mode 100644 kio/kssl/ksslpkcs7.cc delete mode 100644 kio/kssl/ksslpkcs7.h delete mode 100644 kio/kssl/ksslsession.cc delete mode 100644 kio/kssl/ksslsession.h delete mode 100644 kio/kssl/ksslsettings.cc delete mode 100644 kio/kssl/ksslsettings.h delete mode 100644 kio/kssl/ksslsigners.cc delete mode 100644 kio/kssl/ksslsigners.h delete mode 100644 kio/kssl/ksslutils.cc delete mode 100644 kio/kssl/ksslutils.h delete mode 100644 kio/kssl/ksslx509map.cc delete mode 100644 kio/kssl/ksslx509map.h delete mode 100644 kio/kssl/ksslx509v3.cc delete mode 100644 kio/kssl/ksslx509v3.h delete mode 100644 kio/kurifilterplugin.desktop delete mode 100644 kio/magic delete mode 100644 kio/misc/CMakeLists.txt delete mode 100644 kio/misc/Makefile.am delete mode 100755 kio/misc/fileshareset delete mode 100644 kio/misc/kfile/CMakeLists.txt delete mode 100644 kio/misc/kfile/Makefile.am delete mode 100644 kio/misc/kfile/README delete mode 100644 kio/misc/kfile/fileprops.cpp delete mode 100644 kio/misc/kfile/fileprops.h delete mode 100644 kio/misc/kio_uiserver.desktop delete mode 100644 kio/misc/kmailservice.cpp delete mode 100644 kio/misc/kmailservice.protocol delete mode 100644 kio/misc/kpac/CMakeLists.txt delete mode 100644 kio/misc/kpac/Makefile.am delete mode 100644 kio/misc/kpac/README delete mode 100644 kio/misc/kpac/README.wpad delete mode 100644 kio/misc/kpac/TODO delete mode 100644 kio/misc/kpac/configure.in.in delete mode 100644 kio/misc/kpac/dhcp.h delete mode 100644 kio/misc/kpac/discovery.cpp delete mode 100644 kio/misc/kpac/discovery.h delete mode 100644 kio/misc/kpac/downloader.cpp delete mode 100644 kio/misc/kpac/downloader.h delete mode 100644 kio/misc/kpac/eventsrc delete mode 100644 kio/misc/kpac/kpac_dhcp_helper.c delete mode 100644 kio/misc/kpac/kpactest.pac delete mode 100644 kio/misc/kpac/proxyscout.cpp delete mode 100644 kio/misc/kpac/proxyscout.desktop delete mode 100644 kio/misc/kpac/proxyscout.h delete mode 100644 kio/misc/kpac/script.cpp delete mode 100644 kio/misc/kpac/script.h delete mode 100644 kio/misc/ksendbugmail/CMakeLists.txt delete mode 100644 kio/misc/ksendbugmail/Makefile.am delete mode 100644 kio/misc/ksendbugmail/main.cpp delete mode 100644 kio/misc/ksendbugmail/main.h delete mode 100644 kio/misc/ksendbugmail/smtp.cpp delete mode 100644 kio/misc/ksendbugmail/smtp.h delete mode 100644 kio/misc/kssld/CMakeLists.txt delete mode 100644 kio/misc/kssld/Makefile.am delete mode 100644 kio/misc/kssld/kssld.cpp delete mode 100644 kio/misc/kssld/kssld.desktop delete mode 100644 kio/misc/kssld/kssld.h delete mode 100644 kio/misc/ktelnetservice.cpp delete mode 100644 kio/misc/mms.protocol delete mode 100644 kio/misc/mmst.protocol delete mode 100644 kio/misc/mmsu.protocol delete mode 100644 kio/misc/pnm.protocol delete mode 100644 kio/misc/rlogin.protocol delete mode 100644 kio/misc/rtsp.protocol delete mode 100644 kio/misc/rtspt.protocol delete mode 100644 kio/misc/rtspu.protocol delete mode 100644 kio/misc/ssh.protocol delete mode 100644 kio/misc/tdentlm/CMakeLists.txt delete mode 100644 kio/misc/tdentlm/Makefile.am delete mode 100644 kio/misc/tdentlm/des.cpp delete mode 100644 kio/misc/tdentlm/des.h delete mode 100644 kio/misc/tdentlm/kswap.h delete mode 100644 kio/misc/tdentlm/tdentlm.cpp delete mode 100644 kio/misc/tdentlm/tdentlm.h delete mode 100644 kio/misc/tdesasl/CMakeLists.txt delete mode 100644 kio/misc/tdesasl/Makefile.am delete mode 100644 kio/misc/tdesasl/tdesasl.cpp delete mode 100644 kio/misc/tdesasl/tdesasl.h delete mode 100644 kio/misc/tdewalletd/CMakeLists.txt delete mode 100644 kio/misc/tdewalletd/Makefile.am delete mode 100644 kio/misc/tdewalletd/kbetterthankdialogbase.ui delete mode 100644 kio/misc/tdewalletd/kbetterthankdialogbase.ui.h delete mode 100644 kio/misc/tdewalletd/ktimeout.cpp delete mode 100644 kio/misc/tdewalletd/ktimeout.h delete mode 100644 kio/misc/tdewalletd/tdewalletd.cpp delete mode 100644 kio/misc/tdewalletd/tdewalletd.desktop delete mode 100644 kio/misc/tdewalletd/tdewalletd.h delete mode 100644 kio/misc/tdewalletd/tdewalletwizard.ui delete mode 100644 kio/misc/tdewalletd/tdewalletwizard.ui.h delete mode 100644 kio/misc/telnet.protocol delete mode 100644 kio/misc/uiserver.cpp delete mode 100644 kio/misc/uiserver.h delete mode 100644 kio/pics/CMakeLists.txt delete mode 100644 kio/pics/Makefile.am delete mode 100644 kio/pics/cr16-app-kio_uiserver.png delete mode 100755 kio/proxytype.pl delete mode 100644 kio/renamedlgplugin.desktop delete mode 100644 kio/tdecmodule.desktop delete mode 100644 kio/tests/CMakeLists.txt delete mode 100644 kio/tests/Makefile.am delete mode 100644 kio/tests/dataprotocoltest.cpp delete mode 100644 kio/tests/dummymeta.cpp delete mode 100644 kio/tests/dummymeta.desktop delete mode 100644 kio/tests/dummymeta.h delete mode 100644 kio/tests/getalltest.cpp delete mode 100644 kio/tests/jobtest.cpp delete mode 100644 kio/tests/jobtest.h delete mode 100644 kio/tests/kacltest.cpp delete mode 100644 kio/tests/kacltest.h delete mode 100644 kio/tests/kdcopcheck.cpp delete mode 100644 kio/tests/kdcopcheck.h delete mode 100644 kio/tests/kdefaultprogresstest.cpp delete mode 100644 kio/tests/kdirlistertest.cpp delete mode 100644 kio/tests/kdirlistertest.h delete mode 100644 kio/tests/kdirwatchtest.cpp delete mode 100644 kio/tests/kdirwatchtest.h delete mode 100644 kio/tests/kdirwatchunittest.cpp delete mode 100644 kio/tests/kdirwatchunittest.h delete mode 100644 kio/tests/kfiltertest.cpp delete mode 100644 kio/tests/kionetrctest.cpp delete mode 100644 kio/tests/kiopassdlgtest.cpp delete mode 100644 kio/tests/kioslavetest.cpp delete mode 100644 kio/tests/kioslavetest.h delete mode 100644 kio/tests/kmfitest.cpp delete mode 100644 kio/tests/kmimefromext.cpp delete mode 100644 kio/tests/kmimemagictest.cpp delete mode 100644 kio/tests/kmimetypetest.cpp delete mode 100644 kio/tests/kpropsdlgtest.cpp delete mode 100644 kio/tests/kprotocolinfotest.cpp delete mode 100644 kio/tests/kruntest.cpp delete mode 100644 kio/tests/kruntest.h delete mode 100644 kio/tests/kscantest.cpp delete mode 100644 kio/tests/kshredtest.cpp delete mode 100644 kio/tests/ktartest.cpp delete mode 100644 kio/tests/ktradertest.cpp delete mode 100644 kio/tests/kurifiltertest.cpp delete mode 100644 kio/tests/kurlcompletiontest.cpp delete mode 100644 kio/tests/kziptest.cpp delete mode 100644 kio/tests/metatest.cpp delete mode 100644 kio/tests/netaccesstest.cpp delete mode 100644 kio/tests/previewtest.cpp delete mode 100644 kio/tests/previewtest.h delete mode 100644 kio/tests/speed.cpp delete mode 100644 kio/tests/speed.h delete mode 100644 kio/tests/tdesycocatest.cpp delete mode 100644 kio/tests/tdesycocaupdatetest.cpp delete mode 100644 kio/tests/wronglocalsizes.zip delete mode 100755 kio/useragent.pl delete mode 100644 kioslave/CMakeLists.txt delete mode 100644 kioslave/Mainpage.dox delete mode 100644 kioslave/Makefile.am delete mode 100644 kioslave/bzip2/CMakeLists.txt delete mode 100644 kioslave/bzip2/Makefile.am delete mode 100644 kioslave/bzip2/configure.in.in delete mode 100644 kioslave/bzip2/kbzip2filter.cpp delete mode 100644 kioslave/bzip2/kbzip2filter.desktop delete mode 100644 kioslave/bzip2/kbzip2filter.h delete mode 100644 kioslave/file/CMakeLists.txt delete mode 100644 kioslave/file/Makefile.am delete mode 100644 kioslave/file/file.cc delete mode 100644 kioslave/file/file.h delete mode 100644 kioslave/file/file.protocol delete mode 100644 kioslave/ftp/CMakeLists.txt delete mode 100644 kioslave/ftp/Makefile.am delete mode 100644 kioslave/ftp/configure.in.in delete mode 100644 kioslave/ftp/ftp.cc delete mode 100644 kioslave/ftp/ftp.h delete mode 100644 kioslave/ftp/ftp.protocol delete mode 100644 kioslave/gzip/CMakeLists.txt delete mode 100644 kioslave/gzip/Makefile.am delete mode 100644 kioslave/gzip/kgzipfilter.cpp delete mode 100644 kioslave/gzip/kgzipfilter.desktop delete mode 100644 kioslave/gzip/kgzipfilter.h delete mode 100644 kioslave/http/CMakeLists.txt delete mode 100644 kioslave/http/Makefile.am delete mode 100644 kioslave/http/README.http_cache_cleaner delete mode 100644 kioslave/http/README.webdav delete mode 100644 kioslave/http/THOUGHTS delete mode 100644 kioslave/http/TODO delete mode 100644 kioslave/http/configure.in.bot delete mode 100644 kioslave/http/configure.in.in delete mode 100644 kioslave/http/http.cc delete mode 100644 kioslave/http/http.h delete mode 100644 kioslave/http/http.protocol delete mode 100644 kioslave/http/http_cache_cleaner.cpp delete mode 100644 kioslave/http/http_cache_cleaner.desktop delete mode 100644 kioslave/http/https.protocol delete mode 100644 kioslave/http/kcookiejar/CMakeLists.txt delete mode 100644 kioslave/http/kcookiejar/Makefile.am delete mode 100644 kioslave/http/kcookiejar/domain_info delete mode 100644 kioslave/http/kcookiejar/kcookiejar.cpp delete mode 100644 kioslave/http/kcookiejar/kcookiejar.desktop delete mode 100644 kioslave/http/kcookiejar/kcookiejar.h delete mode 100644 kioslave/http/kcookiejar/kcookiescfg.upd delete mode 100644 kioslave/http/kcookiejar/kcookieserver.cpp delete mode 100644 kioslave/http/kcookiejar/kcookieserver.h delete mode 100644 kioslave/http/kcookiejar/kcookiewin.cpp delete mode 100644 kioslave/http/kcookiejar/kcookiewin.h delete mode 100644 kioslave/http/kcookiejar/main.cpp delete mode 100644 kioslave/http/kcookiejar/netscape_cookie_spec.html delete mode 100644 kioslave/http/kcookiejar/rfc2109 delete mode 100644 kioslave/http/kcookiejar/rfc2965 delete mode 100644 kioslave/http/kcookiejar/tests/Makefile.am delete mode 100644 kioslave/http/kcookiejar/tests/cookie.test delete mode 100644 kioslave/http/kcookiejar/tests/cookie_rfc.test delete mode 100644 kioslave/http/kcookiejar/tests/cookie_saving.test delete mode 100644 kioslave/http/kcookiejar/tests/cookie_settings.test delete mode 100644 kioslave/http/kcookiejar/tests/kcookiejartest.cpp delete mode 100644 kioslave/http/rfc2518.txt delete mode 100644 kioslave/http/rfc2616.txt delete mode 100644 kioslave/http/rfc2617.txt delete mode 100644 kioslave/http/rfc2817.txt delete mode 100644 kioslave/http/rfc2818.txt delete mode 100644 kioslave/http/rfc3229.txt delete mode 100644 kioslave/http/rfc3253.txt delete mode 100644 kioslave/http/shoutcast-icecast.txt delete mode 100644 kioslave/http/webdav.protocol delete mode 100644 kioslave/http/webdavs.protocol delete mode 100644 kioslave/iso/CMakeLists.txt delete mode 100644 kioslave/iso/Makefile.am delete mode 100644 kioslave/iso/iso.cpp delete mode 100644 kioslave/iso/iso.h delete mode 100644 kioslave/iso/iso.protocol delete mode 100644 kioslave/iso/isoservice.desktop delete mode 100644 kioslave/iso/kio_iso.desktop delete mode 100644 kioslave/iso/kio_isorc delete mode 100644 kioslave/iso/kiso.cpp delete mode 100644 kioslave/iso/kiso.h delete mode 100644 kioslave/iso/kisodirectory.cpp delete mode 100644 kioslave/iso/kisodirectory.h delete mode 100644 kioslave/iso/kisofile.cpp delete mode 100644 kioslave/iso/kisofile.h delete mode 100644 kioslave/iso/libisofs/CMakeLists.txt delete mode 100644 kioslave/iso/libisofs/COPYING delete mode 100644 kioslave/iso/libisofs/ChangeLog delete mode 100644 kioslave/iso/libisofs/Makefile.am delete mode 100644 kioslave/iso/libisofs/README delete mode 100644 kioslave/iso/libisofs/bswap.h delete mode 100644 kioslave/iso/libisofs/el_torito.h delete mode 100644 kioslave/iso/libisofs/iso_fs.h delete mode 100644 kioslave/iso/libisofs/isofs.c delete mode 100644 kioslave/iso/libisofs/isofs.h delete mode 100644 kioslave/iso/libisofs/rock.h delete mode 100644 kioslave/iso/qfilehack.cpp delete mode 100644 kioslave/iso/qfilehack.h delete mode 100644 kioslave/metainfo/CMakeLists.txt delete mode 100644 kioslave/metainfo/Makefile.am delete mode 100644 kioslave/metainfo/metainfo.cpp delete mode 100644 kioslave/metainfo/metainfo.h delete mode 100644 kioslave/metainfo/metainfo.protocol delete mode 100644 knewstuff/khotnewstuff.cpp delete mode 100644 knewstuff/khotnewstuffrc create mode 100644 knewstuff/tdehotnewstuff.cpp create mode 100644 knewstuff/tdehotnewstuffrc delete mode 100644 kstyles/plastik/config/plastikconf.cpp delete mode 100644 kstyles/plastik/config/plastikconf.h create mode 100644 kstyles/plastik/config/plastitdeconf.cpp create mode 100644 kstyles/plastik/config/plastitdeconf.h create mode 100644 tdecmshell/CMakeLists.txt create mode 100644 tdecmshell/Makefile.am create mode 100644 tdecmshell/main.cpp create mode 100644 tdecmshell/main.h create mode 100644 tdeconf_update/CMakeLists.txt create mode 100644 tdeconf_update/Mainpage.dox create mode 100644 tdeconf_update/Makefile.am create mode 100644 tdeconf_update/README.tdeconf_update create mode 100644 tdeconf_update/tdeconf_update.cpp delete mode 100644 tdecore/DESIGN.kconfig create mode 100644 tdecore/DESIGN.tdeconfig delete mode 100644 tdecore/kconfig.cpp delete mode 100644 tdecore/kconfig.h delete mode 100644 tdecore/kconfig_compiler/CMakeLists.txt delete mode 100644 tdecore/kconfig_compiler/Makefile.am delete mode 100644 tdecore/kconfig_compiler/README.dox delete mode 100644 tdecore/kconfig_compiler/TODO delete mode 100755 tdecore/kconfig_compiler/checkkcfg.pl delete mode 100644 tdecore/kconfig_compiler/example/Makefile.am delete mode 100644 tdecore/kconfig_compiler/example/autoexample.cpp delete mode 100644 tdecore/kconfig_compiler/example/example.cpp delete mode 100644 tdecore/kconfig_compiler/example/example.kcfg delete mode 100644 tdecore/kconfig_compiler/example/exampleprefs_base.kcfgc delete mode 100644 tdecore/kconfig_compiler/example/general_base.ui delete mode 100644 tdecore/kconfig_compiler/example/myoptions_base.ui delete mode 100644 tdecore/kconfig_compiler/kcfg.xsd delete mode 100644 tdecore/kconfig_compiler/kconfig_compiler.cpp delete mode 100644 tdecore/kconfig_compiler/tests/Makefile.am delete mode 100644 tdecore/kconfig_compiler/tests/kconfigcompiler_test.cpp delete mode 100644 tdecore/kconfig_compiler/tests/kconfigcompiler_test.h delete mode 100644 tdecore/kconfig_compiler/tests/myprefs.h delete mode 100644 tdecore/kconfig_compiler/tests/test1.cpp.ref delete mode 100644 tdecore/kconfig_compiler/tests/test1.h.ref delete mode 100644 tdecore/kconfig_compiler/tests/test1.kcfg delete mode 100644 tdecore/kconfig_compiler/tests/test1.kcfgc delete mode 100644 tdecore/kconfig_compiler/tests/test1main.cpp delete mode 100644 tdecore/kconfig_compiler/tests/test2.cpp.ref delete mode 100644 tdecore/kconfig_compiler/tests/test2.h.ref delete mode 100644 tdecore/kconfig_compiler/tests/test2.kcfg delete mode 100644 tdecore/kconfig_compiler/tests/test2.kcfgc delete mode 100644 tdecore/kconfig_compiler/tests/test2main.cpp delete mode 100644 tdecore/kconfig_compiler/tests/test3.cpp.ref delete mode 100644 tdecore/kconfig_compiler/tests/test3.h.ref delete mode 100644 tdecore/kconfig_compiler/tests/test3.kcfg delete mode 100644 tdecore/kconfig_compiler/tests/test3.kcfgc delete mode 100644 tdecore/kconfig_compiler/tests/test3main.cpp delete mode 100644 tdecore/kconfig_compiler/tests/test4.cpp.ref delete mode 100644 tdecore/kconfig_compiler/tests/test4.h.ref delete mode 100644 tdecore/kconfig_compiler/tests/test4.kcfg delete mode 100644 tdecore/kconfig_compiler/tests/test4.kcfgc delete mode 100644 tdecore/kconfig_compiler/tests/test4main.cpp delete mode 100644 tdecore/kconfig_compiler/tests/test5.cpp.ref delete mode 100644 tdecore/kconfig_compiler/tests/test5.h.ref delete mode 100644 tdecore/kconfig_compiler/tests/test5.kcfg delete mode 100644 tdecore/kconfig_compiler/tests/test5.kcfgc delete mode 100644 tdecore/kconfig_compiler/tests/test5main.cpp delete mode 100644 tdecore/kconfig_compiler/tests/test6.cpp.ref delete mode 100644 tdecore/kconfig_compiler/tests/test6.h.ref delete mode 100644 tdecore/kconfig_compiler/tests/test6.kcfg delete mode 100644 tdecore/kconfig_compiler/tests/test6.kcfgc delete mode 100644 tdecore/kconfig_compiler/tests/test6main.cpp delete mode 100644 tdecore/kconfig_compiler/tests/test7.cpp.ref delete mode 100644 tdecore/kconfig_compiler/tests/test7.h.ref delete mode 100644 tdecore/kconfig_compiler/tests/test7.kcfg delete mode 100644 tdecore/kconfig_compiler/tests/test7.kcfgc delete mode 100644 tdecore/kconfig_compiler/tests/test7main.cpp delete mode 100644 tdecore/kconfig_compiler/tests/test8a.cpp.ref delete mode 100644 tdecore/kconfig_compiler/tests/test8a.h.ref delete mode 100644 tdecore/kconfig_compiler/tests/test8a.kcfg delete mode 100644 tdecore/kconfig_compiler/tests/test8a.kcfgc delete mode 100644 tdecore/kconfig_compiler/tests/test8b.cpp.ref delete mode 100644 tdecore/kconfig_compiler/tests/test8b.h.ref delete mode 100644 tdecore/kconfig_compiler/tests/test8b.kcfg delete mode 100644 tdecore/kconfig_compiler/tests/test8b.kcfgc delete mode 100644 tdecore/kconfig_compiler/tests/test8main.cpp delete mode 100644 tdecore/kconfig_compiler/tests/test9.cpp.ref delete mode 100644 tdecore/kconfig_compiler/tests/test9.h.ref delete mode 100644 tdecore/kconfig_compiler/tests/test9.kcfg delete mode 100644 tdecore/kconfig_compiler/tests/test9.kcfgc delete mode 100644 tdecore/kconfig_compiler/tests/test9main.cpp delete mode 100644 tdecore/kconfig_compiler/tests/test_dpointer.cpp.ref delete mode 100644 tdecore/kconfig_compiler/tests/test_dpointer.h.ref delete mode 100644 tdecore/kconfig_compiler/tests/test_dpointer.kcfg delete mode 100644 tdecore/kconfig_compiler/tests/test_dpointer.kcfgc delete mode 100644 tdecore/kconfig_compiler/tests/test_dpointer_main.cpp delete mode 100644 tdecore/kconfigbackend.cpp delete mode 100644 tdecore/kconfigbackend.h delete mode 100644 tdecore/kconfigbase.cpp delete mode 100644 tdecore/kconfigbase.h delete mode 100644 tdecore/kconfigdata.h delete mode 100644 tdecore/kconfigdialogmanager.cpp delete mode 100644 tdecore/kconfigdialogmanager.h delete mode 100644 tdecore/kconfigskeleton.cpp delete mode 100644 tdecore/kconfigskeleton.h create mode 100644 tdecore/tdeconfig.cpp create mode 100644 tdecore/tdeconfig.h create mode 100644 tdecore/tdeconfig_compiler/CMakeLists.txt create mode 100644 tdecore/tdeconfig_compiler/Makefile.am create mode 100644 tdecore/tdeconfig_compiler/README.dox create mode 100644 tdecore/tdeconfig_compiler/TODO create mode 100755 tdecore/tdeconfig_compiler/checkkcfg.pl create mode 100644 tdecore/tdeconfig_compiler/example/Makefile.am create mode 100644 tdecore/tdeconfig_compiler/example/autoexample.cpp create mode 100644 tdecore/tdeconfig_compiler/example/example.cpp create mode 100644 tdecore/tdeconfig_compiler/example/example.kcfg create mode 100644 tdecore/tdeconfig_compiler/example/exampleprefs_base.kcfgc create mode 100644 tdecore/tdeconfig_compiler/example/general_base.ui create mode 100644 tdecore/tdeconfig_compiler/example/myoptions_base.ui create mode 100644 tdecore/tdeconfig_compiler/kcfg.xsd create mode 100644 tdecore/tdeconfig_compiler/tdeconfig_compiler.cpp create mode 100644 tdecore/tdeconfig_compiler/tests/Makefile.am create mode 100644 tdecore/tdeconfig_compiler/tests/myprefs.h create mode 100644 tdecore/tdeconfig_compiler/tests/tdeconfigcompiler_test.cpp create mode 100644 tdecore/tdeconfig_compiler/tests/tdeconfigcompiler_test.h create mode 100644 tdecore/tdeconfig_compiler/tests/test1.cpp.ref create mode 100644 tdecore/tdeconfig_compiler/tests/test1.h.ref create mode 100644 tdecore/tdeconfig_compiler/tests/test1.kcfg create mode 100644 tdecore/tdeconfig_compiler/tests/test1.kcfgc create mode 100644 tdecore/tdeconfig_compiler/tests/test1main.cpp create mode 100644 tdecore/tdeconfig_compiler/tests/test2.cpp.ref create mode 100644 tdecore/tdeconfig_compiler/tests/test2.h.ref create mode 100644 tdecore/tdeconfig_compiler/tests/test2.kcfg create mode 100644 tdecore/tdeconfig_compiler/tests/test2.kcfgc create mode 100644 tdecore/tdeconfig_compiler/tests/test2main.cpp create mode 100644 tdecore/tdeconfig_compiler/tests/test3.cpp.ref create mode 100644 tdecore/tdeconfig_compiler/tests/test3.h.ref create mode 100644 tdecore/tdeconfig_compiler/tests/test3.kcfg create mode 100644 tdecore/tdeconfig_compiler/tests/test3.kcfgc create mode 100644 tdecore/tdeconfig_compiler/tests/test3main.cpp create mode 100644 tdecore/tdeconfig_compiler/tests/test4.cpp.ref create mode 100644 tdecore/tdeconfig_compiler/tests/test4.h.ref create mode 100644 tdecore/tdeconfig_compiler/tests/test4.kcfg create mode 100644 tdecore/tdeconfig_compiler/tests/test4.kcfgc create mode 100644 tdecore/tdeconfig_compiler/tests/test4main.cpp create mode 100644 tdecore/tdeconfig_compiler/tests/test5.cpp.ref create mode 100644 tdecore/tdeconfig_compiler/tests/test5.h.ref create mode 100644 tdecore/tdeconfig_compiler/tests/test5.kcfg create mode 100644 tdecore/tdeconfig_compiler/tests/test5.kcfgc create mode 100644 tdecore/tdeconfig_compiler/tests/test5main.cpp create mode 100644 tdecore/tdeconfig_compiler/tests/test6.cpp.ref create mode 100644 tdecore/tdeconfig_compiler/tests/test6.h.ref create mode 100644 tdecore/tdeconfig_compiler/tests/test6.kcfg create mode 100644 tdecore/tdeconfig_compiler/tests/test6.kcfgc create mode 100644 tdecore/tdeconfig_compiler/tests/test6main.cpp create mode 100644 tdecore/tdeconfig_compiler/tests/test7.cpp.ref create mode 100644 tdecore/tdeconfig_compiler/tests/test7.h.ref create mode 100644 tdecore/tdeconfig_compiler/tests/test7.kcfg create mode 100644 tdecore/tdeconfig_compiler/tests/test7.kcfgc create mode 100644 tdecore/tdeconfig_compiler/tests/test7main.cpp create mode 100644 tdecore/tdeconfig_compiler/tests/test8a.cpp.ref create mode 100644 tdecore/tdeconfig_compiler/tests/test8a.h.ref create mode 100644 tdecore/tdeconfig_compiler/tests/test8a.kcfg create mode 100644 tdecore/tdeconfig_compiler/tests/test8a.kcfgc create mode 100644 tdecore/tdeconfig_compiler/tests/test8b.cpp.ref create mode 100644 tdecore/tdeconfig_compiler/tests/test8b.h.ref create mode 100644 tdecore/tdeconfig_compiler/tests/test8b.kcfg create mode 100644 tdecore/tdeconfig_compiler/tests/test8b.kcfgc create mode 100644 tdecore/tdeconfig_compiler/tests/test8main.cpp create mode 100644 tdecore/tdeconfig_compiler/tests/test9.cpp.ref create mode 100644 tdecore/tdeconfig_compiler/tests/test9.h.ref create mode 100644 tdecore/tdeconfig_compiler/tests/test9.kcfg create mode 100644 tdecore/tdeconfig_compiler/tests/test9.kcfgc create mode 100644 tdecore/tdeconfig_compiler/tests/test9main.cpp create mode 100644 tdecore/tdeconfig_compiler/tests/test_dpointer.cpp.ref create mode 100644 tdecore/tdeconfig_compiler/tests/test_dpointer.h.ref create mode 100644 tdecore/tdeconfig_compiler/tests/test_dpointer.kcfg create mode 100644 tdecore/tdeconfig_compiler/tests/test_dpointer.kcfgc create mode 100644 tdecore/tdeconfig_compiler/tests/test_dpointer_main.cpp create mode 100644 tdecore/tdeconfigbackend.cpp create mode 100644 tdecore/tdeconfigbackend.h create mode 100644 tdecore/tdeconfigbase.cpp create mode 100644 tdecore/tdeconfigbase.h create mode 100644 tdecore/tdeconfigdata.h create mode 100644 tdecore/tdeconfigdialogmanager.cpp create mode 100644 tdecore/tdeconfigdialogmanager.h create mode 100644 tdecore/tdeconfigskeleton.cpp create mode 100644 tdecore/tdeconfigskeleton.h delete mode 100644 tdecore/tests/kconfigtest.cpp delete mode 100644 tdecore/tests/kconfigtestgui.cpp delete mode 100644 tdecore/tests/kconfigtestgui.h create mode 100644 tdecore/tests/tdeconfigtest.cpp create mode 100644 tdecore/tests/tdeconfigtestgui.cpp create mode 100644 tdecore/tests/tdeconfigtestgui.h create mode 100644 tdefile-plugins/CMakeLists.txt create mode 100644 tdefile-plugins/elf/CMakeLists.txt create mode 100644 tdefile-plugins/elf/tdefile_elf.cpp create mode 100644 tdefile-plugins/elf/tdefile_elf.desktop create mode 100644 tdefile-plugins/elf/tdefile_elf.h create mode 100644 tdeio/CMakeLists.txt create mode 100644 tdeio/DESIGN create mode 100644 tdeio/DESIGN.krun create mode 100644 tdeio/DESIGN.metadata create mode 100644 tdeio/DESIGN.mimetypes create mode 100644 tdeio/DESKTOP_ENTRY_STANDARD create mode 100644 tdeio/Mainpage.dox create mode 100644 tdeio/Makefile.am create mode 100644 tdeio/application.desktop create mode 100644 tdeio/bookmarks/CMakeLists.txt create mode 100644 tdeio/bookmarks/Makefile.am create mode 100644 tdeio/bookmarks/dptrtemplate.h create mode 100644 tdeio/bookmarks/kbookmark.cc create mode 100644 tdeio/bookmarks/kbookmark.h create mode 100644 tdeio/bookmarks/kbookmarkbar.cc create mode 100644 tdeio/bookmarks/kbookmarkbar.h create mode 100644 tdeio/bookmarks/kbookmarkdombuilder.cc create mode 100644 tdeio/bookmarks/kbookmarkdombuilder.h create mode 100644 tdeio/bookmarks/kbookmarkdrag.cc create mode 100644 tdeio/bookmarks/kbookmarkdrag.h create mode 100644 tdeio/bookmarks/kbookmarkexporter.cc create mode 100644 tdeio/bookmarks/kbookmarkexporter.h create mode 100644 tdeio/bookmarks/kbookmarkimporter.cc create mode 100644 tdeio/bookmarks/kbookmarkimporter.h create mode 100644 tdeio/bookmarks/kbookmarkimporter_crash.cc create mode 100644 tdeio/bookmarks/kbookmarkimporter_crash.h create mode 100644 tdeio/bookmarks/kbookmarkimporter_ie.cc create mode 100644 tdeio/bookmarks/kbookmarkimporter_ie.h create mode 100644 tdeio/bookmarks/kbookmarkimporter_kde1.cc create mode 100644 tdeio/bookmarks/kbookmarkimporter_kde1.h create mode 100644 tdeio/bookmarks/kbookmarkimporter_ns.cc create mode 100644 tdeio/bookmarks/kbookmarkimporter_ns.h create mode 100644 tdeio/bookmarks/kbookmarkimporter_opera.cc create mode 100644 tdeio/bookmarks/kbookmarkimporter_opera.h create mode 100644 tdeio/bookmarks/kbookmarkmanager.cc create mode 100644 tdeio/bookmarks/kbookmarkmanager.h create mode 100644 tdeio/bookmarks/kbookmarkmenu.cc create mode 100644 tdeio/bookmarks/kbookmarkmenu.h create mode 100644 tdeio/bookmarks/kbookmarkmenu_p.h create mode 100644 tdeio/bookmarks/kbookmarknotifier.h create mode 100644 tdeio/data.protocol create mode 100644 tdeio/httpfilter/CMakeLists.txt create mode 100644 tdeio/httpfilter/Makefile.am create mode 100644 tdeio/httpfilter/httpfilter.cc create mode 100644 tdeio/httpfilter/httpfilter.h create mode 100644 tdeio/kcomprfilter.desktop create mode 100644 tdeio/kdatatool.desktop create mode 100644 tdeio/kpasswdserver.desktop create mode 100644 tdeio/kpasswdserver/CMakeLists.txt create mode 100644 tdeio/kpasswdserver/DESIGN create mode 100644 tdeio/kpasswdserver/Makefile.am create mode 100644 tdeio/kpasswdserver/kpasswdserver.cpp create mode 100644 tdeio/kpasswdserver/kpasswdserver.h create mode 100644 tdeio/kscan.desktop create mode 100644 tdeio/kssl/CMakeLists.txt create mode 100644 tdeio/kssl/KPMG-CA-16389.0.DC80502.pdf create mode 100644 tdeio/kssl/Makefile.am create mode 100644 tdeio/kssl/README create mode 100644 tdeio/kssl/SECURITY-HOLES create mode 100644 tdeio/kssl/TODO create mode 100644 tdeio/kssl/configure.in.in create mode 100644 tdeio/kssl/keygenwizard.ui create mode 100644 tdeio/kssl/keygenwizard2.ui create mode 100644 tdeio/kssl/kopenssl.cc create mode 100644 tdeio/kssl/kopenssl.h create mode 100644 tdeio/kssl/ksmimecrypto.cc create mode 100644 tdeio/kssl/ksmimecrypto.h create mode 100644 tdeio/kssl/kssl.cc create mode 100644 tdeio/kssl/kssl.h create mode 100644 tdeio/kssl/kssl/CMakeLists.txt create mode 100644 tdeio/kssl/kssl/DigiCertAssuredIDRootCA.pem create mode 100644 tdeio/kssl/kssl/DigiCertGlobalRootCA.pem create mode 100644 tdeio/kssl/kssl/DigiCertHighAssuranceEVRootCA.pem create mode 100644 tdeio/kssl/kssl/GeoTrust_Universal_CA.pem create mode 100644 tdeio/kssl/kssl/GeoTrust_Universal_CA2.pem create mode 100644 tdeio/kssl/kssl/HOWTO create mode 100644 tdeio/kssl/kssl/Makefile.am create mode 100644 tdeio/kssl/kssl/StartCom.pem create mode 100644 tdeio/kssl/kssl/SwissSign-Gold-G2.pem create mode 100644 tdeio/kssl/kssl/SwissSign-Platinum-G2.pem create mode 100644 tdeio/kssl/kssl/SwissSign-Silver-G2.pem create mode 100644 tdeio/kssl/kssl/WiseKey.pem create mode 100644 tdeio/kssl/kssl/ac_offline_raiz_certicamara.pem create mode 100644 tdeio/kssl/kssl/argedaten-root-ca-cert.pem create mode 100644 tdeio/kssl/kssl/belgacom.pem create mode 100644 tdeio/kssl/kssl/caroot/CMakeLists.txt create mode 100644 tdeio/kssl/kssl/caroot/Makefile.am create mode 100644 tdeio/kssl/kssl/caroot/ca-bundle.crt create mode 100755 tdeio/kssl/kssl/cert_bundle create mode 100644 tdeio/kssl/kssl/cert_extract.c create mode 100644 tdeio/kssl/kssl/certbundle_Makefile create mode 100755 tdeio/kssl/kssl/certkde create mode 100644 tdeio/kssl/kssl/certum.pem create mode 100644 tdeio/kssl/kssl/certum1.pem create mode 100644 tdeio/kssl/kssl/certum2.pem create mode 100644 tdeio/kssl/kssl/certum3.pem create mode 100644 tdeio/kssl/kssl/certum4.pem create mode 100644 tdeio/kssl/kssl/comodo1.pem create mode 100644 tdeio/kssl/kssl/comodo2.pem create mode 100644 tdeio/kssl/kssl/comodo3.pem create mode 100644 tdeio/kssl/kssl/comodo4.pem create mode 100644 tdeio/kssl/kssl/comodo5.pem create mode 100644 tdeio/kssl/kssl/comodo6.pem create mode 100644 tdeio/kssl/kssl/comodo7.pem create mode 100644 tdeio/kssl/kssl/dfn-root-ca-cert.pem create mode 100644 tdeio/kssl/kssl/gd-class2-root.pem create mode 100644 tdeio/kssl/kssl/geotrust-global-1.pem create mode 100644 tdeio/kssl/kssl/geotrust-global-2.pem create mode 100644 tdeio/kssl/kssl/globalsign-root-r1.pem create mode 100644 tdeio/kssl/kssl/globalsign-root-r2.pem create mode 100644 tdeio/kssl/kssl/icpbrasil.pem create mode 100644 tdeio/kssl/kssl/ipsservidores.pem create mode 100644 tdeio/kssl/kssl/ksslcalist create mode 100644 tdeio/kssl/kssl/localcerts create mode 100755 tdeio/kssl/kssl/mergelocal create mode 100644 tdeio/kssl/kssl/netlock1.pem create mode 100644 tdeio/kssl/kssl/netlock2.pem create mode 100644 tdeio/kssl/kssl/netlock3.pem create mode 100644 tdeio/kssl/kssl/netlock4.pem create mode 100644 tdeio/kssl/kssl/oces.pem create mode 100644 tdeio/kssl/kssl/quovadis.pem create mode 100644 tdeio/kssl/kssl/qvrca2.pem create mode 100644 tdeio/kssl/kssl/qvrca3.pem create mode 100644 tdeio/kssl/kssl/sf-class2-root.pem create mode 100644 tdeio/kssl/kssl/sonera1.pem create mode 100644 tdeio/kssl/kssl/sonera2.pem create mode 100644 tdeio/kssl/kssl/staatdernederlandenrotca.pem create mode 100644 tdeio/kssl/kssl/startcom.pem create mode 100644 tdeio/kssl/kssl/startssl.pem create mode 100644 tdeio/kssl/kssl/tcclass2-2011.pem create mode 100644 tdeio/kssl/kssl/tcclass3-2011.pem create mode 100644 tdeio/kssl/kssl/utn-network.pem create mode 100644 tdeio/kssl/kssl/utn-sgc.pem create mode 100644 tdeio/kssl/kssl/xgca.pem create mode 100644 tdeio/kssl/ksslall.h create mode 100644 tdeio/kssl/ksslcallback.c create mode 100644 tdeio/kssl/ksslcertchain.cc create mode 100644 tdeio/kssl/ksslcertchain.h create mode 100644 tdeio/kssl/ksslcertdlg.cc create mode 100644 tdeio/kssl/ksslcertdlg.h create mode 100644 tdeio/kssl/ksslcertificate.cc create mode 100644 tdeio/kssl/ksslcertificate.h create mode 100644 tdeio/kssl/ksslcertificatecache.cc create mode 100644 tdeio/kssl/ksslcertificatecache.h create mode 100644 tdeio/kssl/ksslcertificatefactory.cc create mode 100644 tdeio/kssl/ksslcertificatefactory.h create mode 100644 tdeio/kssl/ksslcertificatehome.cc create mode 100644 tdeio/kssl/ksslcertificatehome.h create mode 100644 tdeio/kssl/ksslconfig.h.cmake create mode 100644 tdeio/kssl/ksslconfig.h.in create mode 100644 tdeio/kssl/ksslconfig_win.h create mode 100644 tdeio/kssl/ksslconnectioninfo.cc create mode 100644 tdeio/kssl/ksslconnectioninfo.h create mode 100644 tdeio/kssl/ksslcsessioncache.cc create mode 100644 tdeio/kssl/ksslcsessioncache.h create mode 100644 tdeio/kssl/kssldefs.h create mode 100644 tdeio/kssl/ksslinfodlg.cc create mode 100644 tdeio/kssl/ksslinfodlg.h create mode 100644 tdeio/kssl/ksslkeygen.cc create mode 100644 tdeio/kssl/ksslkeygen.h create mode 100644 tdeio/kssl/ksslpeerinfo.cc create mode 100644 tdeio/kssl/ksslpeerinfo.h create mode 100644 tdeio/kssl/ksslpemcallback.cc create mode 100644 tdeio/kssl/ksslpemcallback.h create mode 100644 tdeio/kssl/ksslpkcs12.cc create mode 100644 tdeio/kssl/ksslpkcs12.h create mode 100644 tdeio/kssl/ksslpkcs7.cc create mode 100644 tdeio/kssl/ksslpkcs7.h create mode 100644 tdeio/kssl/ksslsession.cc create mode 100644 tdeio/kssl/ksslsession.h create mode 100644 tdeio/kssl/ksslsettings.cc create mode 100644 tdeio/kssl/ksslsettings.h create mode 100644 tdeio/kssl/ksslsigners.cc create mode 100644 tdeio/kssl/ksslsigners.h create mode 100644 tdeio/kssl/ksslutils.cc create mode 100644 tdeio/kssl/ksslutils.h create mode 100644 tdeio/kssl/ksslx509map.cc create mode 100644 tdeio/kssl/ksslx509map.h create mode 100644 tdeio/kssl/ksslx509v3.cc create mode 100644 tdeio/kssl/ksslx509v3.h create mode 100644 tdeio/kurifilterplugin.desktop create mode 100644 tdeio/magic create mode 100644 tdeio/misc/CMakeLists.txt create mode 100644 tdeio/misc/Makefile.am create mode 100755 tdeio/misc/fileshareset create mode 100644 tdeio/misc/kpac/CMakeLists.txt create mode 100644 tdeio/misc/kpac/Makefile.am create mode 100644 tdeio/misc/kpac/README create mode 100644 tdeio/misc/kpac/README.wpad create mode 100644 tdeio/misc/kpac/TODO create mode 100644 tdeio/misc/kpac/configure.in.in create mode 100644 tdeio/misc/kpac/dhcp.h create mode 100644 tdeio/misc/kpac/discovery.cpp create mode 100644 tdeio/misc/kpac/discovery.h create mode 100644 tdeio/misc/kpac/downloader.cpp create mode 100644 tdeio/misc/kpac/downloader.h create mode 100644 tdeio/misc/kpac/eventsrc create mode 100644 tdeio/misc/kpac/kpac_dhcp_helper.c create mode 100644 tdeio/misc/kpac/kpactest.pac create mode 100644 tdeio/misc/kpac/proxyscout.cpp create mode 100644 tdeio/misc/kpac/proxyscout.desktop create mode 100644 tdeio/misc/kpac/proxyscout.h create mode 100644 tdeio/misc/kpac/script.cpp create mode 100644 tdeio/misc/kpac/script.h create mode 100644 tdeio/misc/kssld/CMakeLists.txt create mode 100644 tdeio/misc/kssld/Makefile.am create mode 100644 tdeio/misc/kssld/kssld.cpp create mode 100644 tdeio/misc/kssld/kssld.desktop create mode 100644 tdeio/misc/kssld/kssld.h create mode 100644 tdeio/misc/mms.protocol create mode 100644 tdeio/misc/mmst.protocol create mode 100644 tdeio/misc/mmsu.protocol create mode 100644 tdeio/misc/pnm.protocol create mode 100644 tdeio/misc/rlogin.protocol create mode 100644 tdeio/misc/rtsp.protocol create mode 100644 tdeio/misc/rtspt.protocol create mode 100644 tdeio/misc/rtspu.protocol create mode 100644 tdeio/misc/ssh.protocol create mode 100644 tdeio/misc/tdefile/CMakeLists.txt create mode 100644 tdeio/misc/tdefile/Makefile.am create mode 100644 tdeio/misc/tdefile/README create mode 100644 tdeio/misc/tdefile/fileprops.cpp create mode 100644 tdeio/misc/tdefile/fileprops.h create mode 100644 tdeio/misc/tdeio_uiserver.desktop create mode 100644 tdeio/misc/tdemailservice.cpp create mode 100644 tdeio/misc/tdemailservice.protocol create mode 100644 tdeio/misc/tdentlm/CMakeLists.txt create mode 100644 tdeio/misc/tdentlm/Makefile.am create mode 100644 tdeio/misc/tdentlm/des.cpp create mode 100644 tdeio/misc/tdentlm/des.h create mode 100644 tdeio/misc/tdentlm/kswap.h create mode 100644 tdeio/misc/tdentlm/tdentlm.cpp create mode 100644 tdeio/misc/tdentlm/tdentlm.h create mode 100644 tdeio/misc/tdesasl/CMakeLists.txt create mode 100644 tdeio/misc/tdesasl/Makefile.am create mode 100644 tdeio/misc/tdesasl/tdesasl.cpp create mode 100644 tdeio/misc/tdesasl/tdesasl.h create mode 100644 tdeio/misc/tdesendbugmail/CMakeLists.txt create mode 100644 tdeio/misc/tdesendbugmail/Makefile.am create mode 100644 tdeio/misc/tdesendbugmail/main.cpp create mode 100644 tdeio/misc/tdesendbugmail/main.h create mode 100644 tdeio/misc/tdesendbugmail/smtp.cpp create mode 100644 tdeio/misc/tdesendbugmail/smtp.h create mode 100644 tdeio/misc/tdetelnetservice.cpp create mode 100644 tdeio/misc/tdewalletd/CMakeLists.txt create mode 100644 tdeio/misc/tdewalletd/Makefile.am create mode 100644 tdeio/misc/tdewalletd/kbetterthankdialogbase.ui create mode 100644 tdeio/misc/tdewalletd/kbetterthankdialogbase.ui.h create mode 100644 tdeio/misc/tdewalletd/ktimeout.cpp create mode 100644 tdeio/misc/tdewalletd/ktimeout.h create mode 100644 tdeio/misc/tdewalletd/tdewalletd.cpp create mode 100644 tdeio/misc/tdewalletd/tdewalletd.desktop create mode 100644 tdeio/misc/tdewalletd/tdewalletd.h create mode 100644 tdeio/misc/tdewalletd/tdewalletwizard.ui create mode 100644 tdeio/misc/tdewalletd/tdewalletwizard.ui.h create mode 100644 tdeio/misc/telnet.protocol create mode 100644 tdeio/misc/uiserver.cpp create mode 100644 tdeio/misc/uiserver.h create mode 100644 tdeio/pics/CMakeLists.txt create mode 100644 tdeio/pics/Makefile.am create mode 100644 tdeio/pics/cr16-app-tdeio_uiserver.png create mode 100755 tdeio/proxytype.pl create mode 100644 tdeio/renamedlgplugin.desktop create mode 100644 tdeio/tdecmodule.desktop create mode 100644 tdeio/tdefile/CMakeLists.txt create mode 100644 tdeio/tdefile/ChangeLog create mode 100644 tdeio/tdefile/Makefile.am create mode 100644 tdeio/tdefile/NOTES create mode 100644 tdeio/tdefile/TODO create mode 100644 tdeio/tdefile/config-tdefile.h create mode 100644 tdeio/tdefile/images.h create mode 100644 tdeio/tdefile/kacleditwidget.cpp create mode 100644 tdeio/tdefile/kacleditwidget.h create mode 100644 tdeio/tdefile/kacleditwidget_p.h create mode 100644 tdeio/tdefile/kcombiview.cpp create mode 100644 tdeio/tdefile/kcombiview.h create mode 100644 tdeio/tdefile/kcustommenueditor.cpp create mode 100644 tdeio/tdefile/kcustommenueditor.h create mode 100644 tdeio/tdefile/kdiroperator.cpp create mode 100644 tdeio/tdefile/kdiroperator.h create mode 100644 tdeio/tdefile/kdirselectdialog.cpp create mode 100644 tdeio/tdefile/kdirselectdialog.h create mode 100644 tdeio/tdefile/kdirsize.cpp create mode 100644 tdeio/tdefile/kdirsize.h create mode 100644 tdeio/tdefile/kdiskfreesp.cpp create mode 100644 tdeio/tdefile/kdiskfreesp.h create mode 100644 tdeio/tdefile/kencodingfiledialog.cpp create mode 100644 tdeio/tdefile/kencodingfiledialog.h create mode 100644 tdeio/tdefile/kicondialog.cpp create mode 100644 tdeio/tdefile/kicondialog.h create mode 100644 tdeio/tdefile/kimagefilepreview.cpp create mode 100644 tdeio/tdefile/kimagefilepreview.h create mode 100644 tdeio/tdefile/kmetaprops.cpp create mode 100644 tdeio/tdefile/kmetaprops.h create mode 100644 tdeio/tdefile/knotifydialog.cpp create mode 100644 tdeio/tdefile/knotifydialog.h create mode 100644 tdeio/tdefile/knotifywidgetbase.ui create mode 100644 tdeio/tdefile/kopenwith.cpp create mode 100644 tdeio/tdefile/kopenwith.h create mode 100644 tdeio/tdefile/kopenwith_p.h create mode 100644 tdeio/tdefile/kpreviewprops.cpp create mode 100644 tdeio/tdefile/kpreviewprops.h create mode 100644 tdeio/tdefile/kpreviewwidgetbase.cpp create mode 100644 tdeio/tdefile/kpreviewwidgetbase.h create mode 100644 tdeio/tdefile/kpropertiesdesktopadvbase.ui create mode 100644 tdeio/tdefile/kpropertiesdesktopbase.ui create mode 100644 tdeio/tdefile/kpropertiesdialog.cpp create mode 100644 tdeio/tdefile/kpropertiesdialog.h create mode 100644 tdeio/tdefile/kpropertiesmimetypebase.ui create mode 100644 tdeio/tdefile/kpropsdlg.h create mode 100644 tdeio/tdefile/kpropsdlgplugin.desktop create mode 100644 tdeio/tdefile/krecentdirs.cpp create mode 100644 tdeio/tdefile/krecentdirs.h create mode 100644 tdeio/tdefile/krecentdocument.cpp create mode 100644 tdeio/tdefile/krecentdocument.h create mode 100644 tdeio/tdefile/kurlbar.cpp create mode 100644 tdeio/tdefile/kurlbar.h create mode 100644 tdeio/tdefile/kurlcombobox.cpp create mode 100644 tdeio/tdefile/kurlcombobox.h create mode 100644 tdeio/tdefile/kurlrequester.cpp create mode 100644 tdeio/tdefile/kurlrequester.h create mode 100644 tdeio/tdefile/kurlrequesterdlg.cpp create mode 100644 tdeio/tdefile/kurlrequesterdlg.h create mode 100644 tdeio/tdefile/tdefile.h create mode 100644 tdeio/tdefile/tdefilebookmarkhandler.cpp create mode 100644 tdeio/tdefile/tdefilebookmarkhandler.h create mode 100644 tdeio/tdefile/tdefiledetailview.cpp create mode 100644 tdeio/tdefile/tdefiledetailview.h create mode 100644 tdeio/tdefile/tdefiledialog.cpp create mode 100644 tdeio/tdefile/tdefiledialog.h create mode 100644 tdeio/tdefile/tdefilefiltercombo.cpp create mode 100644 tdeio/tdefile/tdefilefiltercombo.h create mode 100644 tdeio/tdefile/tdefileiconview.cpp create mode 100644 tdeio/tdefile/tdefileiconview.h create mode 100644 tdeio/tdefile/tdefilemetainfowidget.cpp create mode 100644 tdeio/tdefile/tdefilemetainfowidget.h create mode 100644 tdeio/tdefile/tdefilemetapreview.cpp create mode 100644 tdeio/tdefile/tdefilemetapreview.h create mode 100644 tdeio/tdefile/tdefilepreview.cpp create mode 100644 tdeio/tdefile/tdefilepreview.h create mode 100644 tdeio/tdefile/tdefilesharedlg.cpp create mode 100644 tdeio/tdefile/tdefilesharedlg.h create mode 100644 tdeio/tdefile/tdefilespeedbar.cpp create mode 100644 tdeio/tdefile/tdefilespeedbar.h create mode 100644 tdeio/tdefile/tdefiletreebranch.cpp create mode 100644 tdeio/tdefile/tdefiletreebranch.h create mode 100644 tdeio/tdefile/tdefiletreeview.cpp create mode 100644 tdeio/tdefile/tdefiletreeview.h create mode 100644 tdeio/tdefile/tdefiletreeviewitem.cpp create mode 100644 tdeio/tdefile/tdefiletreeviewitem.h create mode 100644 tdeio/tdefile/tdefileview.cpp create mode 100644 tdeio/tdefile/tdefileview.h create mode 100644 tdeio/tdefile/tests/Makefile.am create mode 100644 tdeio/tdefile/tests/kcustommenueditortest.cpp create mode 100644 tdeio/tdefile/tests/kdirselectdialogtest.cpp create mode 100644 tdeio/tdefile/tests/kfdtest.cpp create mode 100644 tdeio/tdefile/tests/kfdtest.h create mode 100644 tdeio/tdefile/tests/kfstest.cpp create mode 100644 tdeio/tdefile/tests/kicondialogtest.cpp create mode 100644 tdeio/tdefile/tests/knotifytest.cpp create mode 100644 tdeio/tdefile/tests/kopenwithtest.cpp create mode 100644 tdeio/tdefile/tests/kurlrequestertest.cpp create mode 100644 tdeio/tdefile/tests/tdefiletreeviewtest.cpp create mode 100644 tdeio/tdefile/tests/tdefiletreeviewtest.h create mode 100644 tdeio/tdefileplugin.desktop create mode 100644 tdeio/tdeio/CMakeLists.txt create mode 100644 tdeio/tdeio/KFILEMETAINFO_ISSUES create mode 100644 tdeio/tdeio/Makefile.am create mode 100644 tdeio/tdeio/authinfo.cpp create mode 100644 tdeio/tdeio/authinfo.h create mode 100644 tdeio/tdeio/chmodjob.cpp create mode 100644 tdeio/tdeio/chmodjob.h create mode 100644 tdeio/tdeio/configure.in.in create mode 100644 tdeio/tdeio/connection.cpp create mode 100644 tdeio/tdeio/connection.h create mode 100644 tdeio/tdeio/dataprotocol.cpp create mode 100644 tdeio/tdeio/dataprotocol.h create mode 100644 tdeio/tdeio/dataslave.cpp create mode 100644 tdeio/tdeio/dataslave.h create mode 100644 tdeio/tdeio/davjob.cpp create mode 100644 tdeio/tdeio/davjob.h create mode 100644 tdeio/tdeio/defaultprogress.cpp create mode 100644 tdeio/tdeio/defaultprogress.h create mode 100644 tdeio/tdeio/forwardingslavebase.cpp create mode 100644 tdeio/tdeio/forwardingslavebase.h create mode 100644 tdeio/tdeio/global.cpp create mode 100644 tdeio/tdeio/global.h create mode 100644 tdeio/tdeio/http_slave_defaults.h create mode 100644 tdeio/tdeio/ioslave_defaults.h create mode 100644 tdeio/tdeio/job.cpp create mode 100644 tdeio/tdeio/job.h create mode 100644 tdeio/tdeio/jobclasses.h create mode 100644 tdeio/tdeio/kacl.cpp create mode 100644 tdeio/tdeio/kacl.h create mode 100644 tdeio/tdeio/kar.cpp create mode 100644 tdeio/tdeio/kar.h create mode 100644 tdeio/tdeio/karchive.cpp create mode 100644 tdeio/tdeio/karchive.h create mode 100644 tdeio/tdeio/kautomount.cpp create mode 100644 tdeio/tdeio/kautomount.h create mode 100644 tdeio/tdeio/kdatatool.cpp create mode 100644 tdeio/tdeio/kdatatool.h create mode 100644 tdeio/tdeio/kdcopservicestarter.cpp create mode 100644 tdeio/tdeio/kdcopservicestarter.h create mode 100644 tdeio/tdeio/kdirlister.cpp create mode 100644 tdeio/tdeio/kdirlister.h create mode 100644 tdeio/tdeio/kdirlister_p.h create mode 100644 tdeio/tdeio/kdirnotify.cpp create mode 100644 tdeio/tdeio/kdirnotify.h create mode 100644 tdeio/tdeio/kdirnotify_stub.cpp create mode 100644 tdeio/tdeio/kdirnotify_stub.h create mode 100644 tdeio/tdeio/kdirwatch.cpp create mode 100644 tdeio/tdeio/kdirwatch.h create mode 100644 tdeio/tdeio/kdirwatch_p.h create mode 100644 tdeio/tdeio/kemailsettings.cpp create mode 100644 tdeio/tdeio/kemailsettings.h create mode 100644 tdeio/tdeio/kfilterbase.cpp create mode 100644 tdeio/tdeio/kfilterbase.h create mode 100644 tdeio/tdeio/kfilterdev.cpp create mode 100644 tdeio/tdeio/kfilterdev.h create mode 100644 tdeio/tdeio/kimageio.cpp create mode 100644 tdeio/tdeio/kimageio.h create mode 100644 tdeio/tdeio/kimageiofactory.h create mode 100644 tdeio/tdeio/klimitediodevice.h create mode 100644 tdeio/tdeio/kmdbase.h create mode 100644 tdeio/tdeio/kmessageboxwrapper.h create mode 100644 tdeio/tdeio/kmimemagic.cpp create mode 100644 tdeio/tdeio/kmimemagic.h create mode 100644 tdeio/tdeio/kmimetype.cpp create mode 100644 tdeio/tdeio/kmimetype.h create mode 100644 tdeio/tdeio/kmimetypechooser.cpp create mode 100644 tdeio/tdeio/kmimetypechooser.h create mode 100644 tdeio/tdeio/kmimetyperesolver.h create mode 100644 tdeio/tdeio/knfsshare.cpp create mode 100644 tdeio/tdeio/knfsshare.h create mode 100644 tdeio/tdeio/kprotocolinfo.cpp create mode 100644 tdeio/tdeio/kprotocolinfo.h create mode 100644 tdeio/tdeio/kprotocolmanager.cpp create mode 100644 tdeio/tdeio/kprotocolmanager.h create mode 100644 tdeio/tdeio/kremoteencoding.cpp create mode 100644 tdeio/tdeio/kremoteencoding.h create mode 100644 tdeio/tdeio/krun.cpp create mode 100644 tdeio/tdeio/krun.h create mode 100644 tdeio/tdeio/ksambashare.cpp create mode 100644 tdeio/tdeio/ksambashare.h create mode 100644 tdeio/tdeio/kscan.cpp create mode 100644 tdeio/tdeio/kscan.h create mode 100644 tdeio/tdeio/kservice.cpp create mode 100644 tdeio/tdeio/kservice.h create mode 100644 tdeio/tdeio/kservice_p.h create mode 100644 tdeio/tdeio/kservicefactory.cpp create mode 100644 tdeio/tdeio/kservicefactory.h create mode 100644 tdeio/tdeio/kservicegroup.cpp create mode 100644 tdeio/tdeio/kservicegroup.h create mode 100644 tdeio/tdeio/kservicegroupfactory.cpp create mode 100644 tdeio/tdeio/kservicegroupfactory.h create mode 100644 tdeio/tdeio/kservicetype.cpp create mode 100644 tdeio/tdeio/kservicetype.h create mode 100644 tdeio/tdeio/kservicetypefactory.cpp create mode 100644 tdeio/tdeio/kservicetypefactory.h create mode 100644 tdeio/tdeio/kshellcompletion.cpp create mode 100644 tdeio/tdeio/kshellcompletion.h create mode 100644 tdeio/tdeio/kshred.cpp create mode 100644 tdeio/tdeio/kshred.h create mode 100644 tdeio/tdeio/ktar.cpp create mode 100644 tdeio/tdeio/ktar.h create mode 100644 tdeio/tdeio/ktrader.cpp create mode 100644 tdeio/tdeio/ktrader.h create mode 100644 tdeio/tdeio/ktraderparse.cpp create mode 100644 tdeio/tdeio/ktraderparse.h create mode 100644 tdeio/tdeio/ktraderparsetree.cpp create mode 100644 tdeio/tdeio/ktraderparsetree.h create mode 100644 tdeio/tdeio/kurifilter.cpp create mode 100644 tdeio/tdeio/kurifilter.h create mode 100644 tdeio/tdeio/kurlcompletion.cpp create mode 100644 tdeio/tdeio/kurlcompletion.h create mode 100644 tdeio/tdeio/kurlpixmapprovider.cpp create mode 100644 tdeio/tdeio/kurlpixmapprovider.h create mode 100644 tdeio/tdeio/kuserprofile.cpp create mode 100644 tdeio/tdeio/kuserprofile.h create mode 100644 tdeio/tdeio/kzip.cpp create mode 100644 tdeio/tdeio/kzip.h create mode 100644 tdeio/tdeio/lex.c create mode 100644 tdeio/tdeio/lex.l create mode 100644 tdeio/tdeio/metainfojob.cpp create mode 100644 tdeio/tdeio/metainfojob.h create mode 100644 tdeio/tdeio/netaccess.cpp create mode 100644 tdeio/tdeio/netaccess.h create mode 100644 tdeio/tdeio/observer.cpp create mode 100644 tdeio/tdeio/observer.h create mode 100644 tdeio/tdeio/passdlg.cpp create mode 100644 tdeio/tdeio/passdlg.h create mode 100644 tdeio/tdeio/paste.cpp create mode 100644 tdeio/tdeio/paste.h create mode 100644 tdeio/tdeio/pastedialog.cpp create mode 100644 tdeio/tdeio/pastedialog.h create mode 100644 tdeio/tdeio/posixacladdons.cpp create mode 100644 tdeio/tdeio/posixacladdons.h create mode 100644 tdeio/tdeio/previewjob.cpp create mode 100644 tdeio/tdeio/previewjob.h create mode 100644 tdeio/tdeio/progressbase.cpp create mode 100644 tdeio/tdeio/progressbase.h create mode 100644 tdeio/tdeio/renamedlg.cpp create mode 100644 tdeio/tdeio/renamedlg.h create mode 100644 tdeio/tdeio/renamedlgplugin.h create mode 100644 tdeio/tdeio/scheduler.cpp create mode 100644 tdeio/tdeio/scheduler.h create mode 100644 tdeio/tdeio/sessiondata.cpp create mode 100644 tdeio/tdeio/sessiondata.h create mode 100644 tdeio/tdeio/skipdlg.cpp create mode 100644 tdeio/tdeio/skipdlg.h create mode 100644 tdeio/tdeio/slave.cpp create mode 100644 tdeio/tdeio/slave.h create mode 100644 tdeio/tdeio/slavebase.cpp create mode 100644 tdeio/tdeio/slavebase.h create mode 100644 tdeio/tdeio/slaveconfig.cpp create mode 100644 tdeio/tdeio/slaveconfig.h create mode 100644 tdeio/tdeio/slaveinterface.cpp create mode 100644 tdeio/tdeio/slaveinterface.h create mode 100644 tdeio/tdeio/statusbarprogress.cpp create mode 100644 tdeio/tdeio/statusbarprogress.h create mode 100644 tdeio/tdeio/tcpslavebase.cpp create mode 100644 tdeio/tdeio/tcpslavebase.h create mode 100644 tdeio/tdeio/tdefilefilter.cpp create mode 100644 tdeio/tdeio/tdefilefilter.h create mode 100644 tdeio/tdeio/tdefileitem.cpp create mode 100644 tdeio/tdeio/tdefileitem.h create mode 100644 tdeio/tdeio/tdefilemetainfo.cpp create mode 100644 tdeio/tdeio/tdefilemetainfo.h create mode 100644 tdeio/tdeio/tdefileshare.cpp create mode 100644 tdeio/tdeio/tdefileshare.h create mode 100644 tdeio/tdeio/tdelficon.cpp create mode 100644 tdeio/tdeio/tdelficon.h create mode 100644 tdeio/tdeio/thumbcreator.h create mode 100644 tdeio/tdeio/yacc.c create mode 100644 tdeio/tdeio/yacc.h create mode 100644 tdeio/tdeio/yacc.y create mode 100644 tdeio/tdeioexec/CMakeLists.txt create mode 100644 tdeio/tdeioexec/Makefile.am create mode 100644 tdeio/tdeioexec/README create mode 100644 tdeio/tdeioexec/main.cpp create mode 100644 tdeio/tdeioexec/main.h create mode 100644 tdeio/tdeioslave.upd create mode 100644 tdeio/tests/CMakeLists.txt create mode 100644 tdeio/tests/Makefile.am create mode 100644 tdeio/tests/dataprotocoltest.cpp create mode 100644 tdeio/tests/dummymeta.cpp create mode 100644 tdeio/tests/dummymeta.desktop create mode 100644 tdeio/tests/dummymeta.h create mode 100644 tdeio/tests/getalltest.cpp create mode 100644 tdeio/tests/jobtest.cpp create mode 100644 tdeio/tests/jobtest.h create mode 100644 tdeio/tests/kacltest.cpp create mode 100644 tdeio/tests/kacltest.h create mode 100644 tdeio/tests/kdcopcheck.cpp create mode 100644 tdeio/tests/kdcopcheck.h create mode 100644 tdeio/tests/kdefaultprogresstest.cpp create mode 100644 tdeio/tests/kdirlistertest.cpp create mode 100644 tdeio/tests/kdirlistertest.h create mode 100644 tdeio/tests/kdirwatchtest.cpp create mode 100644 tdeio/tests/kdirwatchtest.h create mode 100644 tdeio/tests/kdirwatchunittest.cpp create mode 100644 tdeio/tests/kdirwatchunittest.h create mode 100644 tdeio/tests/kfiltertest.cpp create mode 100644 tdeio/tests/kionetrctest.cpp create mode 100644 tdeio/tests/kiopassdlgtest.cpp create mode 100644 tdeio/tests/kmfitest.cpp create mode 100644 tdeio/tests/kmimefromext.cpp create mode 100644 tdeio/tests/kmimemagictest.cpp create mode 100644 tdeio/tests/kmimetypetest.cpp create mode 100644 tdeio/tests/kpropsdlgtest.cpp create mode 100644 tdeio/tests/kprotocolinfotest.cpp create mode 100644 tdeio/tests/kruntest.cpp create mode 100644 tdeio/tests/kruntest.h create mode 100644 tdeio/tests/kscantest.cpp create mode 100644 tdeio/tests/kshredtest.cpp create mode 100644 tdeio/tests/ktartest.cpp create mode 100644 tdeio/tests/kurifiltertest.cpp create mode 100644 tdeio/tests/kurlcompletiontest.cpp create mode 100644 tdeio/tests/kziptest.cpp create mode 100644 tdeio/tests/metatest.cpp create mode 100644 tdeio/tests/netaccesstest.cpp create mode 100644 tdeio/tests/previewtest.cpp create mode 100644 tdeio/tests/previewtest.h create mode 100644 tdeio/tests/speed.cpp create mode 100644 tdeio/tests/speed.h create mode 100644 tdeio/tests/tdeioslavetest.cpp create mode 100644 tdeio/tests/tdeioslavetest.h create mode 100644 tdeio/tests/tdesycocatest.cpp create mode 100644 tdeio/tests/tdesycocaupdatetest.cpp create mode 100644 tdeio/tests/tdetradertest.cpp create mode 100644 tdeio/tests/wronglocalsizes.zip create mode 100755 tdeio/useragent.pl create mode 100644 tdeioslave/CMakeLists.txt create mode 100644 tdeioslave/Mainpage.dox create mode 100644 tdeioslave/Makefile.am create mode 100644 tdeioslave/bzip2/CMakeLists.txt create mode 100644 tdeioslave/bzip2/Makefile.am create mode 100644 tdeioslave/bzip2/configure.in.in create mode 100644 tdeioslave/bzip2/kbzip2filter.cpp create mode 100644 tdeioslave/bzip2/kbzip2filter.desktop create mode 100644 tdeioslave/bzip2/kbzip2filter.h create mode 100644 tdeioslave/file/CMakeLists.txt create mode 100644 tdeioslave/file/Makefile.am create mode 100644 tdeioslave/file/file.cc create mode 100644 tdeioslave/file/file.h create mode 100644 tdeioslave/file/file.protocol create mode 100644 tdeioslave/ftp/CMakeLists.txt create mode 100644 tdeioslave/ftp/Makefile.am create mode 100644 tdeioslave/ftp/configure.in.in create mode 100644 tdeioslave/ftp/ftp.cc create mode 100644 tdeioslave/ftp/ftp.h create mode 100644 tdeioslave/ftp/ftp.protocol create mode 100644 tdeioslave/gzip/CMakeLists.txt create mode 100644 tdeioslave/gzip/Makefile.am create mode 100644 tdeioslave/gzip/kgzipfilter.cpp create mode 100644 tdeioslave/gzip/kgzipfilter.desktop create mode 100644 tdeioslave/gzip/kgzipfilter.h create mode 100644 tdeioslave/http/CMakeLists.txt create mode 100644 tdeioslave/http/Makefile.am create mode 100644 tdeioslave/http/README.http_cache_cleaner create mode 100644 tdeioslave/http/README.webdav create mode 100644 tdeioslave/http/THOUGHTS create mode 100644 tdeioslave/http/TODO create mode 100644 tdeioslave/http/configure.in.bot create mode 100644 tdeioslave/http/configure.in.in create mode 100644 tdeioslave/http/http.cc create mode 100644 tdeioslave/http/http.h create mode 100644 tdeioslave/http/http.protocol create mode 100644 tdeioslave/http/http_cache_cleaner.cpp create mode 100644 tdeioslave/http/http_cache_cleaner.desktop create mode 100644 tdeioslave/http/https.protocol create mode 100644 tdeioslave/http/kcookiejar/CMakeLists.txt create mode 100644 tdeioslave/http/kcookiejar/Makefile.am create mode 100644 tdeioslave/http/kcookiejar/domain_info create mode 100644 tdeioslave/http/kcookiejar/kcookiejar.cpp create mode 100644 tdeioslave/http/kcookiejar/kcookiejar.desktop create mode 100644 tdeioslave/http/kcookiejar/kcookiejar.h create mode 100644 tdeioslave/http/kcookiejar/kcookiescfg.upd create mode 100644 tdeioslave/http/kcookiejar/kcookieserver.cpp create mode 100644 tdeioslave/http/kcookiejar/kcookieserver.h create mode 100644 tdeioslave/http/kcookiejar/kcookiewin.cpp create mode 100644 tdeioslave/http/kcookiejar/kcookiewin.h create mode 100644 tdeioslave/http/kcookiejar/main.cpp create mode 100644 tdeioslave/http/kcookiejar/netscape_cookie_spec.html create mode 100644 tdeioslave/http/kcookiejar/rfc2109 create mode 100644 tdeioslave/http/kcookiejar/rfc2965 create mode 100644 tdeioslave/http/kcookiejar/tests/Makefile.am create mode 100644 tdeioslave/http/kcookiejar/tests/cookie.test create mode 100644 tdeioslave/http/kcookiejar/tests/cookie_rfc.test create mode 100644 tdeioslave/http/kcookiejar/tests/cookie_saving.test create mode 100644 tdeioslave/http/kcookiejar/tests/cookie_settings.test create mode 100644 tdeioslave/http/kcookiejar/tests/kcookiejartest.cpp create mode 100644 tdeioslave/http/rfc2518.txt create mode 100644 tdeioslave/http/rfc2616.txt create mode 100644 tdeioslave/http/rfc2617.txt create mode 100644 tdeioslave/http/rfc2817.txt create mode 100644 tdeioslave/http/rfc2818.txt create mode 100644 tdeioslave/http/rfc3229.txt create mode 100644 tdeioslave/http/rfc3253.txt create mode 100644 tdeioslave/http/shoutcast-icecast.txt create mode 100644 tdeioslave/http/webdav.protocol create mode 100644 tdeioslave/http/webdavs.protocol create mode 100644 tdeioslave/iso/CMakeLists.txt create mode 100644 tdeioslave/iso/Makefile.am create mode 100644 tdeioslave/iso/iso.cpp create mode 100644 tdeioslave/iso/iso.h create mode 100644 tdeioslave/iso/iso.protocol create mode 100644 tdeioslave/iso/isoservice.desktop create mode 100644 tdeioslave/iso/kio_iso.desktop create mode 100644 tdeioslave/iso/kio_isorc create mode 100644 tdeioslave/iso/kiso.cpp create mode 100644 tdeioslave/iso/kiso.h create mode 100644 tdeioslave/iso/kisodirectory.cpp create mode 100644 tdeioslave/iso/kisodirectory.h create mode 100644 tdeioslave/iso/kisofile.cpp create mode 100644 tdeioslave/iso/kisofile.h create mode 100644 tdeioslave/iso/libisofs/CMakeLists.txt create mode 100644 tdeioslave/iso/libisofs/COPYING create mode 100644 tdeioslave/iso/libisofs/ChangeLog create mode 100644 tdeioslave/iso/libisofs/Makefile.am create mode 100644 tdeioslave/iso/libisofs/README create mode 100644 tdeioslave/iso/libisofs/bswap.h create mode 100644 tdeioslave/iso/libisofs/el_torito.h create mode 100644 tdeioslave/iso/libisofs/iso_fs.h create mode 100644 tdeioslave/iso/libisofs/isofs.c create mode 100644 tdeioslave/iso/libisofs/isofs.h create mode 100644 tdeioslave/iso/libisofs/rock.h create mode 100644 tdeioslave/iso/qfilehack.cpp create mode 100644 tdeioslave/iso/qfilehack.h create mode 100644 tdeioslave/metainfo/CMakeLists.txt create mode 100644 tdeioslave/metainfo/Makefile.am create mode 100644 tdeioslave/metainfo/metainfo.cpp create mode 100644 tdeioslave/metainfo/metainfo.h create mode 100644 tdeioslave/metainfo/metainfo.protocol delete mode 100644 tdeprint/kfilelist.cpp delete mode 100644 tdeprint/kfilelist.h create mode 100644 tdeprint/tdefilelist.cpp create mode 100644 tdeprint/tdefilelist.h delete mode 100644 tdeui/kconfigdialog.cpp delete mode 100644 tdeui/kconfigdialog.h create mode 100644 tdeui/tdeconfigdialog.cpp create mode 100644 tdeui/tdeconfigdialog.h delete mode 100644 win/pro_files/kio/kfile/tests/kfiletreeviewtest.pro create mode 100644 win/pro_files/kio/tdefile/tests/tdefiletreeviewtest.pro delete mode 100644 win/pro_files/kioslave/bzip2/bzip2.pro delete mode 100644 win/pro_files/kioslave/common.pro delete mode 100644 win/pro_files/kioslave/gzip/gzip.pro delete mode 100644 win/pro_files/kioslave/kioslave.pro delete mode 100644 win/pro_files/tdecore/kconfig_compiler/kconfig_compiler.pro create mode 100644 win/pro_files/tdecore/tdeconfig_compiler/tdeconfig_compiler.pro create mode 100644 win/pro_files/tdeioslave/bzip2/bzip2.pro create mode 100644 win/pro_files/tdeioslave/common.pro create mode 100644 win/pro_files/tdeioslave/gzip/gzip.pro create mode 100644 win/pro_files/tdeioslave/tdeioslave.pro delete mode 100644 win/resources/kbuildsycoca.res create mode 100644 win/resources/tdebuildsycoca.res (limited to 'tdehtml/java') diff --git a/CMakeLists.txt b/CMakeLists.txt index 7a1f952dd..3a9f23a4d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -81,7 +81,7 @@ OPTION( WITH_AVAHI "Enable AVAHI support" ${WITH_ALL_OPTIONS} ) OPTION( WITH_ELFICON "Enable ELF embedded icon support" ${WITH_ALL_OPTIONS} ) OPTION( WITH_PCRE "Enable pcre regex support for kjs" ON ) OPTION( WITH_GCC_VISIBILITY "Enable fvisibility and fvisibility-inlines-hidden" ${WITH_ALL_OPTIONS} ) -OPTION( WITH_INOTIFY "Enable inotify support for kio" ON ) +OPTION( WITH_INOTIFY "Enable inotify support for tdeio" ON ) OPTION( WITH_GAMIN "Enable FAM/GAMIN support" ${WITH_ALL_OPTIONS} ) option( WITH_UPOWER "Enable UPOWER support" ${WITH_ALL_OPTIONS} ) OPTION( WITH_NETWORK_MANAGER_BACKEND "Enable network-manager support" OFF ) @@ -745,7 +745,7 @@ endif( ) # before altering the LIBR_VERSION check, # please ensure that nothing changed in the # duplicated data definitions present in -# kio/kio/kfileitem.cpp +# tdeio/tdeio/tdefileitem.cpp if( WITH_ELFICON ) pkg_search_module( LIBR libr ) @@ -886,7 +886,7 @@ configure_file( config.h.cmake config.h ) configure_file( dcop/dcop-path.h.cmake dcop/dcop-path.h ) configure_file( tdecore/kdemacros.h.cmake tdecore/kdemacros.h ) configure_file( kjs/global.h.in kjs/global.h ) -configure_file( kio/kssl/ksslconfig.h.cmake kio/kssl/ksslconfig.h ) +configure_file( tdeio/kssl/ksslconfig.h.cmake tdeio/kssl/ksslconfig.h ) configure_file( kdoctools/checkXML.cmake kdoctools/checkXML ) @@ -895,7 +895,7 @@ configure_file( kdoctools/checkXML.cmake kdoctools/checkXML ) set( KDE3_DCOPIDL_EXECUTABLE ${CMAKE_BINARY_DIR}/dcop/dcopidl/dcopidl ) set( KDE3_DCOPIDL2CPP_EXECUTABLE ${CMAKE_BINARY_DIR}/dcop/dcopidl2cpp/dcopidl2cpp ) set( KDE3_MEINPROC_EXECUTABLE ${CMAKE_BINARY_DIR}/kdoctools/meinproc ) -set( KDE3_KCFGC_EXECUTABLE ${CMAKE_BINARY_DIR}/tdecore/kconfig_compiler/kconfig_compiler ) +set( KDE3_KCFGC_EXECUTABLE ${CMAKE_BINARY_DIR}/tdecore/tdeconfig_compiler/tdeconfig_compiler ) ##### global compiler settings ################## @@ -937,7 +937,7 @@ add_subdirectory( tdeui ) add_subdirectory( tdesu ) add_subdirectory( kjs ) add_subdirectory( tdewallet ) -add_subdirectory( kio ) +add_subdirectory( tdeio ) add_subdirectory( kded ) # FIXME this directory/target doesn't exists @@ -962,11 +962,11 @@ if( XRANDR_FOUND ) add_subdirectory( tderandr ) endif( XRANDR_FOUND ) add_subdirectory( tdehtml ) -add_subdirectory( kcmshell ) -add_subdirectory( kconf_update ) +add_subdirectory( tdecmshell ) +add_subdirectory( tdeconf_update ) add_subdirectory( kdewidgets ) add_subdirectory( kimgio ) -add_subdirectory( kioslave ) +add_subdirectory( tdeioslave ) add_subdirectory( kstyles ) add_subdirectory( libtdemid ) add_subdirectory( libtdescreensaver ) @@ -977,7 +977,7 @@ add_subdirectory( licenses ) add_subdirectory( dnssd ) add_subdirectory( pics ) add_subdirectory( mimetypes ) -add_subdirectory( kfile-plugins ) +add_subdirectory( tdefile-plugins ) ##### install import cmake modules ############### diff --git a/KDE2PORTING.html b/KDE2PORTING.html index c373e83f5..131c74577 100644 --- a/KDE2PORTING.html +++ b/KDE2PORTING.html @@ -205,7 +205,7 @@ must have created a TDEApplication object before the methods can be used.

       #include <kglobal.h>
-      #include <kconfig.h>      // Needed to use TDEConfig
+      #include <tdeconfig.h>      // Needed to use TDEConfig
       #include <klocale.h>      // Needed to use KLocale
       #include <kiconloader.h>  // Needed to use KIconLoader
     
@@ -501,20 +501,20 @@ are necessary to convert your old KDND-based stuff to Qt DND.

libkfm has disappeared

Lots of other functionalities have been taken out of kfm, some being - now in libkio, some in libkonq.

+ now in libtdeio, some in libkonq.

Replacement table :

- + - + - - - + + +
KFM::download -> TDEIO::NetAccess::download (tdelibs/kio/netaccess.h)
KFM::download -> TDEIO::NetAccess::download (tdelibs/tdeio/netaccess.h)
KFM::removeTempFile -> TDEIO::NetAccess::removeTempFile
refreshDesktop, sortDesktop, selectRootIcons : removed; kdesktop handles it
KFM::configure -> see konqueror DCOP interface
KFM::openURL -> "(void) new KRun (url)" (tdelibs/kio/krun.h)
KFM::openURL -> "(void) new KRun (url)" (tdelibs/tdeio/krun.h)
KFM::refreshDirectory -> not needed anymore since konqy/kdesktop use KDirWatch
KFM::openProperties -> "(void) new KPropertiesDialog (url)" (tdelibs/kfile/kpropsdlg.h)
KFM::exec -> "(void) new KRun (url)" (tdelibs/kio/krun.h)
KFM::copy, KFM::move -> TDEIO::Job (async, see kio/job.h)
- or TDEIO::NetAccess (sync, see kio/netaccess.h)
KFM::openProperties -> "(void) new KPropertiesDialog (url)" (tdelibs/tdefile/kpropsdlg.h)
KFM::exec -> "(void) new KRun (url)" (tdelibs/tdeio/krun.h)
KFM::copy, KFM::move -> TDEIO::Job (async, see tdeio/job.h)
+ or TDEIO::NetAccess (sync, see tdeio/netaccess.h)
DlgLocation -> Use KLineEditDlg (tdeui/klineeditdlg.h) instead
diff --git a/KDE3PORTING.html b/KDE3PORTING.html index 645bd7612..7d6130ac4 100644 --- a/KDE3PORTING.html +++ b/KDE3PORTING.html @@ -23,7 +23,7 @@ or this page online.

  • Changes in tdeparts
  • Changes in tdespell
  • API-cleanup in KHTML
  • -
  • Changes in kfile
  • +
  • Changes in tdefile
  • TDE Control Center
  • Panel Applets and Extensions
  • @@ -214,7 +214,7 @@ The preferred means of defining a shortcut, however, is to use KAction.

    KIconLoader, KIconTheme

    Methods now use KIcon::Group and KIcon::Context instead of int as types for group and context arguments. The change should affect only code using hardcoded numeric values instead of using the proper enum constants. -This applies to classes KIconLoader, KIconTheme and (in kio and kfile) KMimeType, KService, KIconDialog, KIconButton, +This applies to classes KIconLoader, KIconTheme and (in kio and tdefile) KMimeType, KService, KIconDialog, KIconButton, KURLBar and KURLBarItem.

    Return to the Table of Contents

    @@ -416,7 +416,7 @@ TQString&) is not a slot anymore.

    KOpenWithHandler / KFileOpenWithHandler

    Those two classes are deprecated, no need to create a KFileOpenWithHandler anymore. -The merging of libkio, libtdesycoca, libkfile and libkssl into a single libkio has +The merging of libtdeio, libtdesycoca, libtdefile and libkssl into a single libtdeio has allowed to fix this dependency problem: KRun can now use the OpenWith dialog directly.

    KMimeType, KService

    @@ -520,14 +520,14 @@ disable this use a #define KDE_NO_COMPAT.

    Return to the Table of Contents

    -

    Changes in kfile

    -The kfile-library, as used by the KFileDialog provides classes for directory browsing widgets. +

    Changes in tdefile

    +The tdefile-library, as used by the KFileDialog provides classes for directory browsing widgets. Those classes gained some new features, some parts were merged with other existing classes -and in some cases the API was cleaned up/fixed. The library is now built as part of libkio -library (there's no need to modify Makefiles which use $LIB_KFILE instead of hardcoding -lkfile). +and in some cases the API was cleaned up/fixed. The library is now built as part of libtdeio +library (there's no need to modify Makefiles which use $LIB_KFILE instead of hardcoding -ltdefile).

    Even if the list of changes is long, the affected code base should be relatively small, as most -parts are rarely used outside of kfile. +parts are rarely used outside of tdefile.

    The changes are:

    KFileItem

    diff --git a/Mainpage.dox b/Mainpage.dox index ef5745224..15904678c 100644 --- a/Mainpage.dox +++ b/Mainpage.dox @@ -20,8 +20,8 @@ * - kjs * (classes)\n * Javascript (aka. ECMAScript and JScript) support. - * - kio - * (classes)\n + * - kio + * (classes)\n * Low level access to network files. Also provides access to facilities * such as KDirWatcher which monitors directories for changes. * - tdeparts diff --git a/Makefile.am.in b/Makefile.am.in index 10e9219dd..83d0901fa 100644 --- a/Makefile.am.in +++ b/Makefile.am.in @@ -27,7 +27,7 @@ COMPILE_BEFORE_kabc = kab tderesources COMPILE_BEFORE_kate = interfaces tdeutils COMPILE_BEFORE_tdemdi = tdeutils COMPILE_BEFORE_tdespell2 = tdeutils -COMPILE_BEFORE_kcmshell = tdeutils +COMPILE_BEFORE_tdecmshell = tdeutils COMPILE_BEFORE_kdewidgets = kabc tdehtml COMPILE_BEFORE_interfaces = arts kabc diff --git a/README b/README index 1392e27c5..c96978eb9 100644 --- a/README +++ b/README @@ -42,7 +42,7 @@ Here is an alphabetical list: * tdecert Personal certification manager. -* kconf_update +* tdeconf_update Auto-Updater for config files. * tdecore @@ -89,7 +89,7 @@ Here is an alphabetical list: contains "tdesycoca", the system configure cache containing services, applications, servicetypes and mimetypes. -* kioslave +* tdeioslave I/O subprocesses to handle files, ftp, http, gzip and bzip2 streams. * kjs diff --git a/TODO b/TODO index dcbfec292..75f989156 100644 --- a/TODO +++ b/TODO @@ -180,9 +180,9 @@ that we would like to make for the next binary incompatible release. - KWallet::Wallet::* functions - remove the default = 0 argument for mainwindow for the dialog -- Make libtdewalletclient part of libkio and get rid of libtdewalletclient. +- Make libtdewalletclient part of libtdeio and get rid of libtdewalletclient. -- Get rid of libtdesu dependency in libkio, get rid of SessionData::AuthData*, +- Get rid of libtdesu dependency in libtdeio, get rid of SessionData::AuthData*, get rid of SlaveInterface::authorizationKey and SlaveInterface::delAuthorization - Make functions in KHelpMenu virtual so they can be overridden (ex: to provide @@ -215,7 +215,7 @@ an alternative help->contents action) - Move TDEIO::findDeviceMountPoint, findPathMoundPoint, probably_slow_mounted, and testFileSystemFlag to KMountPoint, to merge that code. -- Refactor the kio/bookmarks code so we don't need to use the static d-pointer trick anymore. +- Refactor the tdeio/bookmarks code so we don't need to use the static d-pointer trick anymore. - Rename the parameters to KDEDesktopMimeType::pixmap so that they use meaningful names rather than just a, b, c, and d. Probably not something that has to wait for KDE 4, but seems like a good idea diff --git a/arts/kde/CMakeLists.txt b/arts/kde/CMakeLists.txt index 3877ddb9d..3b585256d 100644 --- a/arts/kde/CMakeLists.txt +++ b/arts/kde/CMakeLists.txt @@ -18,8 +18,8 @@ include_directories( ${CMAKE_BINARY_DIR}/tdecore ${CMAKE_SOURCE_DIR}/tdecore ${CMAKE_SOURCE_DIR}/tdeui - ${CMAKE_SOURCE_DIR}/kio - ${CMAKE_SOURCE_DIR}/kio/kio + ${CMAKE_SOURCE_DIR}/tdeio + ${CMAKE_SOURCE_DIR}/tdeio/tdeio ) link_directories( @@ -65,6 +65,6 @@ add_custom_command( tde_add_library( ${target} SHARED AUTOMOC SOURCES ${${target}_SRCS} VERSION 1.2.0 - LINK kio-shared mcop artsflow_idl kmedia2_idl soundserver_idl artsflow qtmcop + LINK tdeio-shared mcop artsflow_idl kmedia2_idl soundserver_idl artsflow qtmcop DESTINATION ${LIB_INSTALL_DIR} ) diff --git a/arts/kde/kioinputstream_impl.cpp b/arts/kde/kioinputstream_impl.cpp index 4ff509980..bf6b3654a 100644 --- a/arts/kde/kioinputstream_impl.cpp +++ b/arts/kde/kioinputstream_impl.cpp @@ -31,9 +31,9 @@ #include #include -#include -#include -#include +#include +#include +#include #include #include #include "artsversion.h" diff --git a/arts/kde/kioinputstream_impl.h b/arts/kde/kioinputstream_impl.h index d0a872881..1d18f6421 100644 --- a/arts/kde/kioinputstream_impl.h +++ b/arts/kde/kioinputstream_impl.h @@ -24,7 +24,7 @@ #include #include -#include +#include #include #include "artskde.h" #include "stdsynthmodule.h" diff --git a/arts/kde/kplayobjectcreator.cc b/arts/kde/kplayobjectcreator.cc index 2e8187e67..039c8a3bc 100644 --- a/arts/kde/kplayobjectcreator.cc +++ b/arts/kde/kplayobjectcreator.cc @@ -19,7 +19,7 @@ */ -#include +#include #include "artskde.h" #include "kplayobjectcreator.h" #include "kplayobjectcreator.moc" diff --git a/arts/kde/kplayobjectfactory.cc b/arts/kde/kplayobjectfactory.cc index db4110792..fa9e2c5a1 100644 --- a/arts/kde/kplayobjectfactory.cc +++ b/arts/kde/kplayobjectfactory.cc @@ -19,7 +19,7 @@ */ -#include +#include #include "kplayobject.h" #include "artskde.h" #include "kplayobjectfactory.h" @@ -33,7 +33,7 @@ #include #include "kaudiomanagerplay.h" #include -#include +#include using namespace std; diff --git a/arts/knotify/knotify.cpp b/arts/knotify/knotify.cpp index b8c1642f9..71006c1a7 100644 --- a/arts/knotify/knotify.cpp +++ b/arts/knotify/knotify.cpp @@ -50,7 +50,7 @@ #include #endif #include -#include +#include #include #include #include diff --git a/configure.in.in b/configure.in.in index c899ee519..00870d24c 100644 --- a/configure.in.in +++ b/configure.in.in @@ -252,9 +252,9 @@ AC_SUBST(LIB_KAB, '$(top_builddir)/kab/libkab.la') AC_SUBST(LIB_KABC, '$(top_builddir)/kabc/libkabc.la') AC_SUBST(LIB_TDECORE, '$(top_builddir)/tdecore/libtdecore.la') AC_SUBST(LIB_TDEUI, '$(top_builddir)/tdeui/libtdeui.la') -AC_SUBST(LIB_KIO, '$(top_builddir)/kio/libkio.la') -AC_SUBST(LIB_KFILE, '$(top_builddir)/kio/libkio.la') -AC_SUBST(LIB_KSYCOCA, '$(top_builddir)/kio/libkio.la') +AC_SUBST(LIB_KIO, '$(top_builddir)/tdeio/libtdeio.la') +AC_SUBST(LIB_KFILE, '$(top_builddir)/tdeio/libtdeio.la') +AC_SUBST(LIB_KSYCOCA, '$(top_builddir)/tdeio/libtdeio.la') AC_SUBST(LIB_KHTML, '$(top_builddir)/tdehtml/libtdehtml.la') AC_SUBST(LIB_TDEPRINT, '$(top_builddir)/tdeprint/libtdeprint.la') AC_SUBST(LIB_KPARTS, '$(top_builddir)/tdeparts/libtdeparts.la') @@ -308,7 +308,7 @@ AC_SUBST(DCOPIDL, '$(top_builddir)/dcop/dcopidl/dcopidl') AC_SUBST(DCOPIDLNG, '$(top_srcdir)/dcop/dcopidlng/dcopidlng') AC_SUBST(DCOPIDL2CPP, '$(top_builddir)/dcop/dcopidl2cpp/dcopidl2cpp') AC_SUBST(MAKEKDEWIDGETS, '$(top_builddir)/kdewidgets/makekdewidgets') -AC_SUBST(KCONFIG_COMPILER, '$(top_builddir)/tdecore/kconfig_compiler/kconfig_compiler') +AC_SUBST(KCONFIG_COMPILER, '$(top_builddir)/tdecore/tdeconfig_compiler/tdeconfig_compiler') ac_save_LIBS="$LIBS" LIBS="$LIBS $X_LDFLAGS -lICE" diff --git a/configure.in.mid b/configure.in.mid index 669f0d13c..bf0c8d021 100644 --- a/configure.in.mid +++ b/configure.in.mid @@ -1,7 +1,7 @@ dnl put here things which have to be done after all usual autoconf macros dnl have been run, but before the Makefiles are created -all_includes='-I$(top_srcdir)/dcop -I$(top_srcdir)/libltdl -I$(top_srcdir)/tdefx -I$(top_builddir)/tdecore -I$(top_srcdir)/tdecore -I$(top_srcdir)/tdecore/network -I$(top_srcdir)/tdeui -I$(top_srcdir)/kio -I$(top_srcdir)/kio/kio -I$(top_srcdir)/kio/kfile -I$(top_srcdir) $(QT_INCLUDES) $(X_INCLUDES) $(KDE_INCLUDES) $(USER_INCLUDES)' +all_includes='-I$(top_srcdir)/dcop -I$(top_srcdir)/libltdl -I$(top_srcdir)/tdefx -I$(top_builddir)/tdecore -I$(top_srcdir)/tdecore -I$(top_srcdir)/tdecore/network -I$(top_srcdir)/tdeui -I$(top_srcdir)/tdeio -I$(top_srcdir)/tdeio/tdeio -I$(top_srcdir)/tdeio/tdefile -I$(top_srcdir) $(QT_INCLUDES) $(X_INCLUDES) $(KDE_INCLUDES) $(USER_INCLUDES)' AC_SUBST(all_includes) CXXFLAGS="$CXXFLAGS $KDE_DEFAULT_CXXFLAGS" diff --git a/dcop/client/dcopfind.cpp b/dcop/client/dcopfind.cpp index a4bcb67bb..940d62fd6 100644 --- a/dcop/client/dcopfind.cpp +++ b/dcop/client/dcopfind.cpp @@ -166,16 +166,16 @@ bool launchApp(TQString app) TQDataStream arg(data, IO_WriteOnly); arg << app << URLs; - if ( !dcop->call( "klauncher", "klauncher", "start_service_by_desktop_name(TQString,TQStringList)", + if ( !dcop->call( "tdelauncher", "tdelauncher", "start_service_by_desktop_name(TQString,TQStringList)", data, replyType, replyData) ) { - tqWarning( "call to klauncher failed."); + tqWarning( "call to tdelauncher failed."); return false; } TQDataStream reply(replyData, IO_ReadOnly); if ( replyType != "serviceResult" ) { - tqWarning( "unexpected result '%s' from klauncher.", replyType.data()); + tqWarning( "unexpected result '%s' from tdelauncher.", replyType.data()); return false; } int result; diff --git a/dcop/client/dcopstart.cpp b/dcop/client/dcopstart.cpp index 737184385..a3ea04726 100644 --- a/dcop/client/dcopstart.cpp +++ b/dcop/client/dcopstart.cpp @@ -49,7 +49,7 @@ void startApp(const char *_app, int argc, const char **args) TQDataStream arg(data, IO_WriteOnly); arg << app << URLs; - if ( !dcop->call( "klauncher", "klauncher", function, data, replyType, replyData) ) { + if ( !dcop->call( "tdelauncher", "tdelauncher", function, data, replyType, replyData) ) { tqWarning( "call failed"); exit(1); } else { diff --git a/dcop/dcopidlng/kalyptus b/dcop/dcopidlng/kalyptus index 41f49333d..ec16d8fa8 100644 --- a/dcop/dcopidlng/kalyptus +++ b/dcop/dcopidlng/kalyptus @@ -1514,7 +1514,7 @@ sub makeParamList($$$) } if (defined $defaultparam && $isEnum) { - # Remove any casts in enum values, for example this in kfileitem.h: + # Remove any casts in enum values, for example this in tdefileitem.h: # 'enum { Unknown = (mode_t) - 1 };' $defaultparam =~ s/\([^\)]+\)(.*[0-9].*)/$1/; } diff --git a/dnssd/CMakeLists.txt b/dnssd/CMakeLists.txt index 09d96161d..01be9831c 100644 --- a/dnssd/CMakeLists.txt +++ b/dnssd/CMakeLists.txt @@ -45,6 +45,6 @@ tde_add_library( ${target} SHARED AUTOMOC SOURCES ${${target}_SRCS} VERSION 1.0.0 LINK tdecore-shared - DEPENDENCIES kconfig_compiler + DEPENDENCIES tdeconfig_compiler DESTINATION ${LIB_INSTALL_DIR} ) diff --git a/doc/api/kfiledialog.png b/doc/api/kfiledialog.png deleted file mode 100644 index fa54aa3b2..000000000 Binary files a/doc/api/kfiledialog.png and /dev/null differ diff --git a/doc/api/tdefiledialog.png b/doc/api/tdefiledialog.png new file mode 100644 index 000000000..fa54aa3b2 Binary files /dev/null and b/doc/api/tdefiledialog.png differ diff --git a/doc/tdelibs/man-kbuildsycoca.8.docbook b/doc/tdelibs/man-kbuildsycoca.8.docbook deleted file mode 100644 index 670c000c0..000000000 --- a/doc/tdelibs/man-kbuildsycoca.8.docbook +++ /dev/null @@ -1,221 +0,0 @@ - - -]> - - - - - - -Darian -Lanx - -
    content@openprojects.net
    -
    -
    - -2001-04-25 -0.01.01 - -
    - - -KBuildSycoca -8 - - - -Description -Rebuilds the system configuration cache. - - - -Synopsis - - -kbuildsycoca - - ---nosignal ---incremental ---help ---help-qt ---help-kde ---help-all ---author --v, --version ---license - - - - - - -Description - - -kbuildsyscoca, as part of the &tde; command line -tools ensures the proper operation of &tde; by reading in all the -.desktop, .directory, .kimgio and .protocol files to constructs a binary -database. - - - -&tde; itself accesses this databse during operation to provide -configurational information a program needs to run. - - - -This tool is part of ksyscoca, which stands for &tde; System -Configuration Cache - - - - - -Options - - - - - -Don't signal applications - - - - - - -Incremental Update - - - - - - - - - - -Show help about options - - - - - - - - -Show Qt specific options - - - - - - - - -Show KDE specific options - - - - - - - - -Show all options - - - - - - - - -Show author information - - - - - - - - -Show version information - - - - - - - - -Show license information - - - - - - - - -Usage - -A standard way to run this program is by simply specifying the following -command at the prompt -kbuildsyscoca - - - - - -Files - - - -/tmp/tde-$USER/ksyscoca - -... - - - - - - - -Environment Variables - - -$TDEDIRS - -Specifies which directories are part of the KDE -installations - - - - - - - -See Also - -tdesycoca(3), kblah(4), knogga(6) - - - - -Bugs - -There are no known bugs at the time of writing. - - - -
    - - - diff --git a/doc/tdelibs/man-tdebuildsycoca.8.docbook b/doc/tdelibs/man-tdebuildsycoca.8.docbook new file mode 100644 index 000000000..243e0f9a5 --- /dev/null +++ b/doc/tdelibs/man-tdebuildsycoca.8.docbook @@ -0,0 +1,221 @@ + + +]> + + + + + + +Darian +Lanx + +
    content@openprojects.net
    +
    +
    + +2001-04-25 +0.01.01 + +
    + + +KBuildSycoca +8 + + + +Description +Rebuilds the system configuration cache. + + + +Synopsis + + +tdebuildsycoca + + +--nosignal +--incremental +--help +--help-qt +--help-kde +--help-all +--author +-v, --version +--license + + + + + + +Description + + +kbuildsyscoca, as part of the &tde; command line +tools ensures the proper operation of &tde; by reading in all the +.desktop, .directory, .kimgio and .protocol files to constructs a binary +database. + + + +&tde; itself accesses this databse during operation to provide +configurational information a program needs to run. + + + +This tool is part of ksyscoca, which stands for &tde; System +Configuration Cache + + + + + +Options + + + + + +Don't signal applications + + + + + + +Incremental Update + + + + + + + + + + +Show help about options + + + + + + + + +Show Qt specific options + + + + + + + + +Show KDE specific options + + + + + + + + +Show all options + + + + + + + + +Show author information + + + + + + + + +Show version information + + + + + + + + +Show license information + + + + + + + + +Usage + +A standard way to run this program is by simply specifying the following +command at the prompt +kbuildsyscoca + + + + + +Files + + + +/tmp/tde-$USER/ksyscoca + +... + + + + + + + +Environment Variables + + +$TDEDIRS + +Specifies which directories are part of the KDE +installations + + + + + + + +See Also + +tdesycoca(3), kblah(4), knogga(6) + + + + +Bugs + +There are no known bugs at the time of writing. + + + +
    + + + diff --git a/interfaces/kio/CMakeLists.txt b/interfaces/kio/CMakeLists.txt index efcecf65e..a8d8a2189 100644 --- a/interfaces/kio/CMakeLists.txt +++ b/interfaces/kio/CMakeLists.txt @@ -13,5 +13,5 @@ install( FILES http.h - DESTINATION ${INCLUDE_INSTALL_DIR}/kio ) + DESTINATION ${INCLUDE_INSTALL_DIR}/tdeio ) diff --git a/interfaces/kio/Makefile.am b/interfaces/kio/Makefile.am index 8fad24200..daa98db05 100644 --- a/interfaces/kio/Makefile.am +++ b/interfaces/kio/Makefile.am @@ -1,3 +1,3 @@ -kioincludedir = $(includedir)/kio +kioincludedir = $(includedir)/tdeio kioinclude_HEADERS = http.h diff --git a/interfaces/kregexpeditor/Makefile.am b/interfaces/kregexpeditor/Makefile.am index 2007129da..4e8f5af2a 100644 --- a/interfaces/kregexpeditor/Makefile.am +++ b/interfaces/kregexpeditor/Makefile.am @@ -1,6 +1,6 @@ # $Id$ -INCLUDES = -I$(top_srcdir)/kio -I$(top_srcdir) $(all_includes) +INCLUDES = -I$(top_srcdir)/tdeio -I$(top_srcdir) $(all_includes) include_HEADERS = kregexpeditorinterface.h diff --git a/interfaces/tdeimproxy/library/CMakeLists.txt b/interfaces/tdeimproxy/library/CMakeLists.txt index 9aa1f60ee..40974d722 100644 --- a/interfaces/tdeimproxy/library/CMakeLists.txt +++ b/interfaces/tdeimproxy/library/CMakeLists.txt @@ -18,7 +18,7 @@ include_directories( ${CMAKE_SOURCE_DIR}/dcop ${CMAKE_SOURCE_DIR}/tdecore ${CMAKE_SOURCE_DIR}/tdeui - ${CMAKE_SOURCE_DIR}/kio/kio + ${CMAKE_SOURCE_DIR}/tdeio/tdeio ) link_directories( @@ -45,7 +45,7 @@ set( ${target}_SRCS tde_add_library( ${target} SHARED AUTOMOC SOURCES ${${target}_SRCS} VERSION 0.0.0 - LINK kio-shared + LINK tdeio-shared DESTINATION ${LIB_INSTALL_DIR} DEPENDENCIES dcopidl ) diff --git a/interfaces/tdemediaplayer/CMakeLists.txt b/interfaces/tdemediaplayer/CMakeLists.txt index 00ab7f3d9..0c9355560 100644 --- a/interfaces/tdemediaplayer/CMakeLists.txt +++ b/interfaces/tdemediaplayer/CMakeLists.txt @@ -10,7 +10,7 @@ ################################################# if( ARTS_FOUND ) - add_subdirectory( kfileaudiopreview ) + add_subdirectory( tdefileaudiopreview ) endif( ARTS_FOUND ) include_directories( diff --git a/interfaces/tdemediaplayer/Makefile.am b/interfaces/tdemediaplayer/Makefile.am index 0b7aded07..91ed342bd 100644 --- a/interfaces/tdemediaplayer/Makefile.am +++ b/interfaces/tdemediaplayer/Makefile.am @@ -1,8 +1,8 @@ if include_ARTS -kfileaudiopreview_subdir = kfileaudiopreview +tdefileaudiopreview_subdir = tdefileaudiopreview endif -SUBDIRS = . $(kfileaudiopreview_subdir) +SUBDIRS = . $(tdefileaudiopreview_subdir) INCLUDES = -I$(srcdir)/.. $(all_includes) lib_LTLIBRARIES = libtdemediaplayer.la diff --git a/interfaces/tdemediaplayer/kfileaudiopreview/CMakeLists.txt b/interfaces/tdemediaplayer/kfileaudiopreview/CMakeLists.txt deleted file mode 100644 index 17485b65a..000000000 --- a/interfaces/tdemediaplayer/kfileaudiopreview/CMakeLists.txt +++ /dev/null @@ -1,46 +0,0 @@ -################################################# -# -# (C) 2010 Serghei Amelian -# serghei (DOT) amelian (AT) gmail.com -# -# Improvements and feedback are welcome -# -# This file is released under GPL >= 2 -# -################################################# - -include_directories( - ${TQT_INCLUDE_DIRS} - ${ARTS_INCLUDE_DIRS} - ${CMAKE_CURRENT_BINARY_DIR} - ${CMAKE_BINARY_DIR}/tdecore - ${CMAKE_SOURCE_DIR} - ${CMAKE_SOURCE_DIR}/dcop - ${CMAKE_SOURCE_DIR}/interfaces - ${CMAKE_SOURCE_DIR}/tdecore - ${CMAKE_SOURCE_DIR}/tdeui - ${CMAKE_SOURCE_DIR}/kio - ${CMAKE_SOURCE_DIR}/kio/kio - ${CMAKE_SOURCE_DIR}/kio/kfile - ${CMAKE_SOURCE_DIR}/arts/kde -) - -link_directories( - ${TQT_LIBRARY_DIRS} - ${ARTS_LIBRARY_DIRS} -) - - -##### kfileaudiopreview ######################### - -set( target kfileaudiopreview ) - -set( ${target}_SRCS - kfileaudiopreview.cpp -) - -tde_add_kpart( ${target} AUTOMOC - SOURCES ${${target}_SRCS} - LINK tdemediaplayer-shared artskde-shared - DESTINATION ${PLUGIN_INSTALL_DIR} -) diff --git a/interfaces/tdemediaplayer/kfileaudiopreview/Makefile.am b/interfaces/tdemediaplayer/kfileaudiopreview/Makefile.am deleted file mode 100644 index 4f88a0c87..000000000 --- a/interfaces/tdemediaplayer/kfileaudiopreview/Makefile.am +++ /dev/null @@ -1,13 +0,0 @@ -INCLUDES = -I$(top_srcdir)/interfaces/ -I$(top_srcdir)/arts/kde -I$(includedir)/arts $(all_includes) -METASOURCES = AUTO - -kde_module_LTLIBRARIES = kfileaudiopreview.la - -kfileaudiopreview_la_SOURCES = kfileaudiopreview.cpp -kfileaudiopreview_la_LDFLAGS = $(all_libraries) $(KDE_RPATH) -module -avoid-version -no-undefined -kfileaudiopreview_la_LIBADD = $(top_builddir)/interfaces/tdemediaplayer/libtdemediaplayer.la $(top_builddir)/arts/kde/libartskde.la $(LIB_KIO) $(LIB_QT) $(LIB_TDECORE) - -noinst_HEADERS = kfileaudiopreview.h - -messages: - $(XGETTEXT) $(kfileaudiopreview_la_SOURCES) -o $(podir)/kfileaudiopreview.pot diff --git a/interfaces/tdemediaplayer/kfileaudiopreview/kfileaudiopreview.cpp b/interfaces/tdemediaplayer/kfileaudiopreview/kfileaudiopreview.cpp deleted file mode 100644 index 1d83fc590..000000000 --- a/interfaces/tdemediaplayer/kfileaudiopreview/kfileaudiopreview.cpp +++ /dev/null @@ -1,146 +0,0 @@ -#include "kfileaudiopreview.h" - -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include - -#include - -#include - -class KFileAudioPreviewFactory : public KLibFactory -{ -protected: - virtual TQObject *createObject( TQObject *parent, const char *name, - const char *className, const TQStringList & args) - { - Q_UNUSED(className); - Q_UNUSED(args); - return TQT_TQOBJECT(new KFileAudioPreview( dynamic_cast( parent ), name )); - } -}; - -K_EXPORT_COMPONENT_FACTORY( kfileaudiopreview, KFileAudioPreviewFactory ) - - -/////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////// - - -class KFileAudioPreview::KFileAudioPreviewPrivate -{ -public: - KFileAudioPreviewPrivate( TQWidget *parent ) - { - player = KParts::ComponentFactory::createInstanceFromQuery( "KMediaPlayer/Player", TQString(), TQT_TQOBJECT(parent) ); - } - - ~KFileAudioPreviewPrivate() - { - delete player; - } - - KMediaPlayer::Player *player; -}; - - -KFileAudioPreview::KFileAudioPreview( TQWidget *parent, const char *name ) - : KPreviewWidgetBase( parent, name ) -{ - TDEGlobal::locale()->insertCatalogue("kfileaudiopreview"); - - TQStringList formats = KDE::PlayObjectFactory::mimeTypes(); - // ### - TQStringList::ConstIterator it = formats.begin(); - for ( ; it != formats.end(); ++it ) - m_supportedFormats.insert( *it, (void*) 1 ); - - TQVGroupBox *box = new TQVGroupBox( i18n("Media Player"), this ); - TQVBoxLayout *layout = new TQVBoxLayout( this ); - layout->addWidget( box ); - - (void) new TQWidget( box ); // spacer - - d = new KFileAudioPreviewPrivate( 0L ); // not box -- being reparented anyway - if ( d->player ) // only if there actually is a component... - { - setSupportedMimeTypes( formats ); - KMediaPlayer::View *view = d->player->view(); - view->setEnabled( false ); - - // if we have access to the video widget, show it above the player - // So, reparent first the video widget, then the view. - if ( view->videoWidget() ) - { - TQHBox *frame = new TQHBox( box ); - frame->setFrameStyle( TQFrame::Panel | TQFrame::Sunken ); - frame->setSizePolicy( TQSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Expanding ) ); - view->videoWidget()->reparent( frame, TQPoint(0,0) ); - } - - view->reparent( box, TQPoint(0,0) ); - } - - m_autoPlay = new TQCheckBox( i18n("Play &automatically"), box ); - TDEConfigGroup config( TDEGlobal::config(), ConfigGroup ); - m_autoPlay->setChecked( config.readBoolEntry( "Autoplay sounds", true ) ); - connect( m_autoPlay, TQT_SIGNAL(toggled(bool)), TQT_SLOT(toggleAuto(bool)) ); -} - -KFileAudioPreview::~KFileAudioPreview() -{ - TDEConfigGroup config( TDEGlobal::config(), ConfigGroup ); - config.writeEntry( "Autoplay sounds", m_autoPlay->isChecked() ); - - delete d; -} - -void KFileAudioPreview::showPreview( const KURL &url ) -{ - if ( !d->player || !url.isValid() ) - return; - - KMimeType::Ptr mt = KMimeType::findByURL( url ); - bool supported = m_supportedFormats.find( mt->name() ); - d->player->view()->setEnabled( supported ); - if ( !supported ) - return; - - static_cast(d->player)->openURL( url ); - if ( m_autoPlay->isChecked() ) - d->player->play(); -} - -void KFileAudioPreview::clearPreview() -{ - if ( d->player ) - { - d->player->stop(); - d->player->closeURL(); - } -} - -void KFileAudioPreview::toggleAuto( bool on ) -{ - if ( !d->player ) - return; - - if ( on && m_currentURL.isValid() && d->player->view()->isEnabled() ) - d->player->play(); - else - d->player->stop(); -} - -void KFileAudioPreview::virtual_hook( int, void* ) -{} - -#include "kfileaudiopreview.moc" diff --git a/interfaces/tdemediaplayer/kfileaudiopreview/kfileaudiopreview.h b/interfaces/tdemediaplayer/kfileaudiopreview/kfileaudiopreview.h deleted file mode 100644 index de48e4712..000000000 --- a/interfaces/tdemediaplayer/kfileaudiopreview/kfileaudiopreview.h +++ /dev/null @@ -1,64 +0,0 @@ -/* This file is part of the KDE libraries - Copyright (C) 2003 Carsten Pfeiffer - - library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation, version 2. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#ifndef KFILEAUDIOPREVIEW_H -#define KFILEAUDIOPREVIEW_H - -#include - -#include -#include - -class TQCheckBox; -class TQPushButton; -class TQLabel; - -class KFileDialog; -class KFileItem; - -/** - * Audio "preview" widget for the file dialog. - */ -class KFileAudioPreview : public KPreviewWidgetBase -{ - Q_OBJECT - -public: - KFileAudioPreview(TQWidget *parent = 0, const char *name = 0 ); - ~KFileAudioPreview(); - -public slots: - virtual void showPreview(const KURL &url); - virtual void clearPreview(); - -private slots: - void toggleAuto(bool); - -private: - TQDict m_supportedFormats; - KURL m_currentURL; - TQCheckBox *m_autoPlay; - -protected: - virtual void virtual_hook( int id, void* data ); -private: - class KFileAudioPreviewPrivate; - KFileAudioPreviewPrivate *d; -}; - -#endif // KFILEAUDIOPREVIEW_H diff --git a/interfaces/tdemediaplayer/tdefileaudiopreview/CMakeLists.txt b/interfaces/tdemediaplayer/tdefileaudiopreview/CMakeLists.txt new file mode 100644 index 000000000..8e561e1f3 --- /dev/null +++ b/interfaces/tdemediaplayer/tdefileaudiopreview/CMakeLists.txt @@ -0,0 +1,46 @@ +################################################# +# +# (C) 2010 Serghei Amelian +# serghei (DOT) amelian (AT) gmail.com +# +# Improvements and feedback are welcome +# +# This file is released under GPL >= 2 +# +################################################# + +include_directories( + ${TQT_INCLUDE_DIRS} + ${ARTS_INCLUDE_DIRS} + ${CMAKE_CURRENT_BINARY_DIR} + ${CMAKE_BINARY_DIR}/tdecore + ${CMAKE_SOURCE_DIR} + ${CMAKE_SOURCE_DIR}/dcop + ${CMAKE_SOURCE_DIR}/interfaces + ${CMAKE_SOURCE_DIR}/tdecore + ${CMAKE_SOURCE_DIR}/tdeui + ${CMAKE_SOURCE_DIR}/tdeio + ${CMAKE_SOURCE_DIR}/tdeio/tdeio + ${CMAKE_SOURCE_DIR}/tdeio/tdefile + ${CMAKE_SOURCE_DIR}/arts/kde +) + +link_directories( + ${TQT_LIBRARY_DIRS} + ${ARTS_LIBRARY_DIRS} +) + + +##### tdefileaudiopreview ######################### + +set( target tdefileaudiopreview ) + +set( ${target}_SRCS + tdefileaudiopreview.cpp +) + +tde_add_kpart( ${target} AUTOMOC + SOURCES ${${target}_SRCS} + LINK tdemediaplayer-shared artskde-shared + DESTINATION ${PLUGIN_INSTALL_DIR} +) diff --git a/interfaces/tdemediaplayer/tdefileaudiopreview/Makefile.am b/interfaces/tdemediaplayer/tdefileaudiopreview/Makefile.am new file mode 100644 index 000000000..d73cf545f --- /dev/null +++ b/interfaces/tdemediaplayer/tdefileaudiopreview/Makefile.am @@ -0,0 +1,13 @@ +INCLUDES = -I$(top_srcdir)/interfaces/ -I$(top_srcdir)/arts/kde -I$(includedir)/arts $(all_includes) +METASOURCES = AUTO + +kde_module_LTLIBRARIES = tdefileaudiopreview.la + +tdefileaudiopreview_la_SOURCES = tdefileaudiopreview.cpp +tdefileaudiopreview_la_LDFLAGS = $(all_libraries) $(KDE_RPATH) -module -avoid-version -no-undefined +tdefileaudiopreview_la_LIBADD = $(top_builddir)/interfaces/tdemediaplayer/libtdemediaplayer.la $(top_builddir)/arts/kde/libartskde.la $(LIB_KIO) $(LIB_QT) $(LIB_TDECORE) + +noinst_HEADERS = tdefileaudiopreview.h + +messages: + $(XGETTEXT) $(tdefileaudiopreview_la_SOURCES) -o $(podir)/tdefileaudiopreview.pot diff --git a/interfaces/tdemediaplayer/tdefileaudiopreview/tdefileaudiopreview.cpp b/interfaces/tdemediaplayer/tdefileaudiopreview/tdefileaudiopreview.cpp new file mode 100644 index 000000000..7dd746c4f --- /dev/null +++ b/interfaces/tdemediaplayer/tdefileaudiopreview/tdefileaudiopreview.cpp @@ -0,0 +1,146 @@ +#include "tdefileaudiopreview.h" + +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include + +#include + +#include + +class KFileAudioPreviewFactory : public KLibFactory +{ +protected: + virtual TQObject *createObject( TQObject *parent, const char *name, + const char *className, const TQStringList & args) + { + Q_UNUSED(className); + Q_UNUSED(args); + return TQT_TQOBJECT(new KFileAudioPreview( dynamic_cast( parent ), name )); + } +}; + +K_EXPORT_COMPONENT_FACTORY( tdefileaudiopreview, KFileAudioPreviewFactory ) + + +/////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////// + + +class KFileAudioPreview::KFileAudioPreviewPrivate +{ +public: + KFileAudioPreviewPrivate( TQWidget *parent ) + { + player = KParts::ComponentFactory::createInstanceFromQuery( "KMediaPlayer/Player", TQString(), TQT_TQOBJECT(parent) ); + } + + ~KFileAudioPreviewPrivate() + { + delete player; + } + + KMediaPlayer::Player *player; +}; + + +KFileAudioPreview::KFileAudioPreview( TQWidget *parent, const char *name ) + : KPreviewWidgetBase( parent, name ) +{ + TDEGlobal::locale()->insertCatalogue("tdefileaudiopreview"); + + TQStringList formats = KDE::PlayObjectFactory::mimeTypes(); + // ### + TQStringList::ConstIterator it = formats.begin(); + for ( ; it != formats.end(); ++it ) + m_supportedFormats.insert( *it, (void*) 1 ); + + TQVGroupBox *box = new TQVGroupBox( i18n("Media Player"), this ); + TQVBoxLayout *layout = new TQVBoxLayout( this ); + layout->addWidget( box ); + + (void) new TQWidget( box ); // spacer + + d = new KFileAudioPreviewPrivate( 0L ); // not box -- being reparented anyway + if ( d->player ) // only if there actually is a component... + { + setSupportedMimeTypes( formats ); + KMediaPlayer::View *view = d->player->view(); + view->setEnabled( false ); + + // if we have access to the video widget, show it above the player + // So, reparent first the video widget, then the view. + if ( view->videoWidget() ) + { + TQHBox *frame = new TQHBox( box ); + frame->setFrameStyle( TQFrame::Panel | TQFrame::Sunken ); + frame->setSizePolicy( TQSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Expanding ) ); + view->videoWidget()->reparent( frame, TQPoint(0,0) ); + } + + view->reparent( box, TQPoint(0,0) ); + } + + m_autoPlay = new TQCheckBox( i18n("Play &automatically"), box ); + TDEConfigGroup config( TDEGlobal::config(), ConfigGroup ); + m_autoPlay->setChecked( config.readBoolEntry( "Autoplay sounds", true ) ); + connect( m_autoPlay, TQT_SIGNAL(toggled(bool)), TQT_SLOT(toggleAuto(bool)) ); +} + +KFileAudioPreview::~KFileAudioPreview() +{ + TDEConfigGroup config( TDEGlobal::config(), ConfigGroup ); + config.writeEntry( "Autoplay sounds", m_autoPlay->isChecked() ); + + delete d; +} + +void KFileAudioPreview::showPreview( const KURL &url ) +{ + if ( !d->player || !url.isValid() ) + return; + + KMimeType::Ptr mt = KMimeType::findByURL( url ); + bool supported = m_supportedFormats.find( mt->name() ); + d->player->view()->setEnabled( supported ); + if ( !supported ) + return; + + static_cast(d->player)->openURL( url ); + if ( m_autoPlay->isChecked() ) + d->player->play(); +} + +void KFileAudioPreview::clearPreview() +{ + if ( d->player ) + { + d->player->stop(); + d->player->closeURL(); + } +} + +void KFileAudioPreview::toggleAuto( bool on ) +{ + if ( !d->player ) + return; + + if ( on && m_currentURL.isValid() && d->player->view()->isEnabled() ) + d->player->play(); + else + d->player->stop(); +} + +void KFileAudioPreview::virtual_hook( int, void* ) +{} + +#include "tdefileaudiopreview.moc" diff --git a/interfaces/tdemediaplayer/tdefileaudiopreview/tdefileaudiopreview.h b/interfaces/tdemediaplayer/tdefileaudiopreview/tdefileaudiopreview.h new file mode 100644 index 000000000..de48e4712 --- /dev/null +++ b/interfaces/tdemediaplayer/tdefileaudiopreview/tdefileaudiopreview.h @@ -0,0 +1,64 @@ +/* This file is part of the KDE libraries + Copyright (C) 2003 Carsten Pfeiffer + + library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation, version 2. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#ifndef KFILEAUDIOPREVIEW_H +#define KFILEAUDIOPREVIEW_H + +#include + +#include +#include + +class TQCheckBox; +class TQPushButton; +class TQLabel; + +class KFileDialog; +class KFileItem; + +/** + * Audio "preview" widget for the file dialog. + */ +class KFileAudioPreview : public KPreviewWidgetBase +{ + Q_OBJECT + +public: + KFileAudioPreview(TQWidget *parent = 0, const char *name = 0 ); + ~KFileAudioPreview(); + +public slots: + virtual void showPreview(const KURL &url); + virtual void clearPreview(); + +private slots: + void toggleAuto(bool); + +private: + TQDict m_supportedFormats; + KURL m_currentURL; + TQCheckBox *m_autoPlay; + +protected: + virtual void virtual_hook( int id, void* data ); +private: + class KFileAudioPreviewPrivate; + KFileAudioPreviewPrivate *d; +}; + +#endif // KFILEAUDIOPREVIEW_H diff --git a/interfaces/tdescript/CMakeLists.txt b/interfaces/tdescript/CMakeLists.txt index bcddb1068..6b57cdeb9 100644 --- a/interfaces/tdescript/CMakeLists.txt +++ b/interfaces/tdescript/CMakeLists.txt @@ -19,8 +19,8 @@ include_directories( ${CMAKE_SOURCE_DIR} ${CMAKE_SOURCE_DIR}/tdecore ${CMAKE_SOURCE_DIR}/tdeui - ${CMAKE_SOURCE_DIR}/kio - ${CMAKE_SOURCE_DIR}/kio/kio + ${CMAKE_SOURCE_DIR}/tdeio + ${CMAKE_SOURCE_DIR}/tdeio/tdeio ) link_directories( @@ -51,6 +51,6 @@ set( ${target}_SRCS tde_add_library( ${target} SHARED AUTOMOC SOURCES ${${target}_SRCS} VERSION 0.0.0 - LINK kio-shared + LINK tdeio-shared DESTINATION ${LIB_INSTALL_DIR} ) diff --git a/interfaces/tdescript/Makefile.am b/interfaces/tdescript/Makefile.am index 55d4cac35..03c7efc87 100644 --- a/interfaces/tdescript/Makefile.am +++ b/interfaces/tdescript/Makefile.am @@ -1,6 +1,6 @@ SUBDIRS = . sample -INCLUDES = -I$(top_srcdir)/kio -I$(top_srcdir) -I$(srcdir) -I$(srcdir)/.. $(all_includes) +INCLUDES = -I$(top_srcdir)/tdeio -I$(top_srcdir) -I$(srcdir) -I$(srcdir)/.. $(all_includes) #lib_LTLIBRARIES = libtdescriptloader.la libtdescript.la lib_LTLIBRARIES = libtdescript.la diff --git a/interfaces/tdescript/sample/Makefile.am b/interfaces/tdescript/sample/Makefile.am index 77d39b28c..e20854c70 100644 --- a/interfaces/tdescript/sample/Makefile.am +++ b/interfaces/tdescript/sample/Makefile.am @@ -1,4 +1,4 @@ -INCLUDES = -I$(top_srcdir)/kio -I$(top_srcdir)/interfaces -I$(srcdir) -I$(top_srcdir) -I$(top_srcdir)/interfaces/tdescript $(all_includes) +INCLUDES = -I$(top_srcdir)/tdeio -I$(top_srcdir)/interfaces -I$(srcdir) -I$(top_srcdir) -I$(top_srcdir)/interfaces/tdescript $(all_includes) kde_module_LTLIBRARIES = libshellscript.la diff --git a/interfaces/tdescript/scriptloader.cpp b/interfaces/tdescript/scriptloader.cpp index 79fa2055a..1ff34f98a 100644 --- a/interfaces/tdescript/scriptloader.cpp +++ b/interfaces/tdescript/scriptloader.cpp @@ -23,7 +23,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/interfaces/tdetexteditor/CMakeLists.txt b/interfaces/tdetexteditor/CMakeLists.txt index a9d39edbb..0808a84f3 100644 --- a/interfaces/tdetexteditor/CMakeLists.txt +++ b/interfaces/tdetexteditor/CMakeLists.txt @@ -20,8 +20,8 @@ include_directories( ${CMAKE_SOURCE_DIR}/dcop ${CMAKE_SOURCE_DIR}/tdecore ${CMAKE_SOURCE_DIR}/tdeui - ${CMAKE_SOURCE_DIR}/kio - ${CMAKE_SOURCE_DIR}/kio/kio + ${CMAKE_SOURCE_DIR}/tdeio + ${CMAKE_SOURCE_DIR}/tdeio/tdeio ${CMAKE_SOURCE_DIR}/kabc ${CMAKE_SOURCE_DIR}/interfaces ) diff --git a/interfaces/tdetexteditor/Makefile.am b/interfaces/tdetexteditor/Makefile.am index 5663bb761..fce0ec563 100644 --- a/interfaces/tdetexteditor/Makefile.am +++ b/interfaces/tdetexteditor/Makefile.am @@ -1,4 +1,4 @@ -INCLUDES = -I$(top_srcdir)/kio -I$(top_srcdir) -I$(top_srcdir)/interfaces -I$(top_builddir)/interfaces -I$(top_srcdir)/kabc -I$(top_builddir)/kabc $(all_includes) +INCLUDES = -I$(top_srcdir)/tdeio -I$(top_srcdir) -I$(top_srcdir)/interfaces -I$(top_builddir)/interfaces -I$(top_srcdir)/kabc -I$(top_builddir)/kabc $(all_includes) lib_LTLIBRARIES = libtdetexteditor.la diff --git a/interfaces/tdetexteditor/configinterface.h b/interfaces/tdetexteditor/configinterface.h index ed6a80d81..10a6173a0 100644 --- a/interfaces/tdetexteditor/configinterface.h +++ b/interfaces/tdetexteditor/configinterface.h @@ -57,7 +57,7 @@ class KTEXTEDITOR_EXPORT ConfigInterface virtual void writeConfig () = 0; /** - Read/Write the config of the part to a given kconfig object + Read/Write the config of the part to a given tdeconfig object to store the settings in a different place than the standard */ virtual void readConfig (TDEConfig *) = 0; diff --git a/interfaces/tdetexteditor/editorchooser.cpp b/interfaces/tdetexteditor/editorchooser.cpp index 807d342d0..ce493018d 100644 --- a/interfaces/tdetexteditor/editorchooser.cpp +++ b/interfaces/tdetexteditor/editorchooser.cpp @@ -3,7 +3,7 @@ #include #include -#include +#include #include #include #include diff --git a/kabc/CMakeLists.txt b/kabc/CMakeLists.txt index 5f2619cf9..57c4741fe 100644 --- a/kabc/CMakeLists.txt +++ b/kabc/CMakeLists.txt @@ -29,8 +29,8 @@ include_directories( ${CMAKE_SOURCE_DIR}/dcop ${CMAKE_SOURCE_DIR}/tdecore ${CMAKE_SOURCE_DIR}/tdeui - ${CMAKE_SOURCE_DIR}/kio - ${CMAKE_SOURCE_DIR}/kio/kio + ${CMAKE_SOURCE_DIR}/tdeio + ${CMAKE_SOURCE_DIR}/tdeio/tdeio ${CMAKE_SOURCE_DIR}/kab ) @@ -58,7 +58,7 @@ install( FILES ##### other data ################################ -install( FILES kab2kabc.desktop DESTINATION ${AUTOSTART_INSTALL_DIR} ) +install( FILES tdeab2tdeabc.desktop DESTINATION ${AUTOSTART_INSTALL_DIR} ) install( FILES kabc_manager.desktop DESTINATION ${SERVICES_INSTALL_DIR}/tderesources ) install( FILES countrytransl.map DESTINATION ${DATA_INSTALL_DIR}/kabc ) @@ -102,18 +102,18 @@ set( ${target}_SRCS tde_add_library( ${target} SHARED AUTOMOC SOURCES ${${target}_SRCS} VERSION 1.2.0 - LINK vcards-static vcard-shared kio-shared tderesources-shared + LINK vcards-static vcard-shared tdeio-shared tderesources-shared DEPENDENCIES addressee.h dcopidl DESTINATION ${LIB_INSTALL_DIR} ) -##### kab2kabc ################################## +##### tdeab2tdeabc ################################## -set( target kab2kabc ) +set( target tdeab2tdeabc ) set( ${target}_SRCS - kab2kabc.cpp + tdeab2tdeabc.cpp ) tde_add_executable( ${target} diff --git a/kabc/Makefile.am b/kabc/Makefile.am index ef989662f..57e72aec2 100644 --- a/kabc/Makefile.am +++ b/kabc/Makefile.am @@ -50,13 +50,13 @@ kabcinclude_HEADERS = address.h addressbook.h addressee.h addresseedialog.h \ METASOURCES = AUTO -bin_PROGRAMS = kab2kabc +bin_PROGRAMS = tdeab2tdeabc -kab2kabc_LDFLAGS = $(all_libraries) $(KDE_RPATH) $(LIB_QT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_KIO) -ltdetexteditor -kab2kabc_LDADD = libkabc.la ../kab/libkab.la -kab2kabc_SOURCES = kab2kabc.cpp +tdeab2tdeabc_LDFLAGS = $(all_libraries) $(KDE_RPATH) $(LIB_QT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_KIO) -ltdetexteditor +tdeab2tdeabc_LDADD = libkabc.la ../kab/libkab.la +tdeab2tdeabc_SOURCES = tdeab2tdeabc.cpp -autostart_DATA = kab2kabc.desktop +autostart_DATA = tdeab2tdeabc.desktop autostartdir = $(datadir)/autostart manager_DATA = kabc_manager.desktop diff --git a/kabc/addresseehelper.cpp b/kabc/addresseehelper.cpp index 908795869..5b8998852 100644 --- a/kabc/addresseehelper.cpp +++ b/kabc/addresseehelper.cpp @@ -19,7 +19,7 @@ #include -#include +#include #include #include "addresseehelper.h" diff --git a/kabc/addresslineedit.cpp b/kabc/addresslineedit.cpp index 76d99f634..efb0738aa 100644 --- a/kabc/addresslineedit.cpp +++ b/kabc/addresslineedit.cpp @@ -33,7 +33,7 @@ #include #include -#include +#include #include #include #include diff --git a/kabc/formatfactory.h b/kabc/formatfactory.h index 76a3704d5..ff9da5504 100644 --- a/kabc/formatfactory.h +++ b/kabc/formatfactory.h @@ -24,7 +24,7 @@ #include #include -#include +#include #include #include "formatplugin.h" diff --git a/kabc/formats/CMakeLists.txt b/kabc/formats/CMakeLists.txt index 327cb1ea6..60ea1c3fd 100644 --- a/kabc/formats/CMakeLists.txt +++ b/kabc/formats/CMakeLists.txt @@ -18,8 +18,8 @@ include_directories( ${CMAKE_SOURCE_DIR} ${CMAKE_SOURCE_DIR}/dcop ${CMAKE_SOURCE_DIR}/tdecore - ${CMAKE_SOURCE_DIR}/kio - ${CMAKE_SOURCE_DIR}/kio/kio + ${CMAKE_SOURCE_DIR}/tdeio + ${CMAKE_SOURCE_DIR}/tdeio/tdeio ) link_directories( diff --git a/kabc/kab2kabc.cpp b/kabc/kab2kabc.cpp deleted file mode 100644 index 11b80639a..000000000 --- a/kabc/kab2kabc.cpp +++ /dev/null @@ -1,476 +0,0 @@ -/* - This file is part of libkabc. - Copyright (c) 2001 Cornelius Schumacher - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include "addressbook.h" -#include "stdaddressbook.h" - -using namespace KABC; - -static const KCmdLineOptions options[] = -{ - { "disable-autostart", I18N_NOOP( "Disable automatic startup on login" ), 0 }, - { "quiet", "", 0 }, - { "o", 0, 0 }, - { "override", I18N_NOOP( "Override existing entries" ), "1" }, - KCmdLineLastOption -}; - -void readKMailEntry( const TQString &kmailEntry, KABC::AddressBook *ab ) -{ - kdDebug() << "KMAILENTRY: " << kmailEntry << endl; - - TQString entry = kmailEntry.simplifyWhiteSpace(); - if ( entry.isEmpty() ) return; - - TQString email; - TQString name; - TQString comment; - - if ( entry.at( entry.length() -1 ) == ')' ) { - int br = entry.findRev( '(' ); - if ( br >= 0 ) { - comment = entry.mid( br + 1, entry.length() - br - 2 ); - entry.truncate( br ); - if ( entry.at( entry.length() - 1 ).isSpace() ) { - entry.truncate( br - 1 ); - } - } - } - - int posSpace = entry.findRev( ' ' ); - if ( posSpace < 0 ) { - email = entry; - if ( !comment.isEmpty() ) { - name = comment; - comment = ""; - } - } else { - email = entry.mid( posSpace + 1 ); - name = entry.left( posSpace ); - } - - if ( email.at( 0 ) == '<' && email.at( email.length() - 1) == '>' ) { - email = email.mid( 1, email.length() - 2 ); - } - if ( name.at( 0 ) == '"' && name.at( name.length() - 1) == '"' ) { - name = name.mid( 1, name.length() - 2 ); - } - if ( name.at( 0 ) == '\'' && name.at( name.length() - 1) == '\'' ) { - name = name.mid( 1, name.length() - 2 ); - } - - if ( name.at( name.length() -1 ) == ')' ) { - int br = name.findRev( '(' ); - if ( br >= 0 ) { - comment = name.mid( br + 1, name.length() - br - 2 ) + " " + comment; - name.truncate( br ); - if ( name.at( name.length() - 1 ).isSpace() ) { - name.truncate( br - 1 ); - } - } - } - - kdDebug() << " EMAIL : " << email << endl; - kdDebug() << " NAME : " << name << endl; - kdDebug() << " COMMENT : " << comment << endl; - - KABC::Addressee::List al = ab->findByEmail( email ); - if ( al.isEmpty() ) { - KABC::Addressee a; - a.setNameFromString( name ); - a.insertEmail( email ); - a.setNote( comment ); - - ab->insertAddressee( a ); - - kdDebug() << "--INSERTED: " << a.realName() << endl; - } -} - -void importKMailAddressBook( KABC::AddressBook *ab ) -{ - TQString fileName = locateLocal( "data", "kmail/addressbook" ); - TQString kmailConfigName = locate( "config", "kmailrc" ); - if ( !kmailConfigName.isEmpty() ) { - TDEConfig cfg( kmailConfigName ); - cfg.setGroup( "Addressbook" ); - fileName = cfg.readPathEntry( "default", fileName ); - } - if ( !KStandardDirs::exists( fileName ) ) { - kdDebug(5700) << "Couldn't find KMail addressbook." << endl; - return; - } - - TQFile f( fileName ); - if ( !f.open(IO_ReadOnly) ) { - kdDebug(5700) << "Couldn't open file '" << fileName << "'" << endl; - return; - } - - TQStringList kmailEntries; - - TQTextStream t( &f ); - while ( !t.eof() ) { - kmailEntries.append( t.readLine() ); - } - f.close(); - - TQStringList::ConstIterator it; - for ( it = kmailEntries.begin(); it != kmailEntries.end(); ++it ) { - if ( (*it).at( 0 ) == '#' ) continue; - bool insideQuote = false; - int end = (*it).length() - 1; - for ( int i = end; i; i-- ) { - if ( (*it).at( i ) == '"' ) { - if ( insideQuote ) - insideQuote = false; - else - insideQuote = true; - } else if ( (*it).at( i ) == ',' && !insideQuote ) { - readKMailEntry( (*it).mid( i + 1, end - i ), ab ); - end = i - 1; - } - } - - readKMailEntry( (*it).mid( 0, end + 1 ), ab ); - } -} - -void readKAddressBookEntries( const TQString &dataString, Addressee &a ) -{ - // Strip "KMail:1.0" prefix and "[EOS]" suffix. - TQString str = dataString.mid( 11, dataString.length() - 24 ); - - TQStringList entries = TQStringList::split( "\n[EOR]\n ", str ); - - Address homeAddress( Address::Home ); - Address businessAddress( Address::Work ); - Address otherAddress; - - TQStringList::ConstIterator it; - for ( it = entries.begin(); it != entries.end(); ++it ) { - int pos = (*it).find( "\n" ); - TQString fieldName = (*it).left( pos ); - TQString fieldValue = (*it).mid( pos + 2 ); - - if ( fieldName == "X-HomeFax" ) { - a.insertPhoneNumber( PhoneNumber( fieldValue, PhoneNumber::Home | - PhoneNumber::Fax ) ); - } else if ( fieldName == "X-OtherPhone" ) { - a.insertPhoneNumber( PhoneNumber( fieldValue, 0 ) ); - } else if ( fieldName == "X-PrimaryPhone" ) { - a.insertPhoneNumber( PhoneNumber( fieldValue, PhoneNumber::Pref ) ); - } else if ( fieldName == "X-BusinessFax" ) { - a.insertPhoneNumber( PhoneNumber( fieldValue, PhoneNumber::Work | - PhoneNumber::Fax ) ); - } else if ( fieldName == "X-CarPhone" ) { - a.insertPhoneNumber( PhoneNumber( fieldValue, PhoneNumber::Car ) ); - } else if ( fieldName == "X-MobilePhone" ) { - a.insertPhoneNumber( PhoneNumber( fieldValue, PhoneNumber::Cell ) ); - } else if ( fieldName == "X-ISDN" ) { - a.insertPhoneNumber( PhoneNumber( fieldValue, PhoneNumber::Isdn ) ); - } else if ( fieldName == "X-OtherFax" ) { - a.insertPhoneNumber( PhoneNumber( fieldValue, PhoneNumber::Fax ) ); - } else if ( fieldName == "X-Pager" ) { - a.insertPhoneNumber( PhoneNumber( fieldValue, PhoneNumber::Pager ) ); - } else if ( fieldName == "X-BusinessPhone" ) { - a.insertPhoneNumber( PhoneNumber( fieldValue, PhoneNumber::Work ) ); - } else if ( fieldName == "X-HomePhone" ) { - a.insertPhoneNumber( PhoneNumber( fieldValue, PhoneNumber::Home ) ); - } else if ( fieldName == "X-HomeAddress" ) { - homeAddress.setLabel( fieldValue ); - } else if ( fieldName == "X-HomeAddressStreet" ) { - homeAddress.setStreet( fieldValue ); - } else if ( fieldName == "X-HomeAddressCity" ) { - homeAddress.setLocality( fieldValue ); - } else if ( fieldName == "X-HomeAddressPostalCode" ) { - homeAddress.setPostalCode( fieldValue ); - } else if ( fieldName == "X-HomeAddressState" ) { - homeAddress.setRegion( fieldValue ); - } else if ( fieldName == "X-HomeAddressCountry" ) { - homeAddress.setCountry( fieldValue ); - } else if ( fieldName == "X-BusinessAddress" ) { - businessAddress.setLabel( fieldValue ); - } else if ( fieldName == "X-BusinessAddressStreet" ) { - businessAddress.setStreet( fieldValue ); - } else if ( fieldName == "X-BusinessAddressCity" ) { - businessAddress.setLocality( fieldValue ); - } else if ( fieldName == "X-BusinessAddressPostalCode" ) { - businessAddress.setPostalCode( fieldValue ); - } else if ( fieldName == "X-BusinessAddressState" ) { - businessAddress.setRegion( fieldValue ); - } else if ( fieldName == "X-BusinessAddressCountry" ) { - businessAddress.setCountry( fieldValue ); - } else if ( fieldName == "X-OtherAddress" ) { - otherAddress.setLabel( fieldValue ); - } else if ( fieldName == "X-OtherAddressStreet" ) { - otherAddress.setStreet( fieldValue ); - } else if ( fieldName == "X-OtherAddressCity" ) { - otherAddress.setLocality( fieldValue ); - } else if ( fieldName == "X-OtherAddressPostalCode" ) { - otherAddress.setPostalCode( fieldValue ); - } else if ( fieldName == "X-OtherAddressState" ) { - otherAddress.setRegion( fieldValue ); - } else if ( fieldName == "X-OtherAddressCountry" ) { - otherAddress.setCountry( fieldValue ); - } else if ( fieldName == "NICKNAME" ) { - a.setNickName( fieldValue ); - } else if ( fieldName == "ORG" ) { - a.setOrganization( fieldValue ); - } else if ( fieldName == "ROLE" ) { - a.setRole( fieldValue ); - } else if ( fieldName == "BDAY" ) { - a.setBirthday( TDEGlobal::locale()->readDate( fieldValue ) ); - } else if ( fieldName == "WEBPAGE" ) { - a.setUrl( KURL( fieldValue ) ); - } else if ( fieldName == "N" ) { - } else if ( fieldName == "X-FirstName" ) { - } else if ( fieldName == "X-MiddleName" ) { - } else if ( fieldName == "X-LastName" ) { - } else if ( fieldName == "X-Title" ) { - } else if ( fieldName == "X-Suffix" ) { - } else if ( fieldName == "X-FileAs" ) { - } else if ( fieldName == "EMAIL" ) { - a.insertEmail( fieldValue, true ); - } else if ( fieldName == "X-E-mail2" ) { - a.insertEmail( fieldValue ); - } else if ( fieldName == "X-E-mail3" ) { - a.insertEmail( fieldValue ); - } else if ( fieldName == "X-Notes" ) { - } else { - a.insertCustom( "KADDRESSBOOK", fieldName, fieldValue ); - } - } - - if ( !homeAddress.isEmpty() ) a.insertAddress( homeAddress ); - if ( !businessAddress.isEmpty() ) a.insertAddress( businessAddress ); - if ( !otherAddress.isEmpty() ) a.insertAddress( otherAddress ); -} - -void importKab( KABC::AddressBook *ab, bool override, bool quiet ) -{ - TQString fileName = TDEGlobal::dirs()->saveLocation( "data", "kab/" ); - fileName += "addressbook.kab"; - if ( !TQFile::exists( fileName ) ) { - if ( !quiet ) { - KMessageBox::error( 0, "" + i18n( "Address book file %1 not found! Make sure the old address book is located there and you have read permission for this file." ) - .arg( fileName ) + "" ); - } - kdDebug(5700) << "No KDE 2 addressbook found." << endl; - return; - } - - kdDebug(5700) << "Converting old-style kab addressbook to " - "new-style kabc addressbook." << endl; - - KabAPI kab( 0 ); - if ( kab.init() != ::AddressBook::NoError ) { - kdDebug(5700) << "Error initing kab" << endl; - exit( 1 ); - } - - KabKey key; - ::AddressBook::Entry entry; - - int num = kab.addressbook()->noOfEntries(); - - kdDebug(5700) << "kab Addressbook has " << num << " entries." << endl; - - for ( int i = 0; i < num; ++i ) { - if ( ::AddressBook::NoError != kab.addressbook()->getKey( i, key ) ) { - kdDebug(5700) << "Error getting key for index " << i << " from kab." << endl; - continue; - } - if ( ::AddressBook::NoError != kab.addressbook()->getEntry( key, entry ) ) { - kdDebug(5700) << "Error getting entry for index " << i << " from kab." << endl; - continue; - } - - Addressee a; - - // Convert custom entries - int count = 0; - bool idFound = false; - TQStringList::ConstIterator customIt; - for ( customIt = entry.custom.begin(); customIt != entry.custom.end(); ++customIt ) { - if ( (*customIt).startsWith( "X-KABC-UID:" ) ) { - a.setUid( (*customIt).mid( (*customIt).find( ":" ) + 1 ) ); - idFound = true; - } else if ( (*customIt).startsWith( "KMail:1.0\n" ) ) { - readKAddressBookEntries( *customIt, a ); - } else { - a.insertCustom( "kab2kabc", TQString::number( count++ ), *customIt ); - } - } - if ( idFound ) { - if ( !override ) continue; - } else { - entry.custom << "X-KABC-UID:" + a.uid(); - ::AddressBook::ErrorCode error = kab.addressbook()->change( key, entry ); - if ( error != ::AddressBook::NoError ) { - kdDebug(5700) << "kab.change returned with error " << error << endl; - } else { - kdDebug(5700) << "Wrote back to kab uid " << a.uid() << endl; - } - } - - a.setTitle( entry.title ); - a.setFormattedName( entry.fn ); - a.setPrefix( entry.nameprefix ); - a.setGivenName( entry.firstname ); - a.setAdditionalName( entry.middlename ); - a.setFamilyName( entry.lastname ); - a.setBirthday( entry.birthday ); - - TQStringList::ConstIterator emailIt; - for ( emailIt = entry.emails.begin(); emailIt != entry.emails.end(); ++emailIt ) - a.insertEmail( *emailIt ); - - TQStringList::ConstIterator phoneIt; - for ( phoneIt = entry.telephone.begin(); phoneIt != entry.telephone.end(); ++phoneIt ) { - int kabType = (*phoneIt++).toInt(); - if ( phoneIt == entry.telephone.end() ) break; - TQString number = *phoneIt; - int type = 0; - if ( kabType == ::AddressBook::Fixed ) type = PhoneNumber::Voice; - else if ( kabType == ::AddressBook::Mobile ) type = PhoneNumber::Cell | PhoneNumber::Voice; - else if ( kabType == ::AddressBook::Fax ) type = PhoneNumber::Fax; - else if ( kabType == ::AddressBook::Modem ) type = PhoneNumber::Modem; - a.insertPhoneNumber( PhoneNumber( number, type ) ); - } - - if ( entry.URLs.count() > 0 ) { - a.setUrl( KURL( entry.URLs.first() ) ); - if ( entry.URLs.count() > 1 ) { - kdWarning() << "More than one URL. Ignoring all but the first." << endl; - } - } - - int noAdr = entry.noOfAddresses(); - for ( int j = 0; j < noAdr; ++j ) { - ::AddressBook::Entry::Address kabAddress; - entry.getAddress( j, kabAddress ); - - Address adr; - - adr.setStreet( kabAddress.address ); - adr.setPostalCode( kabAddress.zip ); - adr.setLocality( kabAddress.town ); - adr.setCountry( kabAddress.country ); - adr.setRegion( kabAddress.state ); - - TQString label; - if ( !kabAddress.headline.isEmpty() ) label += kabAddress.headline + "\n"; - if ( !kabAddress.position.isEmpty() ) label += kabAddress.position + "\n"; - if ( !kabAddress.org.isEmpty() ) label += kabAddress.org + "\n"; - if ( !kabAddress.orgUnit.isEmpty() ) label += kabAddress.orgUnit + "\n"; - if ( !kabAddress.orgSubUnit.isEmpty() ) label += kabAddress.orgSubUnit + "\n"; - if ( !kabAddress.deliveryLabel.isEmpty() ) label += kabAddress.deliveryLabel + "\n"; - adr.setLabel( label ); - - a.insertAddress( adr ); - } - - TQString note = entry.comment; - - if ( !entry.user1.isEmpty() ) note += "\nUser1: " + entry.user1; - if ( !entry.user2.isEmpty() ) note += "\nUser2: " + entry.user2; - if ( !entry.user3.isEmpty() ) note += "\nUser3: " + entry.user3; - if ( !entry.user4.isEmpty() ) note += "\nUser4: " + entry.user4; - - if ( !entry.keywords.count() == 0 ) note += "\nKeywords: " + entry.keywords.join( ", " ); - - TQStringList::ConstIterator talkIt; - for ( talkIt = entry.talk.begin(); talkIt != entry.talk.end(); ++talkIt ) { - note += "\nTalk: " + (*talkIt); - } - - a.setNote( note ); - - a.setPrefix( entry.rank + a.prefix() ); // Add rank to prefix - - a.setCategories( entry.categories ); - - kdDebug(5700) << "Addressee: " << a.familyName() << endl; - - ab->insertAddressee( a ); - } - - kab.save( true ); -} - -int main( int argc, char **argv ) -{ - TDEAboutData aboutData( "kab2kabc", I18N_NOOP( "Kab to Kabc Converter" ), "0.1" ); - aboutData.addAuthor( "Cornelius Schumacher", 0, "schumacher@kde.org" ); - - TDECmdLineArgs::init( argc, argv, &aboutData ); - TDECmdLineArgs::addCmdLineOptions( options ); - - TDEApplication app; - - TDECmdLineArgs *args = TDECmdLineArgs::parsedArgs(); - - bool override = false; - - if ( args->isSet( "override" ) ) { - kdDebug() << "Override existing entries." << endl; - - override = true; - } - - bool quiet = false; - - if ( args->isSet( "quiet" ) ) - quiet = true; - - if ( args->isSet( "disable-autostart" ) ) { - kdDebug() << "Disable autostart." << endl; - - TDEConfig *config = app.config(); - config->setGroup( "Startup" ); - config->writeEntry( "EnableAutostart", false ); - } - - KABC::AddressBook *kabcBook = StdAddressBook::self(); - - importKMailAddressBook( kabcBook ); - - importKab( kabcBook, override, quiet ); - - StdAddressBook::save(); - - kdDebug(5700) << "Saved kabc addressbook to '" << kabcBook->identifier() << "'" << endl; -} - diff --git a/kabc/kab2kabc.desktop b/kabc/kab2kabc.desktop deleted file mode 100644 index 3015b3935..000000000 --- a/kabc/kab2kabc.desktop +++ /dev/null @@ -1,105 +0,0 @@ -[Desktop Entry] -Name=kab2kabc -Name[af]=kab-na-kabc -Name[csb]=Kònwersëjô adresowi knéżczi -Name[eo]=Konvertilo de "kab" al "kabc" -Name[fr]=KAB2KABC -Name[fy]=Kab2kabc -Name[hu]=Kab2kabc -Name[it]=Kab2Kabc -Name[nl]=Kab2kabc -Name[pl]=Konwersja książki adresowej -Name[pt_BR]=Conversão de kab para kabc -Name[ro]=Kab2kabc -Name[sv]=Kab2kabc -Name[te]=కెఎబి2కెఎబిసి -Name[zu]=i-kab2kabc -Exec=kab2kabc --disable-autostart --quiet -Icon=misc -Type=Application -Comment=libkab to libkabc conversion tool. -Comment[af]=libkab na libkabc omskakeling program. -Comment[ar]=أداة تحويل libkab إلى libkabc. -Comment[az]=libkab - libkabc dönüşdürmÉ™ vasitÉ™si. -Comment[be]=ІнÑтрумент пераўтварÑÐ½Ð½Ñ libkab у libkabc. -Comment[bg]=Програма за конвертиране на libkab до libkabc. -Comment[bn]=libkab থেকে libkabc-তে পরিবরà§à¦¤à¦¨ করার পà§à¦°à§‹à¦—à§à¦°à¦¾à¦®à¥¤ -Comment[bs]=alat za pretvaranje libkab u libkabc. -Comment[ca]=Eina de conversió de libkab a libkabc. -Comment[cs]=PÅ™evod dat z libkab do libkabc. -Comment[csb]=Nôrzãdze do kònwersëji z libkab do libkabc. -Comment[cy]=erfyn trosi libkab i libkabc -Comment[da]=libkab-til-libkabc-konverteringsværktøj. -Comment[de]=Konvertierung von libkab in libkabc -Comment[el]=ΕÏγαλείο μετατÏοπής από το libkab στο libkabc. -Comment[eo]=Konvertilo de "libkab" al "libkabc" -Comment[es]=Conversor libkab a libkabc. -Comment[et]=libkab -> libkabc teisendamine -Comment[eu]=libkab-etik libkabc-era bihurtzeko tresna. -Comment[fa]=ابزار تبدیل libkab به libcabc. -Comment[fi]=libkab-libkabc -muunnin -Comment[fr]=Outil de conversion de libkab vers libkabc. -Comment[fy]=Konversjeprogramma fan libkab nei libkabc. -Comment[ga]=Uirlis tiontaithe ó libkab go libkabc. -Comment[gl]=Ferramenta de conversión de libkab a libkabc. -Comment[he]=כלי המרה מ־libkab ל־libkabc -Comment[hi]=libkab से libkabc बदलने वाला औजार -Comment[hr]=Alat za pretvaranje iz libkab u libkabc -Comment[hsb]=libkab -> libkabc konwerter -Comment[hu]=libkab -> libkabc konvertáló. -Comment[id]=konverter libkab ke libkabc. -Comment[is]=libkab í libkabc breytingatól. -Comment[it]=Strumento di conversione da libkab a libkabc. -Comment[ja]=libkab ã‹ã‚‰ libkabc ã¸ã®å¤‰æ›ãƒ„ール -Comment[ka]=libkab => libkabc გáƒáƒ áƒ“áƒáƒ¥áƒ›áƒœáƒ˜áƒ¡ ხელსáƒáƒ¬áƒ§áƒ. -Comment[kk]=libkab дегеннен libkabc дегенге айналдыру құралы. -Comment[km]=ឧបករណáŸâ€‹áž”ម្លែង​ពី libkab ទៅ libkabc -Comment[ko]=libkabì„ libkabc로 바꿔주는 연장. -Comment[lb]=libkab op libkabc Konvertéierungs-Hëllefsmëttel. -Comment[lt]=libkab į libkabc konvertavimo įrankis. -Comment[lv]=libkab uz libkabc kovertēšanas rÄ«ks. -Comment[mk]=алатка за претворање од libkab во libkabc. -Comment[mn]=libkab-Ð°Ð°Ñ libkabc-руу хөрвүүлÑгч -Comment[ms]=perkakasan penukaran libkab to libkabc. -Comment[mt]=Għodda għall-konverżjoni libkab għal libkabc -Comment[nb]=libkab til libkabc konverteringsverktøy. -Comment[nds]=Warktüüch för't Ümwanneln vun libkab na libkabc. -Comment[ne]=libkab to libkabc रूपानà¥à¤¤à¤°à¤£ उपकरण । -Comment[nl]=Conversieprogramma van libkab naar libkabc. -Comment[nn]=Konverterer libkab til libkabc -Comment[nso]=Sebereka sa phetosetso ya libkab go libkabc -Comment[pa]=libkab ਤੋ libkabc ਤਬਦੀਲੀ ਸੰਦ। -Comment[pl]=NarzÄ™dzie do konwersji z libkab do libkabc. -Comment[pt]=Ferramenta de conversão de libkab para libkabc. -Comment[pt_BR]=Ferramenta de conversão de libkab para libkabc. -Comment[ro]=Utilitar de conversie de la "libkab" la "libkabc". -Comment[ru]=утилита Ð¿Ñ€ÐµÐ¾Ð±Ñ€Ð°Ð·Ð¾Ð²Ð°Ð½Ð¸Ñ libkab в libkabc. -Comment[rw]=Igikoresho cy'ihindura libkab muri libkabc. -Comment[se]=konverterenreaidu libkab:as libkabc:ai -Comment[sk]=Prevod dát z libkab do libkabc. -Comment[sl]=Orodje za pretvorbo iz libkab v libkabc -Comment[sq]=Vegla për shëndrimin e libkab në libkabc. -Comment[sr]=Ðлат за конверзију из libkab-а у libkabc. -Comment[sr@Latn]=Alat za konverziju iz libkab-a u libkabc. -Comment[ss]=Lithulusi lekutjintja le-libkab kuya ku-libkabc. -Comment[sv]=Konverteringsverktyg frÃ¥n libkab till libkabc -Comment[ta]=libkab இலிரà¯à®¨à¯à®¤à¯ libkabc கà¯à®•௠மாறà¯à®±à¯à®®à¯ கரà¯à®µà®¿. -Comment[te]=libkab à°¨à±à°‚à°šà°¿ libkabc కౠమారà±à°šà± పనిమà±à°Ÿà±à°Ÿà± -Comment[tg]=аÑбоби дигаргунÑози libkab ба libkabc -Comment[th]=เครื่องมือเปลี่ยน libkab เป็น libkabc -Comment[tr]=libkab' tan libkabc' ye dönüştürme aracı -Comment[tt]=libkab-›libkabc äyländerü qoralı. -Comment[uk]=ЗаÑіб Ð¿ÐµÑ€ÐµÑ‚Ð²Ð¾Ñ€ÐµÐ½Ð½Ñ libkab до libkabc. -Comment[uz]=libkab'ni libkabc'ga aylantiradigan vosita. -Comment[uz@cyrillic]=libkab'ни libkabc'га айлантирадиган воÑита. -Comment[ven]=Tshishumiswa tsha u shandukisa libkab itshi ya kha libkabc -Comment[vi]=Công cụ chuyển đổi libkab sang libkabc. -Comment[xh]=libkab kwi libkabc isixhobo sokuguqulela. -Comment[zh_CN]=libkab 到 libkabc 的转æ¢å·¥å…·ã€‚ -Comment[zh_HK]=libkab 至 libkabc 的轉æ›å·¥å…· -Comment[zh_TW]=libkab 至 libkabc 轉æ›å·¥å…· -Comment[zu]=Ithuluzi lokuguqula le-libkab kuyaku-libkabc -Terminal=false -NoDisplay=true -X-TDE-autostart-condition=kab2kabcrc:Startup:EnableAutostart:true -OnlyShowIn=TDE; diff --git a/kabc/ldapclient.cpp b/kabc/ldapclient.cpp index 568408ba2..f696ae915 100644 --- a/kabc/ldapclient.cpp +++ b/kabc/ldapclient.cpp @@ -30,7 +30,7 @@ #include #include -#include +#include #include #include #include diff --git a/kabc/ldapclient.h b/kabc/ldapclient.h index 5f8513599..f43a644ce 100644 --- a/kabc/ldapclient.h +++ b/kabc/ldapclient.h @@ -31,7 +31,7 @@ #include #include -#include +#include namespace KABC { diff --git a/kabc/ldapconfigwidget.h b/kabc/ldapconfigwidget.h index 0fd0dd7e5..01074292e 100644 --- a/kabc/ldapconfigwidget.h +++ b/kabc/ldapconfigwidget.h @@ -27,7 +27,7 @@ #include #include -#include +#include class TQGridLayout; class TQSpinBox; diff --git a/kabc/plugins/dir/CMakeLists.txt b/kabc/plugins/dir/CMakeLists.txt index 47f81a355..737d1144e 100644 --- a/kabc/plugins/dir/CMakeLists.txt +++ b/kabc/plugins/dir/CMakeLists.txt @@ -20,9 +20,9 @@ include_directories( ${CMAKE_SOURCE_DIR}/dcop ${CMAKE_SOURCE_DIR}/tdecore ${CMAKE_SOURCE_DIR}/tdeui - ${CMAKE_SOURCE_DIR}/kio - ${CMAKE_SOURCE_DIR}/kio/kio - ${CMAKE_SOURCE_DIR}/kio/kfile + ${CMAKE_SOURCE_DIR}/tdeio + ${CMAKE_SOURCE_DIR}/tdeio/tdeio + ${CMAKE_SOURCE_DIR}/tdeio/tdefile ) link_directories( diff --git a/kabc/plugins/dir/resourcedir.cpp b/kabc/plugins/dir/resourcedir.cpp index 0dfd0352a..6b1759f1d 100644 --- a/kabc/plugins/dir/resourcedir.cpp +++ b/kabc/plugins/dir/resourcedir.cpp @@ -29,7 +29,7 @@ #include #include -#include +#include #include #include #include diff --git a/kabc/plugins/dir/resourcedir.h b/kabc/plugins/dir/resourcedir.h index a7b041643..f62ee91ba 100644 --- a/kabc/plugins/dir/resourcedir.h +++ b/kabc/plugins/dir/resourcedir.h @@ -21,7 +21,7 @@ #ifndef KABC_RESOURCEDIR_H #define KABC_RESOURCEDIR_H -#include +#include #include #include diff --git a/kabc/plugins/file/CMakeLists.txt b/kabc/plugins/file/CMakeLists.txt index 3dbcd639f..f8847d7e9 100644 --- a/kabc/plugins/file/CMakeLists.txt +++ b/kabc/plugins/file/CMakeLists.txt @@ -20,9 +20,9 @@ include_directories( ${CMAKE_SOURCE_DIR}/dcop ${CMAKE_SOURCE_DIR}/tdecore ${CMAKE_SOURCE_DIR}/tdeui - ${CMAKE_SOURCE_DIR}/kio - ${CMAKE_SOURCE_DIR}/kio/kio - ${CMAKE_SOURCE_DIR}/kio/kfile + ${CMAKE_SOURCE_DIR}/tdeio + ${CMAKE_SOURCE_DIR}/tdeio/tdeio + ${CMAKE_SOURCE_DIR}/tdeio/tdefile ) link_directories( diff --git a/kabc/plugins/file/resourcefile.cpp b/kabc/plugins/file/resourcefile.cpp index 3e5b1fa8f..2d2008c0d 100644 --- a/kabc/plugins/file/resourcefile.cpp +++ b/kabc/plugins/file/resourcefile.cpp @@ -30,9 +30,9 @@ #include #include -#include +#include #include -#include +#include #include #include #include diff --git a/kabc/plugins/file/resourcefile.h b/kabc/plugins/file/resourcefile.h index 494c43ea6..3d2efe85f 100644 --- a/kabc/plugins/file/resourcefile.h +++ b/kabc/plugins/file/resourcefile.h @@ -21,7 +21,7 @@ #ifndef KABC_RESOURCEFILE_H #define KABC_RESOURCEFILE_H -#include +#include #include #include diff --git a/kabc/plugins/ldapkio/CMakeLists.txt b/kabc/plugins/ldapkio/CMakeLists.txt index 150377bd9..0869c54e1 100644 --- a/kabc/plugins/ldapkio/CMakeLists.txt +++ b/kabc/plugins/ldapkio/CMakeLists.txt @@ -20,9 +20,9 @@ include_directories( ${CMAKE_SOURCE_DIR}/dcop ${CMAKE_SOURCE_DIR}/tdecore ${CMAKE_SOURCE_DIR}/tdeui - ${CMAKE_SOURCE_DIR}/kio - ${CMAKE_SOURCE_DIR}/kio/kio - ${CMAKE_SOURCE_DIR}/kio/kfiles + ${CMAKE_SOURCE_DIR}/tdeio + ${CMAKE_SOURCE_DIR}/tdeio/tdeio + ${CMAKE_SOURCE_DIR}/tdeio/tdefiles ) link_directories( @@ -68,6 +68,6 @@ set( ${target}_SRCS tde_add_kpart( ${target} SOURCES ${${target}_SRCS} - LINK kabc_ldapkio-shared + LINK kabc_ldaptdeio-shared DESTINATION ${PLUGIN_INSTALL_DIR} ) diff --git a/kabc/plugins/ldapkio/resourceldapkio.cpp b/kabc/plugins/ldapkio/resourceldapkio.cpp index cdf21fb82..034fb0ef8 100644 --- a/kabc/plugins/ldapkio/resourceldapkio.cpp +++ b/kabc/plugins/ldapkio/resourceldapkio.cpp @@ -29,12 +29,12 @@ #include #include #include -#include +#include #include #include #include -#include +#include #include #include diff --git a/kabc/plugins/ldapkio/resourceldapkio.h b/kabc/plugins/ldapkio/resourceldapkio.h index 6f40b12f8..5c9282b9c 100644 --- a/kabc/plugins/ldapkio/resourceldapkio.h +++ b/kabc/plugins/ldapkio/resourceldapkio.h @@ -24,7 +24,7 @@ #include #include -#include +#include class TDEConfig; diff --git a/kabc/plugins/ldapkio/resourceldapkioconfig.cpp b/kabc/plugins/ldapkio/resourceldapkioconfig.cpp index 53c72aa2b..b517cffa5 100644 --- a/kabc/plugins/ldapkio/resourceldapkioconfig.cpp +++ b/kabc/plugins/ldapkio/resourceldapkioconfig.cpp @@ -36,7 +36,7 @@ #include #include #include -#include +#include #include "resourceldapkio.h" diff --git a/kabc/plugins/net/CMakeLists.txt b/kabc/plugins/net/CMakeLists.txt index 365922d6c..e92fbfc32 100644 --- a/kabc/plugins/net/CMakeLists.txt +++ b/kabc/plugins/net/CMakeLists.txt @@ -20,9 +20,9 @@ include_directories( ${CMAKE_SOURCE_DIR}/dcop ${CMAKE_SOURCE_DIR}/tdecore ${CMAKE_SOURCE_DIR}/tdeui - ${CMAKE_SOURCE_DIR}/kio - ${CMAKE_SOURCE_DIR}/kio/kio - ${CMAKE_SOURCE_DIR}/kio/kfile + ${CMAKE_SOURCE_DIR}/tdeio + ${CMAKE_SOURCE_DIR}/tdeio/tdeio + ${CMAKE_SOURCE_DIR}/tdeio/tdefile ) link_directories( diff --git a/kabc/plugins/net/resourcenet.cpp b/kabc/plugins/net/resourcenet.cpp index 78fb16256..9ef909904 100644 --- a/kabc/plugins/net/resourcenet.cpp +++ b/kabc/plugins/net/resourcenet.cpp @@ -21,8 +21,8 @@ #include #include -#include -#include +#include +#include #include #include #include diff --git a/kabc/plugins/net/resourcenet.h b/kabc/plugins/net/resourcenet.h index a13bfa175..940627ecb 100644 --- a/kabc/plugins/net/resourcenet.h +++ b/kabc/plugins/net/resourcenet.h @@ -21,7 +21,7 @@ #ifndef KABC_RESOURCENET_H #define KABC_RESOURCENET_H -#include +#include #include diff --git a/kabc/plugins/sql/resourcesql.h b/kabc/plugins/sql/resourcesql.h index 9f1201844..770e5b73b 100644 --- a/kabc/plugins/sql/resourcesql.h +++ b/kabc/plugins/sql/resourcesql.h @@ -21,7 +21,7 @@ #ifndef KABC_RESOURCESQL_H #define KABC_RESOURCESQL_H -#include +#include #include "addressbook.h" #include "resource.h" diff --git a/kabc/scripts/field.src.cpp b/kabc/scripts/field.src.cpp index 6362d223c..2c80810b7 100644 --- a/kabc/scripts/field.src.cpp +++ b/kabc/scripts/field.src.cpp @@ -19,7 +19,7 @@ */ #include -#include +#include #include #include "field.h" diff --git a/kabc/tdeab2tdeabc.cpp b/kabc/tdeab2tdeabc.cpp new file mode 100644 index 000000000..afb688078 --- /dev/null +++ b/kabc/tdeab2tdeabc.cpp @@ -0,0 +1,476 @@ +/* + This file is part of libkabc. + Copyright (c) 2001 Cornelius Schumacher + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "addressbook.h" +#include "stdaddressbook.h" + +using namespace KABC; + +static const KCmdLineOptions options[] = +{ + { "disable-autostart", I18N_NOOP( "Disable automatic startup on login" ), 0 }, + { "quiet", "", 0 }, + { "o", 0, 0 }, + { "override", I18N_NOOP( "Override existing entries" ), "1" }, + KCmdLineLastOption +}; + +void readKMailEntry( const TQString &kmailEntry, KABC::AddressBook *ab ) +{ + kdDebug() << "KMAILENTRY: " << kmailEntry << endl; + + TQString entry = kmailEntry.simplifyWhiteSpace(); + if ( entry.isEmpty() ) return; + + TQString email; + TQString name; + TQString comment; + + if ( entry.at( entry.length() -1 ) == ')' ) { + int br = entry.findRev( '(' ); + if ( br >= 0 ) { + comment = entry.mid( br + 1, entry.length() - br - 2 ); + entry.truncate( br ); + if ( entry.at( entry.length() - 1 ).isSpace() ) { + entry.truncate( br - 1 ); + } + } + } + + int posSpace = entry.findRev( ' ' ); + if ( posSpace < 0 ) { + email = entry; + if ( !comment.isEmpty() ) { + name = comment; + comment = ""; + } + } else { + email = entry.mid( posSpace + 1 ); + name = entry.left( posSpace ); + } + + if ( email.at( 0 ) == '<' && email.at( email.length() - 1) == '>' ) { + email = email.mid( 1, email.length() - 2 ); + } + if ( name.at( 0 ) == '"' && name.at( name.length() - 1) == '"' ) { + name = name.mid( 1, name.length() - 2 ); + } + if ( name.at( 0 ) == '\'' && name.at( name.length() - 1) == '\'' ) { + name = name.mid( 1, name.length() - 2 ); + } + + if ( name.at( name.length() -1 ) == ')' ) { + int br = name.findRev( '(' ); + if ( br >= 0 ) { + comment = name.mid( br + 1, name.length() - br - 2 ) + " " + comment; + name.truncate( br ); + if ( name.at( name.length() - 1 ).isSpace() ) { + name.truncate( br - 1 ); + } + } + } + + kdDebug() << " EMAIL : " << email << endl; + kdDebug() << " NAME : " << name << endl; + kdDebug() << " COMMENT : " << comment << endl; + + KABC::Addressee::List al = ab->findByEmail( email ); + if ( al.isEmpty() ) { + KABC::Addressee a; + a.setNameFromString( name ); + a.insertEmail( email ); + a.setNote( comment ); + + ab->insertAddressee( a ); + + kdDebug() << "--INSERTED: " << a.realName() << endl; + } +} + +void importKMailAddressBook( KABC::AddressBook *ab ) +{ + TQString fileName = locateLocal( "data", "kmail/addressbook" ); + TQString kmailConfigName = locate( "config", "kmailrc" ); + if ( !kmailConfigName.isEmpty() ) { + TDEConfig cfg( kmailConfigName ); + cfg.setGroup( "Addressbook" ); + fileName = cfg.readPathEntry( "default", fileName ); + } + if ( !KStandardDirs::exists( fileName ) ) { + kdDebug(5700) << "Couldn't find KMail addressbook." << endl; + return; + } + + TQFile f( fileName ); + if ( !f.open(IO_ReadOnly) ) { + kdDebug(5700) << "Couldn't open file '" << fileName << "'" << endl; + return; + } + + TQStringList kmailEntries; + + TQTextStream t( &f ); + while ( !t.eof() ) { + kmailEntries.append( t.readLine() ); + } + f.close(); + + TQStringList::ConstIterator it; + for ( it = kmailEntries.begin(); it != kmailEntries.end(); ++it ) { + if ( (*it).at( 0 ) == '#' ) continue; + bool insideQuote = false; + int end = (*it).length() - 1; + for ( int i = end; i; i-- ) { + if ( (*it).at( i ) == '"' ) { + if ( insideQuote ) + insideQuote = false; + else + insideQuote = true; + } else if ( (*it).at( i ) == ',' && !insideQuote ) { + readKMailEntry( (*it).mid( i + 1, end - i ), ab ); + end = i - 1; + } + } + + readKMailEntry( (*it).mid( 0, end + 1 ), ab ); + } +} + +void readKAddressBookEntries( const TQString &dataString, Addressee &a ) +{ + // Strip "KMail:1.0" prefix and "[EOS]" suffix. + TQString str = dataString.mid( 11, dataString.length() - 24 ); + + TQStringList entries = TQStringList::split( "\n[EOR]\n ", str ); + + Address homeAddress( Address::Home ); + Address businessAddress( Address::Work ); + Address otherAddress; + + TQStringList::ConstIterator it; + for ( it = entries.begin(); it != entries.end(); ++it ) { + int pos = (*it).find( "\n" ); + TQString fieldName = (*it).left( pos ); + TQString fieldValue = (*it).mid( pos + 2 ); + + if ( fieldName == "X-HomeFax" ) { + a.insertPhoneNumber( PhoneNumber( fieldValue, PhoneNumber::Home | + PhoneNumber::Fax ) ); + } else if ( fieldName == "X-OtherPhone" ) { + a.insertPhoneNumber( PhoneNumber( fieldValue, 0 ) ); + } else if ( fieldName == "X-PrimaryPhone" ) { + a.insertPhoneNumber( PhoneNumber( fieldValue, PhoneNumber::Pref ) ); + } else if ( fieldName == "X-BusinessFax" ) { + a.insertPhoneNumber( PhoneNumber( fieldValue, PhoneNumber::Work | + PhoneNumber::Fax ) ); + } else if ( fieldName == "X-CarPhone" ) { + a.insertPhoneNumber( PhoneNumber( fieldValue, PhoneNumber::Car ) ); + } else if ( fieldName == "X-MobilePhone" ) { + a.insertPhoneNumber( PhoneNumber( fieldValue, PhoneNumber::Cell ) ); + } else if ( fieldName == "X-ISDN" ) { + a.insertPhoneNumber( PhoneNumber( fieldValue, PhoneNumber::Isdn ) ); + } else if ( fieldName == "X-OtherFax" ) { + a.insertPhoneNumber( PhoneNumber( fieldValue, PhoneNumber::Fax ) ); + } else if ( fieldName == "X-Pager" ) { + a.insertPhoneNumber( PhoneNumber( fieldValue, PhoneNumber::Pager ) ); + } else if ( fieldName == "X-BusinessPhone" ) { + a.insertPhoneNumber( PhoneNumber( fieldValue, PhoneNumber::Work ) ); + } else if ( fieldName == "X-HomePhone" ) { + a.insertPhoneNumber( PhoneNumber( fieldValue, PhoneNumber::Home ) ); + } else if ( fieldName == "X-HomeAddress" ) { + homeAddress.setLabel( fieldValue ); + } else if ( fieldName == "X-HomeAddressStreet" ) { + homeAddress.setStreet( fieldValue ); + } else if ( fieldName == "X-HomeAddressCity" ) { + homeAddress.setLocality( fieldValue ); + } else if ( fieldName == "X-HomeAddressPostalCode" ) { + homeAddress.setPostalCode( fieldValue ); + } else if ( fieldName == "X-HomeAddressState" ) { + homeAddress.setRegion( fieldValue ); + } else if ( fieldName == "X-HomeAddressCountry" ) { + homeAddress.setCountry( fieldValue ); + } else if ( fieldName == "X-BusinessAddress" ) { + businessAddress.setLabel( fieldValue ); + } else if ( fieldName == "X-BusinessAddressStreet" ) { + businessAddress.setStreet( fieldValue ); + } else if ( fieldName == "X-BusinessAddressCity" ) { + businessAddress.setLocality( fieldValue ); + } else if ( fieldName == "X-BusinessAddressPostalCode" ) { + businessAddress.setPostalCode( fieldValue ); + } else if ( fieldName == "X-BusinessAddressState" ) { + businessAddress.setRegion( fieldValue ); + } else if ( fieldName == "X-BusinessAddressCountry" ) { + businessAddress.setCountry( fieldValue ); + } else if ( fieldName == "X-OtherAddress" ) { + otherAddress.setLabel( fieldValue ); + } else if ( fieldName == "X-OtherAddressStreet" ) { + otherAddress.setStreet( fieldValue ); + } else if ( fieldName == "X-OtherAddressCity" ) { + otherAddress.setLocality( fieldValue ); + } else if ( fieldName == "X-OtherAddressPostalCode" ) { + otherAddress.setPostalCode( fieldValue ); + } else if ( fieldName == "X-OtherAddressState" ) { + otherAddress.setRegion( fieldValue ); + } else if ( fieldName == "X-OtherAddressCountry" ) { + otherAddress.setCountry( fieldValue ); + } else if ( fieldName == "NICKNAME" ) { + a.setNickName( fieldValue ); + } else if ( fieldName == "ORG" ) { + a.setOrganization( fieldValue ); + } else if ( fieldName == "ROLE" ) { + a.setRole( fieldValue ); + } else if ( fieldName == "BDAY" ) { + a.setBirthday( TDEGlobal::locale()->readDate( fieldValue ) ); + } else if ( fieldName == "WEBPAGE" ) { + a.setUrl( KURL( fieldValue ) ); + } else if ( fieldName == "N" ) { + } else if ( fieldName == "X-FirstName" ) { + } else if ( fieldName == "X-MiddleName" ) { + } else if ( fieldName == "X-LastName" ) { + } else if ( fieldName == "X-Title" ) { + } else if ( fieldName == "X-Suffix" ) { + } else if ( fieldName == "X-FileAs" ) { + } else if ( fieldName == "EMAIL" ) { + a.insertEmail( fieldValue, true ); + } else if ( fieldName == "X-E-mail2" ) { + a.insertEmail( fieldValue ); + } else if ( fieldName == "X-E-mail3" ) { + a.insertEmail( fieldValue ); + } else if ( fieldName == "X-Notes" ) { + } else { + a.insertCustom( "KADDRESSBOOK", fieldName, fieldValue ); + } + } + + if ( !homeAddress.isEmpty() ) a.insertAddress( homeAddress ); + if ( !businessAddress.isEmpty() ) a.insertAddress( businessAddress ); + if ( !otherAddress.isEmpty() ) a.insertAddress( otherAddress ); +} + +void importKab( KABC::AddressBook *ab, bool override, bool quiet ) +{ + TQString fileName = TDEGlobal::dirs()->saveLocation( "data", "kab/" ); + fileName += "addressbook.kab"; + if ( !TQFile::exists( fileName ) ) { + if ( !quiet ) { + KMessageBox::error( 0, "" + i18n( "Address book file %1 not found! Make sure the old address book is located there and you have read permission for this file." ) + .arg( fileName ) + "" ); + } + kdDebug(5700) << "No KDE 2 addressbook found." << endl; + return; + } + + kdDebug(5700) << "Converting old-style kab addressbook to " + "new-style kabc addressbook." << endl; + + KabAPI kab( 0 ); + if ( kab.init() != ::AddressBook::NoError ) { + kdDebug(5700) << "Error initing kab" << endl; + exit( 1 ); + } + + KabKey key; + ::AddressBook::Entry entry; + + int num = kab.addressbook()->noOfEntries(); + + kdDebug(5700) << "kab Addressbook has " << num << " entries." << endl; + + for ( int i = 0; i < num; ++i ) { + if ( ::AddressBook::NoError != kab.addressbook()->getKey( i, key ) ) { + kdDebug(5700) << "Error getting key for index " << i << " from kab." << endl; + continue; + } + if ( ::AddressBook::NoError != kab.addressbook()->getEntry( key, entry ) ) { + kdDebug(5700) << "Error getting entry for index " << i << " from kab." << endl; + continue; + } + + Addressee a; + + // Convert custom entries + int count = 0; + bool idFound = false; + TQStringList::ConstIterator customIt; + for ( customIt = entry.custom.begin(); customIt != entry.custom.end(); ++customIt ) { + if ( (*customIt).startsWith( "X-KABC-UID:" ) ) { + a.setUid( (*customIt).mid( (*customIt).find( ":" ) + 1 ) ); + idFound = true; + } else if ( (*customIt).startsWith( "KMail:1.0\n" ) ) { + readKAddressBookEntries( *customIt, a ); + } else { + a.insertCustom( "tdeab2tdeabc", TQString::number( count++ ), *customIt ); + } + } + if ( idFound ) { + if ( !override ) continue; + } else { + entry.custom << "X-KABC-UID:" + a.uid(); + ::AddressBook::ErrorCode error = kab.addressbook()->change( key, entry ); + if ( error != ::AddressBook::NoError ) { + kdDebug(5700) << "kab.change returned with error " << error << endl; + } else { + kdDebug(5700) << "Wrote back to kab uid " << a.uid() << endl; + } + } + + a.setTitle( entry.title ); + a.setFormattedName( entry.fn ); + a.setPrefix( entry.nameprefix ); + a.setGivenName( entry.firstname ); + a.setAdditionalName( entry.middlename ); + a.setFamilyName( entry.lastname ); + a.setBirthday( entry.birthday ); + + TQStringList::ConstIterator emailIt; + for ( emailIt = entry.emails.begin(); emailIt != entry.emails.end(); ++emailIt ) + a.insertEmail( *emailIt ); + + TQStringList::ConstIterator phoneIt; + for ( phoneIt = entry.telephone.begin(); phoneIt != entry.telephone.end(); ++phoneIt ) { + int kabType = (*phoneIt++).toInt(); + if ( phoneIt == entry.telephone.end() ) break; + TQString number = *phoneIt; + int type = 0; + if ( kabType == ::AddressBook::Fixed ) type = PhoneNumber::Voice; + else if ( kabType == ::AddressBook::Mobile ) type = PhoneNumber::Cell | PhoneNumber::Voice; + else if ( kabType == ::AddressBook::Fax ) type = PhoneNumber::Fax; + else if ( kabType == ::AddressBook::Modem ) type = PhoneNumber::Modem; + a.insertPhoneNumber( PhoneNumber( number, type ) ); + } + + if ( entry.URLs.count() > 0 ) { + a.setUrl( KURL( entry.URLs.first() ) ); + if ( entry.URLs.count() > 1 ) { + kdWarning() << "More than one URL. Ignoring all but the first." << endl; + } + } + + int noAdr = entry.noOfAddresses(); + for ( int j = 0; j < noAdr; ++j ) { + ::AddressBook::Entry::Address kabAddress; + entry.getAddress( j, kabAddress ); + + Address adr; + + adr.setStreet( kabAddress.address ); + adr.setPostalCode( kabAddress.zip ); + adr.setLocality( kabAddress.town ); + adr.setCountry( kabAddress.country ); + adr.setRegion( kabAddress.state ); + + TQString label; + if ( !kabAddress.headline.isEmpty() ) label += kabAddress.headline + "\n"; + if ( !kabAddress.position.isEmpty() ) label += kabAddress.position + "\n"; + if ( !kabAddress.org.isEmpty() ) label += kabAddress.org + "\n"; + if ( !kabAddress.orgUnit.isEmpty() ) label += kabAddress.orgUnit + "\n"; + if ( !kabAddress.orgSubUnit.isEmpty() ) label += kabAddress.orgSubUnit + "\n"; + if ( !kabAddress.deliveryLabel.isEmpty() ) label += kabAddress.deliveryLabel + "\n"; + adr.setLabel( label ); + + a.insertAddress( adr ); + } + + TQString note = entry.comment; + + if ( !entry.user1.isEmpty() ) note += "\nUser1: " + entry.user1; + if ( !entry.user2.isEmpty() ) note += "\nUser2: " + entry.user2; + if ( !entry.user3.isEmpty() ) note += "\nUser3: " + entry.user3; + if ( !entry.user4.isEmpty() ) note += "\nUser4: " + entry.user4; + + if ( !entry.keywords.count() == 0 ) note += "\nKeywords: " + entry.keywords.join( ", " ); + + TQStringList::ConstIterator talkIt; + for ( talkIt = entry.talk.begin(); talkIt != entry.talk.end(); ++talkIt ) { + note += "\nTalk: " + (*talkIt); + } + + a.setNote( note ); + + a.setPrefix( entry.rank + a.prefix() ); // Add rank to prefix + + a.setCategories( entry.categories ); + + kdDebug(5700) << "Addressee: " << a.familyName() << endl; + + ab->insertAddressee( a ); + } + + kab.save( true ); +} + +int main( int argc, char **argv ) +{ + TDEAboutData aboutData( "tdeab2tdeabc", I18N_NOOP( "Kab to Kabc Converter" ), "0.1" ); + aboutData.addAuthor( "Cornelius Schumacher", 0, "schumacher@kde.org" ); + + TDECmdLineArgs::init( argc, argv, &aboutData ); + TDECmdLineArgs::addCmdLineOptions( options ); + + TDEApplication app; + + TDECmdLineArgs *args = TDECmdLineArgs::parsedArgs(); + + bool override = false; + + if ( args->isSet( "override" ) ) { + kdDebug() << "Override existing entries." << endl; + + override = true; + } + + bool quiet = false; + + if ( args->isSet( "quiet" ) ) + quiet = true; + + if ( args->isSet( "disable-autostart" ) ) { + kdDebug() << "Disable autostart." << endl; + + TDEConfig *config = app.config(); + config->setGroup( "Startup" ); + config->writeEntry( "EnableAutostart", false ); + } + + KABC::AddressBook *kabcBook = StdAddressBook::self(); + + importKMailAddressBook( kabcBook ); + + importKab( kabcBook, override, quiet ); + + StdAddressBook::save(); + + kdDebug(5700) << "Saved kabc addressbook to '" << kabcBook->identifier() << "'" << endl; +} + diff --git a/kabc/tdeab2tdeabc.desktop b/kabc/tdeab2tdeabc.desktop new file mode 100644 index 000000000..945f044d4 --- /dev/null +++ b/kabc/tdeab2tdeabc.desktop @@ -0,0 +1,105 @@ +[Desktop Entry] +Name=tdeab2tdeabc +Name[af]=kab-na-kabc +Name[csb]=Kònwersëjô adresowi knéżczi +Name[eo]=Konvertilo de "kab" al "kabc" +Name[fr]=KAB2KABC +Name[fy]=Kab2kabc +Name[hu]=Kab2kabc +Name[it]=Kab2Kabc +Name[nl]=Kab2kabc +Name[pl]=Konwersja książki adresowej +Name[pt_BR]=Conversão de kab para kabc +Name[ro]=Kab2kabc +Name[sv]=Kab2kabc +Name[te]=కెఎబి2కెఎబిసి +Name[zu]=i-tdeab2tdeabc +Exec=tdeab2tdeabc --disable-autostart --quiet +Icon=misc +Type=Application +Comment=libkab to libkabc conversion tool. +Comment[af]=libkab na libkabc omskakeling program. +Comment[ar]=أداة تحويل libkab إلى libkabc. +Comment[az]=libkab - libkabc dönüşdürmÉ™ vasitÉ™si. +Comment[be]=ІнÑтрумент пераўтварÑÐ½Ð½Ñ libkab у libkabc. +Comment[bg]=Програма за конвертиране на libkab до libkabc. +Comment[bn]=libkab থেকে libkabc-তে পরিবরà§à¦¤à¦¨ করার পà§à¦°à§‹à¦—à§à¦°à¦¾à¦®à¥¤ +Comment[bs]=alat za pretvaranje libkab u libkabc. +Comment[ca]=Eina de conversió de libkab a libkabc. +Comment[cs]=PÅ™evod dat z libkab do libkabc. +Comment[csb]=Nôrzãdze do kònwersëji z libkab do libkabc. +Comment[cy]=erfyn trosi libkab i libkabc +Comment[da]=libkab-til-libkabc-konverteringsværktøj. +Comment[de]=Konvertierung von libkab in libkabc +Comment[el]=ΕÏγαλείο μετατÏοπής από το libkab στο libkabc. +Comment[eo]=Konvertilo de "libkab" al "libkabc" +Comment[es]=Conversor libkab a libkabc. +Comment[et]=libkab -> libkabc teisendamine +Comment[eu]=libkab-etik libkabc-era bihurtzeko tresna. +Comment[fa]=ابزار تبدیل libkab به libcabc. +Comment[fi]=libkab-libkabc -muunnin +Comment[fr]=Outil de conversion de libkab vers libkabc. +Comment[fy]=Konversjeprogramma fan libkab nei libkabc. +Comment[ga]=Uirlis tiontaithe ó libkab go libkabc. +Comment[gl]=Ferramenta de conversión de libkab a libkabc. +Comment[he]=כלי המרה מ־libkab ל־libkabc +Comment[hi]=libkab से libkabc बदलने वाला औजार +Comment[hr]=Alat za pretvaranje iz libkab u libkabc +Comment[hsb]=libkab -> libkabc konwerter +Comment[hu]=libkab -> libkabc konvertáló. +Comment[id]=konverter libkab ke libkabc. +Comment[is]=libkab í libkabc breytingatól. +Comment[it]=Strumento di conversione da libkab a libkabc. +Comment[ja]=libkab ã‹ã‚‰ libkabc ã¸ã®å¤‰æ›ãƒ„ール +Comment[ka]=libkab => libkabc გáƒáƒ áƒ“áƒáƒ¥áƒ›áƒœáƒ˜áƒ¡ ხელსáƒáƒ¬áƒ§áƒ. +Comment[kk]=libkab дегеннен libkabc дегенге айналдыру құралы. +Comment[km]=ឧបករណáŸâ€‹áž”ម្លែង​ពី libkab ទៅ libkabc +Comment[ko]=libkabì„ libkabc로 바꿔주는 연장. +Comment[lb]=libkab op libkabc Konvertéierungs-Hëllefsmëttel. +Comment[lt]=libkab į libkabc konvertavimo įrankis. +Comment[lv]=libkab uz libkabc kovertēšanas rÄ«ks. +Comment[mk]=алатка за претворање од libkab во libkabc. +Comment[mn]=libkab-Ð°Ð°Ñ libkabc-руу хөрвүүлÑгч +Comment[ms]=perkakasan penukaran libkab to libkabc. +Comment[mt]=Għodda għall-konverżjoni libkab għal libkabc +Comment[nb]=libkab til libkabc konverteringsverktøy. +Comment[nds]=Warktüüch för't Ümwanneln vun libkab na libkabc. +Comment[ne]=libkab to libkabc रूपानà¥à¤¤à¤°à¤£ उपकरण । +Comment[nl]=Conversieprogramma van libkab naar libkabc. +Comment[nn]=Konverterer libkab til libkabc +Comment[nso]=Sebereka sa phetosetso ya libkab go libkabc +Comment[pa]=libkab ਤੋ libkabc ਤਬਦੀਲੀ ਸੰਦ। +Comment[pl]=NarzÄ™dzie do konwersji z libkab do libkabc. +Comment[pt]=Ferramenta de conversão de libkab para libkabc. +Comment[pt_BR]=Ferramenta de conversão de libkab para libkabc. +Comment[ro]=Utilitar de conversie de la "libkab" la "libkabc". +Comment[ru]=утилита Ð¿Ñ€ÐµÐ¾Ð±Ñ€Ð°Ð·Ð¾Ð²Ð°Ð½Ð¸Ñ libkab в libkabc. +Comment[rw]=Igikoresho cy'ihindura libkab muri libkabc. +Comment[se]=konverterenreaidu libkab:as libkabc:ai +Comment[sk]=Prevod dát z libkab do libkabc. +Comment[sl]=Orodje za pretvorbo iz libkab v libkabc +Comment[sq]=Vegla për shëndrimin e libkab në libkabc. +Comment[sr]=Ðлат за конверзију из libkab-а у libkabc. +Comment[sr@Latn]=Alat za konverziju iz libkab-a u libkabc. +Comment[ss]=Lithulusi lekutjintja le-libkab kuya ku-libkabc. +Comment[sv]=Konverteringsverktyg frÃ¥n libkab till libkabc +Comment[ta]=libkab இலிரà¯à®¨à¯à®¤à¯ libkabc கà¯à®•௠மாறà¯à®±à¯à®®à¯ கரà¯à®µà®¿. +Comment[te]=libkab à°¨à±à°‚à°šà°¿ libkabc కౠమారà±à°šà± పనిమà±à°Ÿà±à°Ÿà± +Comment[tg]=аÑбоби дигаргунÑози libkab ба libkabc +Comment[th]=เครื่องมือเปลี่ยน libkab เป็น libkabc +Comment[tr]=libkab' tan libkabc' ye dönüştürme aracı +Comment[tt]=libkab-›libkabc äyländerü qoralı. +Comment[uk]=ЗаÑіб Ð¿ÐµÑ€ÐµÑ‚Ð²Ð¾Ñ€ÐµÐ½Ð½Ñ libkab до libkabc. +Comment[uz]=libkab'ni libkabc'ga aylantiradigan vosita. +Comment[uz@cyrillic]=libkab'ни libkabc'га айлантирадиган воÑита. +Comment[ven]=Tshishumiswa tsha u shandukisa libkab itshi ya kha libkabc +Comment[vi]=Công cụ chuyển đổi libkab sang libkabc. +Comment[xh]=libkab kwi libkabc isixhobo sokuguqulela. +Comment[zh_CN]=libkab 到 libkabc 的转æ¢å·¥å…·ã€‚ +Comment[zh_HK]=libkab 至 libkabc 的轉æ›å·¥å…· +Comment[zh_TW]=libkab 至 libkabc 轉æ›å·¥å…· +Comment[zu]=Ithuluzi lokuguqula le-libkab kuyaku-libkabc +Terminal=false +NoDisplay=true +X-TDE-autostart-condition=tdeab2tdeabcrc:Startup:EnableAutostart:true +OnlyShowIn=TDE; diff --git a/kate/data/bash.xml b/kate/data/bash.xml index 84c91596d..e3bc4abdd 100644 --- a/kate/data/bash.xml +++ b/kate/data/bash.xml @@ -439,7 +439,7 @@ dcop kdialog - kfile + tdefile xhost xmodmap xset diff --git a/kate/data/tcsh.xml b/kate/data/tcsh.xml index f9dffa2e4..19c94beaa 100644 --- a/kate/data/tcsh.xml +++ b/kate/data/tcsh.xml @@ -431,7 +431,7 @@ dcop kdialog - kfile + tdefile xhost xmodmap xset diff --git a/kate/data/zsh.xml b/kate/data/zsh.xml index 5d0575ab9..e69c15354 100644 --- a/kate/data/zsh.xml +++ b/kate/data/zsh.xml @@ -497,7 +497,7 @@ dcop kdialog - kfile + tdefile xhost xmodmap xset diff --git a/kate/interfaces/katecmd.cpp b/kate/interfaces/katecmd.cpp index 69263b57c..2104ef157 100644 --- a/kate/interfaces/katecmd.cpp +++ b/kate/interfaces/katecmd.cpp @@ -118,7 +118,7 @@ const TQString KateCmd::fromHistory( uint index ) const //BEGIN KateCmdShellCompletion /* A lot of the code in the below class is copied from - tdelibs/kio/kio/kshellcompletion.cpp + tdelibs/tdeio/tdeio/kshellcompletion.cpp Copyright (C) 2000 David Smith Copyright (C) 2004 Anders Lund */ diff --git a/kate/part/CMakeLists.txt b/kate/part/CMakeLists.txt index 72ac36f8a..dcbc0eecd 100644 --- a/kate/part/CMakeLists.txt +++ b/kate/part/CMakeLists.txt @@ -21,9 +21,9 @@ include_directories( ${CMAKE_SOURCE_DIR}/tdefx ${CMAKE_SOURCE_DIR}/tdecore ${CMAKE_SOURCE_DIR}/tdeui - ${CMAKE_SOURCE_DIR}/kio - ${CMAKE_SOURCE_DIR}/kio/kio - ${CMAKE_SOURCE_DIR}/kio/kfile + ${CMAKE_SOURCE_DIR}/tdeio + ${CMAKE_SOURCE_DIR}/tdeio/tdeio + ${CMAKE_SOURCE_DIR}/tdeio/tdefile ${CMAKE_SOURCE_DIR}/kjs ${CMAKE_SOURCE_DIR}/tdeutils ${CMAKE_SOURCE_DIR}/tdeprint diff --git a/kate/part/kateconfig.cpp b/kate/part/kateconfig.cpp index 81b001c3c..d1c9fd1ee 100644 --- a/kate/part/kateconfig.cpp +++ b/kate/part/kateconfig.cpp @@ -28,7 +28,7 @@ #include #include -#include +#include #include #include #include diff --git a/kate/part/katedialogs.cpp b/kate/part/katedialogs.cpp index 43f5977d8..5006ddd6c 100644 --- a/kate/part/katedialogs.cpp +++ b/kate/part/katedialogs.cpp @@ -38,9 +38,9 @@ #include #include -#include -#include -#include +#include +#include +#include #include #include @@ -50,7 +50,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/kate/part/katedocument.cpp b/kate/part/katedocument.cpp index 03c8ac638..74e5c3225 100644 --- a/kate/part/katedocument.cpp +++ b/kate/part/katedocument.cpp @@ -42,9 +42,9 @@ #include "katetemplatehandler.h" #include -#include -#include -#include +#include +#include +#include #include @@ -53,8 +53,8 @@ #include #include #include -#include -#include +#include +#include #include #include #include @@ -1924,13 +1924,13 @@ void KateDocument::writeConfig() config->sync(); } -void KateDocument::readSessionConfig(TDEConfig *kconfig) +void KateDocument::readSessionConfig(TDEConfig *tdeconfig) { // restore the url - KURL url (kconfig->readEntry("URL")); + KURL url (tdeconfig->readEntry("URL")); // get the encoding - TQString tmpenc=kconfig->readEntry("Encoding"); + TQString tmpenc=tdeconfig->readEntry("Encoding"); if (!tmpenc.isEmpty() && (tmpenc != encoding())) setEncoding(tmpenc); @@ -1939,34 +1939,34 @@ void KateDocument::readSessionConfig(TDEConfig *kconfig) openURL (url); // restore the hl stuff - m_buffer->setHighlight(KateHlManager::self()->nameFind(kconfig->readEntry("Highlighting"))); + m_buffer->setHighlight(KateHlManager::self()->nameFind(tdeconfig->readEntry("Highlighting"))); if (hlMode() > 0) hlSetByUser = true; // indent mode - config()->setIndentationMode( (uint)kconfig->readNumEntry("Indentation Mode", config()->indentationMode() ) ); + config()->setIndentationMode( (uint)tdeconfig->readNumEntry("Indentation Mode", config()->indentationMode() ) ); // Restore Bookmarks - TQValueList marks = kconfig->readIntListEntry("Bookmarks"); + TQValueList marks = tdeconfig->readIntListEntry("Bookmarks"); for( uint i = 0; i < marks.count(); i++ ) addMark( marks[i], KateDocument::markType01 ); } -void KateDocument::writeSessionConfig(TDEConfig *kconfig) +void KateDocument::writeSessionConfig(TDEConfig *tdeconfig) { if ( m_url.isLocalFile() && !TDEGlobal::dirs()->relativeLocation("tmp", m_url.path()).startsWith("/")) return; // save url - kconfig->writeEntry("URL", m_url.prettyURL() ); + tdeconfig->writeEntry("URL", m_url.prettyURL() ); // save encoding - kconfig->writeEntry("Encoding",encoding()); + tdeconfig->writeEntry("Encoding",encoding()); // save hl - kconfig->writeEntry("Highlighting", highlight()->name()); + tdeconfig->writeEntry("Highlighting", highlight()->name()); - kconfig->writeEntry("Indentation Mode", config()->indentationMode() ); + tdeconfig->writeEntry("Indentation Mode", config()->indentationMode() ); // Save Bookmarks TQValueList marks; @@ -1975,7 +1975,7 @@ void KateDocument::writeSessionConfig(TDEConfig *kconfig) ++it ) marks << it.current()->line; - kconfig->writeEntry( "Bookmarks", marks ); + tdeconfig->writeEntry( "Bookmarks", marks ); } void KateDocument::configDialog() diff --git a/kate/part/katefiletype.cpp b/kate/part/katefiletype.cpp index a00d39bfb..15dd7c9f6 100644 --- a/kate/part/katefiletype.cpp +++ b/kate/part/katefiletype.cpp @@ -25,7 +25,7 @@ #include "kateview.h" #include "katefactory.h" -#include +#include #include #include #include diff --git a/kate/part/katehighlight.cpp b/kate/part/katehighlight.cpp index 08da7e97f..f06518649 100644 --- a/kate/part/katehighlight.cpp +++ b/kate/part/katehighlight.cpp @@ -32,7 +32,7 @@ #include "kateschema.h" #include "kateconfig.h" -#include +#include #include #include #include diff --git a/kate/part/katehighlight.h b/kate/part/katehighlight.h index 1b71e454a..8ff5e31b2 100644 --- a/kate/part/katehighlight.h +++ b/kate/part/katehighlight.h @@ -26,7 +26,7 @@ #include "../interfaces/document.h" -#include +#include #include #include diff --git a/kate/part/katejscript.cpp b/kate/part/katejscript.cpp index 28b22c74e..f3a5cd548 100644 --- a/kate/part/katejscript.cpp +++ b/kate/part/katejscript.cpp @@ -37,7 +37,7 @@ #include #include #include -#include +#include #include #include @@ -688,7 +688,7 @@ void KateJScriptManager::collectScripts (bool force) TDEConfig df (desktopFile, true, false); df.setDesktopGroup (); - // get cmdname, fallback to baseName, if it is empty, therefor not use the kconfig fallback + // get cmdname, fallback to baseName, if it is empty, therefor not use the tdeconfig fallback TQString cmdname = df.readEntry ("X-Kate-Command"); if (cmdname.isEmpty()) { diff --git a/kate/part/kateluaindentscript.cpp b/kate/part/kateluaindentscript.cpp index c06f3864e..46cf531a7 100644 --- a/kate/part/kateluaindentscript.cpp +++ b/kate/part/kateluaindentscript.cpp @@ -31,7 +31,7 @@ #include #include -#include +#include #include #include diff --git a/kate/part/kateschema.h b/kate/part/kateschema.h index f6eb8ef60..2e92812de 100644 --- a/kate/part/kateschema.h +++ b/kate/part/kateschema.h @@ -29,7 +29,7 @@ #include #include -#include +#include #include class KateView; @@ -53,7 +53,7 @@ class KateSchemaManager void update (bool readfromfile = true); /** - * return kconfig with right group set or set to Normal if not there + * return tdeconfig with right group set or set to Normal if not there */ TDEConfig *schema (uint number); diff --git a/kate/part/katesyntaxdocument.cpp b/kate/part/katesyntaxdocument.cpp index 4093f8722..d90f5de73 100644 --- a/kate/part/katesyntaxdocument.cpp +++ b/kate/part/katesyntaxdocument.cpp @@ -27,7 +27,7 @@ #include #include #include -#include +#include #include diff --git a/kate/part/kateview.cpp b/kate/part/kateview.cpp index 193f411fd..22a4799d6 100644 --- a/kate/part/kateview.cpp +++ b/kate/part/kateview.cpp @@ -50,9 +50,9 @@ #include -#include +#include -#include +#include #include #include #include diff --git a/kate/part/test_regression.cpp b/kate/part/test_regression.cpp index 4f2ef26a5..1463c8bcd 100644 --- a/kate/part/test_regression.cpp +++ b/kate/part/test_regression.cpp @@ -42,7 +42,7 @@ #include #include #include "katefactory.h" -#include +#include #include #include #include diff --git a/kate/plugins/autobookmarker/autobookmarker.cpp b/kate/plugins/autobookmarker/autobookmarker.cpp index ceb76eedd..cf3190c4e 100644 --- a/kate/plugins/autobookmarker/autobookmarker.cpp +++ b/kate/plugins/autobookmarker/autobookmarker.cpp @@ -30,7 +30,7 @@ #include #include -#include +#include #include #include #include diff --git a/kate/plugins/insertfile/CMakeLists.txt b/kate/plugins/insertfile/CMakeLists.txt index 0c80a1e0c..56bdfd9cd 100644 --- a/kate/plugins/insertfile/CMakeLists.txt +++ b/kate/plugins/insertfile/CMakeLists.txt @@ -16,9 +16,9 @@ include_directories( ${CMAKE_SOURCE_DIR} ${CMAKE_SOURCE_DIR}/tdecore ${CMAKE_SOURCE_DIR}/tdeui - ${CMAKE_SOURCE_DIR}/kio - ${CMAKE_SOURCE_DIR}/kio/kio - ${CMAKE_SOURCE_DIR}/kio/kfile + ${CMAKE_SOURCE_DIR}/tdeio + ${CMAKE_SOURCE_DIR}/tdeio/tdeio + ${CMAKE_SOURCE_DIR}/tdeio/tdefile ${CMAKE_SOURCE_DIR}/interfaces ) diff --git a/kate/plugins/insertfile/insertfileplugin.cpp b/kate/plugins/insertfile/insertfileplugin.cpp index ee46a7cff..aa9f998b6 100644 --- a/kate/plugins/insertfile/insertfileplugin.cpp +++ b/kate/plugins/insertfile/insertfileplugin.cpp @@ -24,9 +24,9 @@ #include #include -#include +#include #include -#include +#include #include #include #include diff --git a/kate/plugins/isearch/ISearchPlugin.cpp b/kate/plugins/isearch/ISearchPlugin.cpp index 26c49576d..de1c1c376 100644 --- a/kate/plugins/isearch/ISearchPlugin.cpp +++ b/kate/plugins/isearch/ISearchPlugin.cpp @@ -24,7 +24,7 @@ #include #include #include -#include +#include #include #include "ISearchPlugin.h" diff --git a/kate/plugins/kdatatool/CMakeLists.txt b/kate/plugins/kdatatool/CMakeLists.txt index 1adced175..7ceccc10d 100644 --- a/kate/plugins/kdatatool/CMakeLists.txt +++ b/kate/plugins/kdatatool/CMakeLists.txt @@ -17,8 +17,8 @@ include_directories( ${CMAKE_SOURCE_DIR}/tdecore ${CMAKE_SOURCE_DIR}/tdefx ${CMAKE_SOURCE_DIR}/tdeui - ${CMAKE_SOURCE_DIR}/kio - ${CMAKE_SOURCE_DIR}/kio/kio + ${CMAKE_SOURCE_DIR}/tdeio + ${CMAKE_SOURCE_DIR}/tdeio/tdeio ${CMAKE_SOURCE_DIR}/interfaces ) diff --git a/kate/plugins/wordcompletion/docwordcompletion.cpp b/kate/plugins/wordcompletion/docwordcompletion.cpp index a468edd13..fbd5a4db7 100644 --- a/kate/plugins/wordcompletion/docwordcompletion.cpp +++ b/kate/plugins/wordcompletion/docwordcompletion.cpp @@ -34,7 +34,7 @@ #include #include -#include +#include #include #include #include diff --git a/kcmshell/CMakeLists.txt b/kcmshell/CMakeLists.txt deleted file mode 100644 index 92c2205d0..000000000 --- a/kcmshell/CMakeLists.txt +++ /dev/null @@ -1,41 +0,0 @@ -################################################# -# -# (C) 2010 Serghei Amelian -# serghei (DOT) amelian (AT) gmail.com -# -# Improvements and feedback are welcome -# -# This file is released under GPL >= 2 -# -################################################# - -include_directories( - ${TQT_INCLUDE_DIRS} - ${CMAKE_CURRENT_BINARY_DIR} - ${CMAKE_BINARY_DIR}/tdecore - ${CMAKE_SOURCE_DIR}/dcop - ${CMAKE_SOURCE_DIR}/tdecore - ${CMAKE_SOURCE_DIR}/tdeui - ${CMAKE_SOURCE_DIR}/kio - ${CMAKE_SOURCE_DIR}/kio/kio - ${CMAKE_SOURCE_DIR}/tdeutils -) - -link_directories( - ${TQT_LIBRARY_DIRS} -) - - -##### kcmshell ################################## - -set( target kcmshell ) - -set( ${target}_SRCS - main.cpp main.skel -) - -tde_add_tdeinit_executable( ${target} AUTOMOC - SOURCES ${${target}_SRCS} - LINK tdeutils-shared - DEPENDENCIES dcopidl -) diff --git a/kcmshell/Makefile.am b/kcmshell/Makefile.am deleted file mode 100644 index 9c755d8bb..000000000 --- a/kcmshell/Makefile.am +++ /dev/null @@ -1,39 +0,0 @@ -# -# Copyright (c) 1999 Matthias Hoelzer-Kluepfel -# Copyright (c) 2000 Matthias Elter -# Copyright (c) 2004 Frans Englich -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -# - -AM_CPPFLAGS = -I$(top_srcdir)/tdeutils $(all_includes) -METASOURCES = AUTO - -lib_LTLIBRARIES = -bin_PROGRAMS = -tdeinit_LTLIBRARIES = kcmshell.la - -kcmshell_la_SOURCES = main.cpp main.skel -kcmshell_la_LIBADD = ../tdeutils/libtdeutils.la $(LIB_QT) $(LIB_TDEUI) $(top_builddir)/dcop/libDCOP.la $(LIB_TDECORE) $(LIB_KFILE) -kcmshell_la_LDFLAGS = $(all_libraries) -module -avoid-version - -noinst_HEADERS = main.h - -messages: rc.cpp - $(XGETTEXT) *.cpp -o $(podir)/kcmshell.pot - - -include $(top_srcdir)/admin/Doxyfile.am - diff --git a/kcmshell/main.cpp b/kcmshell/main.cpp deleted file mode 100644 index 29aba0501..000000000 --- a/kcmshell/main.cpp +++ /dev/null @@ -1,350 +0,0 @@ -/* - Copyright (c) 1999 Matthias Hoelzer-Kluepfel - Copyright (c) 2000 Matthias Elter - Copyright (c) 2004 Frans Englich - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - -*/ - -#include - -#include -#include - -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include "main.h" -#include "main.moc" - -using namespace std; - -KService::List m_modules; - -static KCmdLineOptions options[] = -{ - { "list", I18N_NOOP("List all possible modules"), 0}, - { "+module", I18N_NOOP("Configuration module to open"), 0 }, - { "lang ", I18N_NOOP("Specify a particular language"), 0 }, - { "embed ", I18N_NOOP("Embeds the module with buttons in window with id "), 0 }, - { "embed-proxy ", I18N_NOOP("Embeds the module without buttons in window with id "), 0 }, - { "silent", I18N_NOOP("Do not display main window"), 0 }, - KCmdLineLastOption -}; - -static void listModules(const TQString &baseGroup) -{ - - KServiceGroup::Ptr group = KServiceGroup::group(baseGroup); - - if (!group || !group->isValid()) - return; - - KServiceGroup::List list = group->entries(true, true); - - for( KServiceGroup::List::ConstIterator it = list.begin(); - it != list.end(); it++) - { - KSycocaEntry *p = (*it); - if (p->isType(KST_KService)) - { - KService *s = static_cast(p); - if (!kapp->authorizeControlModule(s->menuId())) - continue; - m_modules.append(s); - } - else if (p->isType(KST_KServiceGroup)) - listModules(p->entryPath()); - } -} - -static KService::Ptr locateModule(const TQCString& module) -{ - TQString path = TQFile::decodeName(module); - - if (!path.endsWith(".desktop")) - path += ".desktop"; - - KService::Ptr service = KService::serviceByStorageId( path ); - if (!service) - { - kdWarning(780) << "Could not find module '" << module << "'." << endl; - return 0; - } - - // avoid finding random non-TDE applications - if ( module.left( 4 ) != "kde-" && service->library().isEmpty() ) - return locateModule( "kde-" + module ); - - if(!TDECModuleLoader::testModule( module )) - { - kdDebug(780) << "According to \"" << module << "\"'s test function, it should Not be loaded." << endl; - return 0; - } - - return service; -} - -bool KCMShell::isRunning() -{ - if( dcopClient()->appId() == m_dcopName ) - return false; // We are the one and only. - - kdDebug(780) << "kcmshell with modules '" << - m_dcopName << "' is already running." << endl; - - dcopClient()->attach(); // Reregister as anonymous - dcopClient()->setNotifications(true); - - TQByteArray data; - TQDataStream str( data, IO_WriteOnly ); - str << kapp->startupId(); - TQCString replyType; - TQByteArray replyData; - if (!dcopClient()->call(m_dcopName, "dialog", "activate(TQCString)", - data, replyType, replyData)) - { - kdDebug(780) << "Calling DCOP function dialog::activate() failed." << endl; - return false; // Error, we have to do it ourselves. - } - - return true; -} - -KCMShellMultiDialog::KCMShellMultiDialog( int dialogFace, const TQString& caption, - TQWidget *parent, const char *name, bool modal) - : KCMultiDialog( dialogFace, caption, parent, name, modal ), - DCOPObject("dialog") -{ -} - -void KCMShellMultiDialog::activate( TQCString asn_id ) -{ - kdDebug(780) << k_funcinfo << endl; - - KStartupInfo::setNewStartupId( this, asn_id ); -} - -void KCMShell::setDCOPName(const TQCString &dcopName, bool rootMode ) -{ - m_dcopName = "kcmshell_"; - if( rootMode ) - m_dcopName += "rootMode_"; - - m_dcopName += dcopName; - - dcopClient()->registerAs(m_dcopName, false); -} - -void KCMShell::waitForExit() -{ - kdDebug(780) << k_funcinfo << endl; - - connect(dcopClient(), TQT_SIGNAL(applicationRemoved(const TQCString&)), - TQT_SLOT( appExit(const TQCString&) )); - exec(); -} - -void KCMShell::appExit(const TQCString &appId) -{ - kdDebug(780) << k_funcinfo << endl; - - if( appId == m_dcopName ) - { - kdDebug(780) << "'" << appId << "' closed, dereferencing." << endl; - deref(); - } -} - -static void setIcon(TQWidget *w, const TQString &iconName) -{ - TQPixmap icon = DesktopIcon(iconName); - TQPixmap miniIcon = SmallIcon(iconName); - w->setIcon( icon ); //standard X11 -#if defined Q_WS_X11 && ! defined K_WS_QTONLY - KWin::setIcons(w->winId(), icon, miniIcon ); -#endif -} - -extern "C" KDE_EXPORT int kdemain(int _argc, char *_argv[]) -{ - TDEAboutData aboutData( "kcmshell", I18N_NOOP("TDE Control Module"), - 0, - I18N_NOOP("A tool to start single TDE control modules"), - TDEAboutData::License_GPL, - I18N_NOOP("(c) 1999-2004, The KDE Developers") ); - - aboutData.addAuthor("Frans Englich", I18N_NOOP("Maintainer"), "frans.englich@kde.org"); - aboutData.addAuthor("Daniel Molkentin", 0, "molkentin@kde.org"); - aboutData.addAuthor("Matthias Hoelzer-Kluepfel",0, "hoelzer@kde.org"); - aboutData.addAuthor("Matthias Elter",0, "elter@kde.org"); - aboutData.addAuthor("Matthias Ettrich",0, "ettrich@kde.org"); - aboutData.addAuthor("Waldo Bastian",0, "bastian@kde.org"); - - TDEGlobal::locale()->setMainCatalogue("kcmshell"); - - TDECmdLineArgs::init(_argc, _argv, &aboutData); - TDECmdLineArgs::addCmdLineOptions( options ); // Add our own options. - KCMShell app; - - const TDECmdLineArgs *args = TDECmdLineArgs::parsedArgs(); - - const TQCString lang = args->getOption("lang"); - if( !lang.isNull() ) - TDEGlobal::locale()->setLanguage(lang); - - if (args->isSet("list")) - { - cout << static_cast(i18n("The following modules are available:").local8Bit()) << endl; - - listModules( "Settings/" ); - - int maxLen=0; - - for( KService::List::ConstIterator it = m_modules.begin(); it != m_modules.end(); ++it) - { - int len = (*it)->desktopEntryName().length(); - if (len > maxLen) - maxLen = len; - } - - for( KService::List::ConstIterator it = m_modules.begin(); it != m_modules.end(); ++it) - { - TQString entry("%1 - %2"); - - entry = entry.arg((*it)->desktopEntryName().leftJustify(maxLen, ' ')) - .arg(!(*it)->comment().isEmpty() ? (*it)->comment() - : i18n("No description available")); - - cout << static_cast(entry.local8Bit()) << endl; - } - return 0; - } - - if (args->count() < 1) - { - args->usage(); - return -1; - } - - TQCString dcopName; - KService::List modules; - for (int i = 0; i < args->count(); i++) - { - KService::Ptr service = locateModule(args->arg(i)); - if( service ) - { - modules.append(service); - if( !dcopName.isEmpty() ) - dcopName += "_"; - - dcopName += args->arg(i); - } - } - - /* Check if this particular module combination is already running, but - * allow the same module to run when embedding(root mode) */ - app.setDCOPName(dcopName, - ( args->isSet( "embed-proxy" ) || args->isSet( "embed" ))); - if( app.isRunning() ) - { - app.waitForExit(); - return 0; - } - - //KDialogBase::DialogType dtype = KDialogBase::Plain; // FIXME - KDialogBase::DialogType dtype = KDialogBase::IconList; // Work around a bug whereby several kcontrol modules (such as displayconfig) use an incorrect size when loaded with kcmshell in the Plain mode - // This bug is possibly related to kcmultidialog.cpp:266 [( new TQHBoxLayout( page ) )->setAutoAdd( true );] - // In fact, this method of display may be preferable to the Plain mode from a UX perspective, - // as the icon shows the user what the active kcontrol module is called. - - if ( modules.count() < 1 ) - return 0; - else if( modules.count() > 1 ) - dtype = KDialogBase::IconList; - - bool idValid; - int id; - - if ( args->isSet( "embed-proxy" )) - { - id = args->getOption( "embed-proxy" ).toInt(&idValid); - if( idValid ) - { - TDECModuleProxy *module = new TDECModuleProxy( modules.first()->desktopEntryName() ); - module->realModule(); - QXEmbed::embedClientIntoWindow( module, id); - app.exec(); - delete module; - } - else - kdDebug(780) << "Supplied id '" << id << "' is not valid." << endl; - - return 0; - - } - - KCMShellMultiDialog *dlg = new KCMShellMultiDialog( dtype, - i18n("Configure - %1").arg(kapp->caption()), 0, "", true ); - - for (KService::List::ConstIterator it = modules.begin(); it != modules.end(); ++it) - dlg->addModule(TDECModuleInfo(*it)); - - if ( args->isSet( "embed" )) - { - id = args->getOption( "embed" ).toInt(&idValid); - if( idValid ) - { - QXEmbed::embedClientIntoWindow( dlg, id ); - dlg->exec(); - delete dlg; - } - else - kdDebug(780) << "Supplied id '" << id << "' is not valid." << endl; - - } - else - { - - if (kapp->iconName() != kapp->name()) - setIcon(dlg, kapp->iconName()); - else if ( modules.count() == 1 ) - setIcon(dlg, TDECModuleInfo( modules.first()).icon()); - - dlg->exec(); - delete dlg; - } - - return 0; -} -// vim: sw=4 et sts=4 diff --git a/kcmshell/main.h b/kcmshell/main.h deleted file mode 100644 index f43cf98cb..000000000 --- a/kcmshell/main.h +++ /dev/null @@ -1,104 +0,0 @@ -/* - Copyright (c) 2001 Waldo Bastian - Copyright (c) 2004 Frans Englich - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. - -*/ - -#ifndef __kcmshell_h__ -#define __kcmshell_h__ - -#include - -#include -#include - -/** - * The TDEApplication instance for kcmshell. - */ -class KCMShell : public TDEApplication -{ - Q_OBJECT - -public: - - /** - * Sets m_dcopName basically to @p dcopName, - * and then registers with DCOP. - * - * @param dcopName name to set the DCOP name to - * @param rootMode true if the kcmshell is embedding - */ - void setDCOPName(const TQCString &dcopName, bool rootMode ); - - /** - * Waits until the last instance of kcmshell with the same - * module as this one exits, and then exits. - */ - void waitForExit(); - - /** - * @return true if the shell is running - */ - bool isRunning(); - -private slots: - - /** - */ - void appExit( const TQCString &appId ); - -private: - - /** - * The DCOP name which actually is registered. - * For example "kcmshell_mouse". - */ - TQCString m_dcopName; - -}; - - -/** - * Essentially a plain KCMultiDialog, but has the additional functionality - * of allowing it to be told to request windows focus. - * - * @author Waldo Bastian - */ -class KCMShellMultiDialog : public KCMultiDialog, public DCOPObject -{ - Q_OBJECT - K_DCOP - -public: - - /** - */ - KCMShellMultiDialog( int dialogFace, const TQString& caption, - TQWidget *parent=0, const char *name=0, bool modal=false); - -k_dcop: - - /** - */ - virtual void activate( TQCString asn_id ); - -}; - - -// vim: sw=4 et sts=4 -#endif //__kcmshell_h__ diff --git a/kconf_update/CMakeLists.txt b/kconf_update/CMakeLists.txt deleted file mode 100644 index 2e25811a7..000000000 --- a/kconf_update/CMakeLists.txt +++ /dev/null @@ -1,34 +0,0 @@ -################################################# -# -# (C) 2010 Serghei Amelian -# serghei (DOT) amelian (AT) gmail.com -# -# Improvements and feedback are welcome -# -# This file is released under GPL >= 2 -# -################################################# - -include_directories( - ${TQT_INCLUDE_DIRS} - ${CMAKE_BINARY_DIR}/tdecore - ${CMAKE_SOURCE_DIR}/tdecore -) - -link_directories( - ${TQT_LIBRARY_DIRS} -) - - -##### kconf_update ############################## - -set( target kconf_update ) - -set( ${target}_SRCS - kconf_update.cpp -) - -tde_add_tdeinit_executable( ${target} AUTOMOC - SOURCES ${${target}_SRCS} - LINK tdecore-shared -) diff --git a/kconf_update/Mainpage.dox b/kconf_update/Mainpage.dox deleted file mode 100644 index 9db5adb3b..000000000 --- a/kconf_update/Mainpage.dox +++ /dev/null @@ -1,31 +0,0 @@ -/** @mainpage ./kconf_update - -kconf_update is a tool designed to update config files. Over time applications -sometimes need to rearrange the way configuration options are stored. Since -such an update shouldn't influence the configuration options that the user -has selected, the application must take care that the options stored in the -old way will still be honored. - -What used to happen is that the application looks up both the old and the -new configuration option and then decides which one to use. This method has -several drawbacks: -- The application may need to read more configuration files than strictly - needed, resulting in a slower startup. -- The application becomes bigger with code that will only be used once. - -kconf_update addresses these problems by offering a framework to update -configuration files without adding code to the application itself. - -See the README file for more information. - -@authors -Waldo Bastian \ - -@maintainers -[Unknown/None] - -@licenses -@lgpl - -*/ -// vim:ts=4:sw=4:expandtab:filetype=doxygen diff --git a/kconf_update/Makefile.am b/kconf_update/Makefile.am deleted file mode 100644 index afe3864d9..000000000 --- a/kconf_update/Makefile.am +++ /dev/null @@ -1,33 +0,0 @@ -# This file is part of the KDE libraries -# Copyright (C) 2001 Waldo Bastian - -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Library General Public -# License as published by the Free Software Foundation; either -# version 2 of the License, or (at your option) any later version. - -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Library General Public License for more details. - -# You should have received a copy of the GNU Library General Public License -# along with this library; see the file COPYING.LIB. If not, write to -# the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, -# Boston, MA 02110-1301, USA. - -INCLUDES= -I../kded $(all_includes) - -bin_PROGRAMS = -lib_LTLIBRARIES = -tdeinit_LTLIBRARIES = kconf_update.la - -kconf_update_la_SOURCES = kconf_update.cpp -kconf_update_la_LIBADD = $(LIB_TDECORE) $(LIB_QT) -kconf_update_la_LDFLAGS = $(all_libraries) -module -avoid-version - -METASOURCES = AUTO - -# Internal -# noinst_HEADERS = kconf_update.h - diff --git a/kconf_update/README.kconf_update b/kconf_update/README.kconf_update deleted file mode 100644 index c8229c735..000000000 --- a/kconf_update/README.kconf_update +++ /dev/null @@ -1,251 +0,0 @@ -README kconf_update - -Version: 1.1 -Author: Waldo Bastian , - -What it does -============ - -kconf_update is a tool designed to update config files. Over time applications -sometimes need to rearrange the way configuration options are stored. Since -such an update shouldn't influence the configuration options that the user -has selected, the application must take care that the options stored in the -old way will still be honored. - -What used to happen is that the application looks up both the old and the -new configuration option and then decides which one to use. This method has -several drawbacks: -* The application may need to read more configuration files than strictly -needed, resulting in a slower startup. -* The application becomes bigger with code that will only be used once. - -kconf_update addresses these problems by offering a framework to update -configuration files without adding code to the application itself. - - -How it works -============ - -Applications can install so called "update files" under -$TDEDIR/share/apps/kconf_update. An update file has ".upd" as extension and -contains instructions for transferring/converting configuration information -from one place to another. - -Updating the configuration happens automatically, either when KDE gets started -or when kded detects a new update file in the above mentioned location. - -Update files are separated into sections. Each section has an Id. When a -section describing a configuration change has been applied, the Id will be -stored in the file "kconf_updaterc". This information is used to make sure -that a configuration update is only performed once. - -If you overwrite an existing update file with a new version that contains a -new section, only the update instructions from this extra section will be -performed. - -File format of the update file -============================== - -Empty lines or lines that start with '#' are considered comments. -Commas (,) are used to seperate fields and may not occur as part -of any field and all of the keywords are case-sensitive, i.e. you -cannot say "key" instead of "Key" for example. - -For the rest the file is parsed and executed sequentially from top to bottom. -Each line can contain one entry. The following entries are recognized: - - -Id= - -With identifying the group of update entries that follows. Once a group -of entries have been applied, their is stored and this group of entries -will not be applied again. - - -File=, -File= - -Specifies that configuration information is read from and written -to . If you only specify , the information is read from -as well as written to . - -Script=