[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    [kde-baseapps/frameworks] about: Simple about protocol so we can remove some hacks in konqueror...
From:       John Firebaugh <jfirebaugh () kde ! org>
Date:       2014-04-25 23:25:24
Message-ID: E1WdpUi-0000VF-0H () scm ! kde ! org
[Download RAW message or body]

Git commit 24466203cc413a7c1cf15cc260a9e91077f1eec7 by John Firebaugh.
Committed on 30/09/2002 at 03:59.
Pushed by ervin into branch 'frameworks'.

Simple about protocol so we can remove some hacks in konqueror...

svn path=/trunk/kdebase/kioslave/; revision=181193

A  +21   -0    about/Makefile.am
A  +7    -0    about/about.protocol
A  +76   -0    about/kio_about.cpp     [License: LGPL (v2+) (wrong address)]  *
A  +39   -0    about/kio_about.h     [License: LGPL (v2+) (wrong address)]  *

The files marked with a * at the end have a non valid license. Please read: \
http://techbase.kde.org/Policies/Licensing_Policy and use the headers which are \
listed at that page.


http://commits.kde.org/kde-baseapps/24466203cc413a7c1cf15cc260a9e91077f1eec7

diff --git a/about/Makefile.am b/about/Makefile.am
new file mode 100644
index 0000000..fb77338
--- /dev/null
+++ b/about/Makefile.am
@@ -0,0 +1,21 @@
+## Makefile.am of kdebase/kioslave/about
+
+INCLUDES= $(all_includes)
+LDFLAGS = $(all_libraries) $(KDE_RPATH)
+
+####### 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) -C *.cpp *.h -o $(podir)/kio_about.pot
diff --git a/about/about.protocol b/about/about.protocol
new file mode 100644
index 0000000..d988b8e
--- /dev/null
+++ b/about/about.protocol
@@ -0,0 +1,7 @@
+[Protocol]
+exec=kio_about
+protocol=about
+input=none
+output=filesystem
+reading=true
+defaultMimetype=text/html
diff --git a/about/kio_about.cpp b/about/kio_about.cpp
new file mode 100644
index 0000000..06ee4e9
--- /dev/null
+++ b/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., 59 Temple Place - Suite 330,
+    Boston, MA 02111-1307, USA.
+*/
+
+#include "kio_about.h"
+
+#include <stdlib.h>
+#include <qstring.h>
+#include <kinstance.h>
+#include <kurl.h>
+
+using namespace KIO;
+
+AboutProtocol::AboutProtocol(const QCString &pool_socket, const QCString \
&app_socket) +    : SlaveBase("about", pool_socket, app_socket)
+{
+}
+
+AboutProtocol::~AboutProtocol()
+{
+}
+
+void AboutProtocol::get( const KURL& )
+{
+    QString output;
+    
+    QTextStream os(&output, IO_WriteOnly);
+    os.setEncoding(QTextStream::Locale);
+
+    os << "<html><head><title>about:blank</title></head><body></body></html>";
+    
+    data( output.local8Bit() );
+    finished();
+}
+
+void AboutProtocol::mimetype( const KURL& )
+{
+    mimeType("text/html");
+    finished();
+}
+
+extern "C"
+{
+    int kdemain( int argc, char **argv ) {
+
+        KInstance 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/about/kio_about.h b/about/kio_about.h
new file mode 100644
index 0000000..929a582
--- /dev/null
+++ b/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., 59 Temple Place - Suite 330,
+    Boston, MA 02111-1307, USA.
+*/
+#ifndef __kio_about_h__
+#define __kio_about_h__
+
+#include <qcstring.h>
+
+#include <kio/global.h>
+#include <kio/slavebase.h>
+
+
+class AboutProtocol : public KIO::SlaveBase
+{
+public:
+    AboutProtocol(const QCString &pool_socket, const QCString &app_socket);
+    virtual ~AboutProtocol();
+
+    virtual void get(const KURL& url);
+    virtual void mimetype(const KURL& url);
+};
+
+#endif


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic