add more spacing
[personal-kdebase.git] / runtime / kioslave / about / kio_about.cpp
blob6ed0e19c445181df5a207837c732a49150d97f5d
1 /* This file is part of the KDE libraries
3 Copyright (c) 2002 John Firebaugh <jfirebaugh@kde.org>
5 This library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Library General Public
7 License as published by the Free Software Foundation; either
8 version 2 of the License, or (at your option) any later version.
10 This library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Library General Public License for more details.
15 You should have received a copy of the GNU Library General Public License
16 along with this library; see the file COPYING.LIB. If not, write to
17 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18 Boston, MA 02110-1301, USA.
21 #include "kio_about.h"
23 #include <kcomponentdata.h>
25 using namespace KIO;
27 AboutProtocol::AboutProtocol(const QByteArray &pool_socket, const QByteArray &app_socket)
28 : SlaveBase("about", pool_socket, app_socket)
32 AboutProtocol::~AboutProtocol()
36 void AboutProtocol::get( const KUrl& )
38 QByteArray output;
40 QTextStream os( &output, QIODevice::WriteOnly );
41 os.setCodec( "ISO-8859-1" ); // In fact ASCII
43 os << "<html><head><title>about:blank</title></head><body></body></html>";
44 os.flush();
46 data( output );
47 finished();
50 void AboutProtocol::mimetype( const KUrl& )
52 mimeType("text/html");
53 finished();
56 extern "C"
58 int KDE_EXPORT kdemain( int argc, char **argv ) {
60 KComponentData componentData("kio_about");
62 if (argc != 4)
64 fprintf(stderr, "Usage: kio_about protocol domain-socket1 domain-socket2\n");
65 exit(-1);
68 AboutProtocol slave(argv[2], argv[3]);
69 slave.dispatchLoop();
71 return 0;