diff options
author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2013-01-27 01:04:16 -0600 |
---|---|---|
committer | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2013-01-27 01:04:16 -0600 |
commit | 5159cd2beb2e87806a5b54e9991b7895285c9d3e (patch) | |
tree | 9b70e8be47a390f8f4d56ead812ab0c9dad88709 /kioslave/metainfo | |
parent | c17cb900dcf52b8bd6dc300d4f103392900ec2b4 (diff) | |
download | tdelibs-5159cd2beb2e87806a5b54e9991b7895285c9d3e.tar.gz tdelibs-5159cd2beb2e87806a5b54e9991b7895285c9d3e.zip |
Rename a number of libraries and executables to avoid conflicts with KDE4
Diffstat (limited to 'kioslave/metainfo')
-rw-r--r-- | kioslave/metainfo/CMakeLists.txt | 43 | ||||
-rw-r--r-- | kioslave/metainfo/Makefile.am | 24 | ||||
-rw-r--r-- | kioslave/metainfo/metainfo.cpp | 103 | ||||
-rw-r--r-- | kioslave/metainfo/metainfo.h | 38 | ||||
-rw-r--r-- | kioslave/metainfo/metainfo.protocol | 9 |
5 files changed, 0 insertions, 217 deletions
diff --git a/kioslave/metainfo/CMakeLists.txt b/kioslave/metainfo/CMakeLists.txt deleted file mode 100644 index 9c5fcdf20..000000000 --- a/kioslave/metainfo/CMakeLists.txt +++ /dev/null @@ -1,43 +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}/dcop - ${CMAKE_SOURCE_DIR}/tdecore - ${CMAKE_SOURCE_DIR}/kio - ${CMAKE_SOURCE_DIR}/kio/kio -) - -link_directories( - ${TQT_LIBRARY_DIRS} -) - - -##### other data ################################ - -install( FILES metainfo.protocol DESTINATION ${SERVICES_INSTALL_DIR} ) - - -##### kio_metainfo ############################## - -set( target kio_metainfo ) - -set( ${target}_SRCS - metainfo.cpp -) - -tde_add_kpart( ${target} AUTOMOC - SOURCES ${${target}_SRCS} - LINK kio-shared - DESTINATION ${PLUGIN_INSTALL_DIR} -) diff --git a/kioslave/metainfo/Makefile.am b/kioslave/metainfo/Makefile.am deleted file mode 100644 index c1d1d295e..000000000 --- a/kioslave/metainfo/Makefile.am +++ /dev/null @@ -1,24 +0,0 @@ -## $Id$ -## Makefile.am of tdebase/kioslave/metainfo - -INCLUDES = $(all_includes) -AM_LDFLAGS = $(all_libraries) $(KDE_RPATH) $(LIB_QT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_KIO) -ltdetexteditor -METASOURCES = AUTO - -kde_module_LTLIBRARIES = kio_metainfo.la - -kio_metainfo_la_SOURCES = metainfo.cpp -kio_metainfo_la_LIBADD = $(LIB_KIO) $(LIB_QT) $(LIB_TDECORE) -kio_metainfo_la_LDFLAGS = $(all_libraries) -module $(KDE_PLUGIN) - -noinst_HEADERS = metainfo.h - -kdelnk_DATA = metainfo.protocol -kdelnkdir = $(kde_servicesdir) - -#servicetypes_DATA = thumbcreator.desktop -#servicetypesdir = $(kde_servicetypesdir) - -#services_DATA = imagethumbnail.desktop textthumbnail.desktop -# htmlthumbnail.desktop gsthumbnail.desktop -#servicesdir = $(kde_servicesdir) diff --git a/kioslave/metainfo/metainfo.cpp b/kioslave/metainfo/metainfo.cpp deleted file mode 100644 index 66e5357f9..000000000 --- a/kioslave/metainfo/metainfo.cpp +++ /dev/null @@ -1,103 +0,0 @@ -/* This file is part of the KDE libraries - Copyright (C) 2002 Rolf Magnus <ramagnus@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 version 2.0 - - 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. -*/ - -// $Id$ - -#include <kdatastream.h> // Do not remove, needed for correct bool serialization -#include <kurl.h> -#include <kapplication.h> -#include <kmimetype.h> -#include <kdebug.h> -#include <kfilemetainfo.h> -#include <klocale.h> -#include <stdlib.h> - -#include "metainfo.h" - -// Recognized metadata entries: -// mimeType - the mime type of the file, so we need not extra determine it -// what - what to load - -using namespace TDEIO; - -extern "C" -{ - KDE_EXPORT int kdemain(int argc, char **argv); -} - -int kdemain(int argc, char **argv) -{ - TDEApplication app(argc, argv, "kio_metainfo", false, true); - - if (argc != 4) - { - kdError() << "Usage: kio_metainfo protocol domain-socket1 domain-socket2" << endl; - exit(-1); - } - - MetaInfoProtocol slave(argv[2], argv[3]); - slave.dispatchLoop(); - - return 0; -} - -MetaInfoProtocol::MetaInfoProtocol(const TQCString &pool, const TQCString &app) - : SlaveBase("metainfo", pool, app) -{ -} - -MetaInfoProtocol::~MetaInfoProtocol() -{ -} - -void MetaInfoProtocol::get(const KURL &url) -{ - TQString mimeType = metaData("mimeType"); - KFileMetaInfo info(url.path(), mimeType); - - TQByteArray arr; - TQDataStream stream(arr, IO_WriteOnly); - - stream << info; - - data(arr); - finished(); -} - -void MetaInfoProtocol::put(const KURL& url, int, bool, bool) -{ - TQString mimeType = metaData("mimeType"); - KFileMetaInfo info; - - TQByteArray arr; - readData(arr); - TQDataStream stream(arr, IO_ReadOnly); - - stream >> info; - - if (info.isValid()) - { - info.applyChanges(); - } - else - { - error(ERR_NO_CONTENT, i18n("No metainfo for %1").arg(url.path())); - return; - } - finished(); -} diff --git a/kioslave/metainfo/metainfo.h b/kioslave/metainfo/metainfo.h deleted file mode 100644 index a77647180..000000000 --- a/kioslave/metainfo/metainfo.h +++ /dev/null @@ -1,38 +0,0 @@ -/* This file is part of the KDE libraries - Copyright (C) 2002 Rolf Magnus <ramagnus@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 version 2.0 - - 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. -*/ - -// $Id$ - -#ifndef _METAINFO_H_ -#define _METAINFO_H_ - -#include <kio/slavebase.h> - -class MetaInfoProtocol : public TDEIO::SlaveBase -{ -public: - MetaInfoProtocol(const TQCString &pool, const TQCString &app); - virtual ~MetaInfoProtocol(); - - virtual void get(const KURL &url); - virtual void put(const KURL& url, int permissions, - bool overwrite, bool resume); - -}; - -#endif diff --git a/kioslave/metainfo/metainfo.protocol b/kioslave/metainfo/metainfo.protocol deleted file mode 100644 index f1fa9adac..000000000 --- a/kioslave/metainfo/metainfo.protocol +++ /dev/null @@ -1,9 +0,0 @@ -[Protocol] -exec=kio_metainfo -protocol=metainfo -input=stream -output=stream -reading=true -writing=true -source=false -Icon=help |