summaryrefslogtreecommitdiffstats
path: root/tdeioslave/about
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2013-01-27 01:02:02 -0600
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2013-01-27 01:02:02 -0600
commitde7e5867a65e0a46f1388e3e50bc7eeddd1aecbf (patch)
treedbb3152c372f8620f9290137d461f3d9f9eba1cb /tdeioslave/about
parent936d3cec490c13f2c5f7dd14f5e364fddaa6da71 (diff)
downloadtdebase-de7e5867a65e0a46f1388e3e50bc7eeddd1aecbf.tar.gz
tdebase-de7e5867a65e0a46f1388e3e50bc7eeddd1aecbf.zip
Rename a number of libraries and executables to avoid conflicts with KDE4
Diffstat (limited to 'tdeioslave/about')
-rw-r--r--tdeioslave/about/CMakeLists.txt36
-rw-r--r--tdeioslave/about/Makefile.am21
-rw-r--r--tdeioslave/about/about.protocol9
-rw-r--r--tdeioslave/about/kio_about.cpp76
-rw-r--r--tdeioslave/about/kio_about.h39
5 files changed, 181 insertions, 0 deletions
diff --git a/tdeioslave/about/CMakeLists.txt b/tdeioslave/about/CMakeLists.txt
new file mode 100644
index 000000000..aaa2a5aff
--- /dev/null
+++ b/tdeioslave/about/CMakeLists.txt
@@ -0,0 +1,36 @@
+#################################################
+#
+# (C) 2010-2011 Serghei Amelian
+# serghei (DOT) amelian (AT) gmail.com
+#
+# Improvements and feedback are welcome
+#
+# This file is released under GPL >= 2
+#
+#################################################
+
+include_directories(
+ ${CMAKE_CURRENT_BINARY_DIR}
+ ${TDE_INCLUDE_DIR}
+ ${TQT_INCLUDE_DIRS}
+)
+
+link_directories(
+ ${TQT_LIBRARY_DIRS}
+)
+
+
+##### other data ################################
+
+install( FILES about.protocol DESTINATION ${SERVICES_INSTALL_DIR} )
+
+
+##### kio_about (module) ########################
+
+set( target kio_about )
+
+tde_add_kpart( ${target} AUTOMOC
+ SOURCES kio_about.cpp
+ LINK tdeio-shared
+ DESTINATION ${PLUGIN_INSTALL_DIR}
+)
diff --git a/tdeioslave/about/Makefile.am b/tdeioslave/about/Makefile.am
new file mode 100644
index 000000000..18bffeeec
--- /dev/null
+++ b/tdeioslave/about/Makefile.am
@@ -0,0 +1,21 @@
+## Makefile.am of tdebase/tdeioslave/about
+
+INCLUDES= $(all_includes)
+AM_LDFLAGS = $(all_libraries) $(KDE_RPATH) $(LIB_QT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_KIO) -ltdetexteditor
+
+####### Files
+
+kde_module_LTLIBRARIES = kio_about.la
+
+kio_about_la_SOURCES = kio_about.cpp
+kio_about_la_LIBADD = $(LIB_KSYCOCA)
+kio_about_la_LDFLAGS = $(all_libraries) -module $(KDE_PLUGIN)
+noinst_HEADERS = kio_about.h
+
+kdelnk_DATA = about.protocol
+kdelnkdir = $(kde_servicesdir)
+
+METASOURCES = AUTO
+
+messages:
+ $(XGETTEXT) *.cpp *.h -o $(podir)/tdeio_about.pot
diff --git a/tdeioslave/about/about.protocol b/tdeioslave/about/about.protocol
new file mode 100644
index 000000000..bc685bfe5
--- /dev/null
+++ b/tdeioslave/about/about.protocol
@@ -0,0 +1,9 @@
+[Protocol]
+exec=kio_about
+protocol=about
+input=none
+output=filesystem
+reading=true
+defaultMimetype=text/html
+Icon=help_index
+Class=:local
diff --git a/tdeioslave/about/kio_about.cpp b/tdeioslave/about/kio_about.cpp
new file mode 100644
index 000000000..29fba8e4a
--- /dev/null
+++ b/tdeioslave/about/kio_about.cpp
@@ -0,0 +1,76 @@
+/* This file is part of the KDE libraries
+
+ Copyright (c) 2002 John Firebaugh <jfirebaugh@kde.org>
+
+ 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 "kio_about.h"
+
+#include <stdlib.h>
+#include <tqstring.h>
+#include <kinstance.h>
+#include <kurl.h>
+
+using namespace TDEIO;
+
+AboutProtocol::AboutProtocol(const TQCString &pool_socket, const TQCString &app_socket)
+ : SlaveBase("about", pool_socket, app_socket)
+{
+}
+
+AboutProtocol::~AboutProtocol()
+{
+}
+
+void AboutProtocol::get( const KURL& )
+{
+ TQByteArray output;
+
+ TQTextStream os( output, IO_WriteOnly );
+ os.setEncoding( TQTextStream::Latin1 ); // In fast ASCII
+
+ os << "<html><head><title>about:blank</title></head><body></body></html>";
+
+ data( output );
+ finished();
+}
+
+void AboutProtocol::mimetype( const KURL& )
+{
+ mimeType("text/html");
+ finished();
+}
+
+extern "C"
+{
+ int KDE_EXPORT kdemain( int argc, char **argv ) {
+
+ TDEInstance instance("kio_about");
+
+ if (argc != 4)
+ {
+ fprintf(stderr, "Usage: kio_about protocol domain-socket1 domain-socket2\n");
+ exit(-1);
+ }
+
+ AboutProtocol slave(argv[2], argv[3]);
+ slave.dispatchLoop();
+
+ return 0;
+ }
+}
+
diff --git a/tdeioslave/about/kio_about.h b/tdeioslave/about/kio_about.h
new file mode 100644
index 000000000..eacaf09dc
--- /dev/null
+++ b/tdeioslave/about/kio_about.h
@@ -0,0 +1,39 @@
+/* This file is part of the KDE libraries
+
+ Copyright (c) 2002 John Firebaugh <jfirebaugh@kde.org>
+
+ 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 __kio_about_h__
+#define __kio_about_h__
+
+#include <tqcstring.h>
+
+#include <tdeio/global.h>
+#include <tdeio/slavebase.h>
+
+
+class AboutProtocol : public TDEIO::SlaveBase
+{
+public:
+ AboutProtocol(const TQCString &pool_socket, const TQCString &app_socket);
+ virtual ~AboutProtocol();
+
+ virtual void get(const KURL& url);
+ virtual void mimetype(const KURL& url);
+};
+
+#endif