summaryrefslogtreecommitdiffstats
path: root/languages/cpp/app_templates/kioslave
diff options
context:
space:
mode:
Diffstat (limited to 'languages/cpp/app_templates/kioslave')
-rw-r--r--languages/cpp/app_templates/kioslave/.kdev_ignore0
-rw-r--r--languages/cpp/app_templates/kioslave/Makefile.am17
-rw-r--r--languages/cpp/app_templates/kioslave/kioslave.kdevtemplate183
-rw-r--r--languages/cpp/app_templates/kioslave/kioslave.pngbin0 -> 9524 bytes
-rw-r--r--languages/cpp/app_templates/kioslave/slave.cpp88
-rw-r--r--languages/cpp/app_templates/kioslave/slave.h23
-rw-r--r--languages/cpp/app_templates/kioslave/slave.kdevelop113
-rw-r--r--languages/cpp/app_templates/kioslave/slave.protocol39
-rw-r--r--languages/cpp/app_templates/kioslave/src-Makefile.am14
-rw-r--r--languages/cpp/app_templates/kioslave/subdirs3
10 files changed, 480 insertions, 0 deletions
diff --git a/languages/cpp/app_templates/kioslave/.kdev_ignore b/languages/cpp/app_templates/kioslave/.kdev_ignore
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/languages/cpp/app_templates/kioslave/.kdev_ignore
diff --git a/languages/cpp/app_templates/kioslave/Makefile.am b/languages/cpp/app_templates/kioslave/Makefile.am
new file mode 100644
index 00000000..5aa5b88e
--- /dev/null
+++ b/languages/cpp/app_templates/kioslave/Makefile.am
@@ -0,0 +1,17 @@
+dataFiles = slave.cpp slave.h slave.protocol slave.kdevelop \
+ src-Makefile.am kioslave.png subdirs
+templateName = kioslave
+
+### no need to change below:
+template_DATA = $(templateName).kdevtemplate
+templatedir = ${appwizarddatadir}/templates
+
+appwizarddatadir = ${kde_datadir}/kdevappwizard
+$(templateName).tar.gz: ${dataFiles}
+ $(TAR) -cf $(templateName).tar -C $(srcdir) ${dataFiles}
+ $(GZIP_COMMAND) -f9 $(templateName).tar
+
+archivedir = ${appwizarddatadir}
+archive_DATA = $(templateName).tar.gz ${templateName}.png
+
+CLEANFILES = *.tar.gz \ No newline at end of file
diff --git a/languages/cpp/app_templates/kioslave/kioslave.kdevtemplate b/languages/cpp/app_templates/kioslave/kioslave.kdevtemplate
new file mode 100644
index 00000000..0af80e7b
--- /dev/null
+++ b/languages/cpp/app_templates/kioslave/kioslave.kdevtemplate
@@ -0,0 +1,183 @@
+# KDE Config File
+[General]
+Name=KIO slave
+Name[br]=Sklav KIO
+Name[ca]=Esclau KIO
+Name[da]=KIO-slave
+Name[de]=Ein-/Ausgabemodul
+Name[el]=Υπηρέτης KIO
+Name[es]=Esclavo KIO
+Name[et]=KIO-moodul
+Name[eu]=KIO morroia
+Name[fr]=Esclave KIO
+Name[ga]=Sclábhaí KIO
+Name[gl]=Escravo KIO
+Name[hu]=KDE-protokoll (KIOslave)
+Name[it]=Slave KIO
+Name[nds]=In-/Utgaavmoduul
+Name[ne]=KIO स्लेभ
+Name[nl]=KIO-slave
+Name[pt]=KIO Slave
+Name[sk]=KIO otrok
+Name[sv]=I/O-slav
+Icon=kioslave.png
+Category=C++/KDE
+Comment=Generates a framework for an IO slave
+Comment[ca]=Genera una infraestructura per a un esclau IO
+Comment[da]=Genererer et skelet for en IO-slave
+Comment[de]=Erstellt das Grundgerüst für ein Ein-/Ausgabemodul.
+Comment[el]=Δημιουργεί ένα πλαίσιο για έναν υπηρέτη IO
+Comment[es]=Genera una infraestructura para un esclavo de E/S
+Comment[et]=IO-mooduli raamistiku loomine
+Comment[eu]=IO morroi baterako lan-marko bat sortzen du
+Comment[fa]=چارچوبی برای یک IO slave تولید می‌کند
+Comment[fr]=Génère une infrastructure pour un esclave d'entrée / sortie
+Comment[ga]=Cruthaíonn sé seo creatlach le haghaidh sclábhaí IO
+Comment[gl]=Xera un contorno de traballo para un escravo IO
+Comment[hu]=Létrehoz egy kiindulási keretprogramot KIOslave készítéséhez
+Comment[it]=Genera l'infrastruttura per uno slave di I/O
+Comment[ja]=IO slave のフレームワークを作成します
+Comment[nds]=Stellt dat Rahmenwark för en In-/Utgaavmoduul op
+Comment[ne]=IO स्लेभका लागि फ्रेमवर्क उत्पन्न गर्दछ
+Comment[nl]=Genereert een framework voor een IO-slave
+Comment[pl]=Generuje szablon dla IO slave
+Comment[pt]=Gera a plataforma para um 'IO slave'
+Comment[pt_BR]=Gera a plataforma para um 'IO slave'
+Comment[ru]=Создание канала IO slave для KDE
+Comment[sk]=Vygeneruje framework pre IO otroka
+Comment[sr]=Прави радни оквир за IO slave
+Comment[sr@Latn]=Pravi radni okvir za IO slave
+Comment[sv]=Skapar ett ramverk för en I/O-slav
+Comment[zh_CN]=生成一个 IO slave 的框架
+Comment[zh_TW]=產生一個 IO slave 的框架
+FileTemplates=h,CStyle,cpp,CStyle
+ShowFilesAfterGeneration=%{dest}/src/%{APPNAMELC}.cpp
+Archive=kioslave.tar.gz
+
+[ADMIN]
+Type=include
+File=%{kdevelop}/template-common/admin.kdevtemplate
+
+[GNU]
+Type=include
+File=%{kdevelop}/template-common/gnu.kdevtemplate
+
+[MKDIR_DOCBOOK1]
+Type=mkdir
+Dir=%{dest}/doc
+
+[MKDIR_DOCBOOK2]
+Type=mkdir
+Dir=%{dest}/doc/en
+
+[FILE1]
+Type=install
+Source=%{kdevelop}/template-common/kde-doc-Makefile.am
+Dest=%{dest}/doc/Makefile.am
+
+[FILE2]
+Type=install
+Source=%{kdevelop}/template-common/kde-doc-en-Makefile.am
+Dest=%{dest}/doc/en/Makefile.am
+
+[FILE3]
+Type=install
+EscapeXML=true
+Source=%{kdevelop}/template-common/kde-index.docbook
+Dest=%{dest}/doc/en/index.docbook
+
+[FILE4]
+Type=install
+EscapeXML=true
+Source=%{src}/slave.kdevelop
+Dest=%{dest}/%{APPNAMELC}.kdevelop
+
+[MkDir3]
+Type=mkdir
+Dir=%{dest}/src
+
+[FILE5]
+Type=install
+Source=%{kdevelop}/template-common/kde-app.lsm
+Dest=%{dest}/src/%{APPNAMELC}.lsm
+
+[MkDir4]
+Type=mkdir
+Dir=%{dest}/po
+
+[FILE6]
+Type=install
+Source=%{kdevelop}/template-common/kde-po-Makefile.am
+Dest=%{dest}/po/Makefile.am
+
+[FILE7]
+Type=install
+Source=%{kdevelop}/template-common/kde-Makefile.am
+Dest=%{dest}/Makefile.am
+
+[FILE8]
+Type=install
+Source=%{kdevelop}/template-common/kde-Makefile.cvs
+Dest=%{dest}/Makefile.cvs
+
+[FILE9]
+Type=install
+Source=%{kdevelop}/template-common/kde-configure.in.in
+Dest=%{dest}/configure.in.in
+
+[FILE10]
+Type=install
+Source=%{src}/subdirs
+Dest=%{dest}/subdirs
+
+[FILE11]
+Type=install
+Source=%{src}/src-Makefile.am
+Dest=%{dest}/src/Makefile.am
+
+[FILE12]
+Type=install
+Source=%{src}/slave.cpp
+Dest=%{dest}/src/%{APPNAMELC}.cpp
+
+[FILE13]
+Type=install
+Source=%{src}/slave.h
+Dest=%{dest}/src/%{APPNAMELC}.h
+
+[FILE14]
+Type=install
+Source=%{src}/slave.protocol
+Dest=%{dest}/src/%{APPNAMELC}.protocol
+
+[MSG]
+Type=message
+Comment=A KIO slave was created in %{dest}
+Comment[ca]=Un esclau KIO ha estat creat en %{dest}
+Comment[da]=En KIO-slave blev oprettet i %{dest}
+Comment[de]=Ein Ein-/Ausgabemodul wurde in %{dest} erstellt.
+Comment[el]=Ένας υπηρέτης KIO δημιουργήθηκε στο %{dest}
+Comment[es]=Un esclavo KIO ha sido creado en %{dest}
+Comment[et]=KIO-moodul loodi asukohta %{dest}
+Comment[eu]=KIO morroi bat sortu da hemen: %{dest}
+Comment[fa]=یک KIO slave در %{dest} ایجاد شد
+Comment[fr]=Un esclave d'entrée / sortie a été créé dans %{dest}
+Comment[ga]=Cruthaíodh sclábhaí KIO i %{dest}
+Comment[gl]=Creouse un escravo KIO en %{dest}
+Comment[hu]=Létrejött egy KIOslave itt: %{dest}
+Comment[it]=È stato generato un slave KIO in %{dest}
+Comment[ja]=KIO slave を %{dest} に作成しました。
+Comment[nds]=In %{dest} wöör en In-/Utgaavmoduul opstellt
+Comment[ne]=KIO स्लेभ %{dest} मा सिर्जना गरियो
+Comment[nl]=Een KIO-slave is aangemaakt in %{dest}
+Comment[pl]=KIO slave został utworzony w %{dest}
+Comment[pt]=Foi criado um 'KIO slave' em %{dest}
+Comment[pt_BR]=Foi criado um 'KIO slave' em %{dest}
+Comment[ru]=Канал KIO slave создан в %{dest}
+Comment[sk]=KIO otrok bol vytvorený v %{dest}
+Comment[sr]=KIO slave је направљен у %{dest}
+Comment[sr@Latn]=KIO slave je napravljen u %{dest}
+Comment[sv]=En I/O-slav skapades i %{dest}
+Comment[tr]=Bir KIO slave'i %{dest} içinde yaratıldı.
+Comment[zh_CN]=在 %{dest} 中创建了一个 KIO slave
+Comment[zh_TW]=一個 KIO slave 已建立於 %{dest}
diff --git a/languages/cpp/app_templates/kioslave/kioslave.png b/languages/cpp/app_templates/kioslave/kioslave.png
new file mode 100644
index 00000000..f0cd89a8
--- /dev/null
+++ b/languages/cpp/app_templates/kioslave/kioslave.png
Binary files differ
diff --git a/languages/cpp/app_templates/kioslave/slave.cpp b/languages/cpp/app_templates/kioslave/slave.cpp
new file mode 100644
index 00000000..df32aebf
--- /dev/null
+++ b/languages/cpp/app_templates/kioslave/slave.cpp
@@ -0,0 +1,88 @@
+
+#include <qcstring.h>
+#include <qsocket.h>
+#include <qdatetime.h>
+#include <qbitarray.h>
+
+#include <stdlib.h>
+#include <math.h>
+#include <unistd.h>
+#include <sys/socket.h>
+#include <netinet/in.h>
+#include <netdb.h>
+
+#include <kapplication.h>
+#include <kdebug.h>
+#include <kmessagebox.h>
+#include <kinstance.h>
+#include <kglobal.h>
+#include <kstandarddirs.h>
+#include <klocale.h>
+#include <kurl.h>
+#include <ksock.h>
+
+#include "%{APPNAMELC}.h"
+
+using namespace KIO;
+
+
+kio_%{APPNAMELC}Protocol::kio_%{APPNAMELC}Protocol(const QCString &pool_socket, const QCString &app_socket)
+ : SlaveBase("kio_%{APPNAMELC}", pool_socket, app_socket)
+{
+ kdDebug() << "kio_%{APPNAMELC}Protocol::kio_%{APPNAMELC}Protocol()" << endl;
+}
+
+
+kio_%{APPNAMELC}Protocol::~kio_%{APPNAMELC}Protocol()
+{
+ kdDebug() << "kio_%{APPNAMELC}Protocol::~kio_%{APPNAMELC}Protocol()" << endl;
+}
+
+
+void kio_%{APPNAMELC}Protocol::get(const KURL& url )
+{
+ kdDebug() << "kio_%{APPNAMELC}::get(const KURL& url)" << endl ;
+
+ kdDebug() << "Seconds: " << url.query() << endl;
+ QString remoteServer = url.host();
+ int remotePort = url.port();
+ kdDebug() << "myURL: " << url.prettyURL() << endl;
+
+ infoMessage(i18n("Looking for %1...").arg( remoteServer ) );
+ // Send the mimeType as soon as it is known
+ mimeType("text/plain");
+ // Send the data
+ QString theData = "This is a test of kio_%{APPNAMELC}";
+ data(QCString(theData.local8Bit()));
+ data(QByteArray()); // empty array means we're done sending the data
+ finished();
+}
+
+
+void kio_%{APPNAMELC}Protocol::mimetype(const KURL & /*url*/)
+{
+ mimeType("text/plain");
+ finished();
+}
+
+
+extern "C"
+{
+ int kdemain(int argc, char **argv)
+ {
+ KInstance instance( "kio_%{APPNAMELC}" );
+
+ kdDebug(7101) << "*** Starting kio_%{APPNAMELC} " << endl;
+
+ if (argc != 4) {
+ kdDebug(7101) << "Usage: kio_%{APPNAMELC} protocol domain-socket1 domain-socket2" << endl;
+ exit(-1);
+ }
+
+ kio_%{APPNAMELC}Protocol slave(argv[2], argv[3]);
+ slave.dispatchLoop();
+
+ kdDebug(7101) << "*** kio_%{APPNAMELC} Done" << endl;
+ return 0;
+ }
+}
diff --git a/languages/cpp/app_templates/kioslave/slave.h b/languages/cpp/app_templates/kioslave/slave.h
new file mode 100644
index 00000000..649ead8c
--- /dev/null
+++ b/languages/cpp/app_templates/kioslave/slave.h
@@ -0,0 +1,23 @@
+
+#ifndef _%{APPNAMELC}_H_
+#define _%{APPNAMELC}_H_
+
+#include <qstring.h>
+#include <qcstring.h>
+
+#include <kurl.h>
+#include <kio/global.h>
+#include <kio/slavebase.h>
+
+class QCString;
+
+class kio_%{APPNAMELC}Protocol : public KIO::SlaveBase
+{
+public:
+ kio_%{APPNAMELC}Protocol(const QCString &pool_socket, const QCString &app_socket);
+ virtual ~kio_%{APPNAMELC}Protocol();
+ virtual void mimetype(const KURL& url);
+ virtual void get(const KURL& url);
+};
+
+#endif
diff --git a/languages/cpp/app_templates/kioslave/slave.kdevelop b/languages/cpp/app_templates/kioslave/slave.kdevelop
new file mode 100644
index 00000000..a2ca970a
--- /dev/null
+++ b/languages/cpp/app_templates/kioslave/slave.kdevelop
@@ -0,0 +1,113 @@
+<?xml version="1.0"?>
+<kdevelop>
+ <general>
+ <author>%{AUTHOR}</author>
+ <email>%{EMAIL}</email>
+ <version>%{VERSION}</version>
+ <projectmanagement>KDevKDEAutoProject</projectmanagement>
+ <primarylanguage>C++</primarylanguage>
+ <keywords>
+ <keyword>C++</keyword>
+ <keyword>Code</keyword>
+ <keyword>Qt</keyword>
+ <keyword>KDE</keyword>
+ <keyword>kioslave</keyword>
+ </keywords>
+ </general>
+ <kdevcppsupport>
+ <qt>
+ <version>3</version>
+ <used>true</used>
+ <includestyle>3</includestyle>
+ <designerintegration>EmbeddedKDevDesigner</designerintegration>
+ </qt>
+ </kdevcppsupport>
+
+ <kdevautoproject>
+ <general>
+ <activetarget>src/lib%{APPNAMELC}.la</activetarget>
+ <useconfiguration>debug</useconfiguration>
+ </general>
+ <configurations>
+ <optimized>
+ <builddir>optimized</builddir>
+ <ccompiler>kdevgccoptions</ccompiler>
+ <cxxcompiler>kdevgppoptions</cxxcompiler>
+ <f77compiler>kdevg77options</f77compiler>
+ <cxxflags>-O2 -g0</cxxflags>
+ </optimized>
+ <debug>
+ <configargs>--enable-debug=full</configargs>
+ <builddir>debug</builddir>
+ <ccompiler>kdevgccoptions</ccompiler>
+ <cxxcompiler>kdevgppoptions</cxxcompiler>
+ <f77compiler>kdevg77options</f77compiler>
+ <cxxflags>-O0 -g3</cxxflags>
+ </debug>
+ </configurations>
+ </kdevautoproject>
+ <kdevfileview>
+ <groups>
+ <group pattern="*.cpp;*.cxx;*.h" name="Sources" />
+ <group pattern="*.po;*.ts" name="Translations" />
+ <group pattern="*" name="Others" />
+ </groups>
+ </kdevfileview>
+ <kdevdoctreeview>
+ <ignoretocs>
+ <toc>bash</toc>
+ <toc>bash_bugs</toc>
+ <toc>clanlib</toc>
+ <toc>fortran_bugs_gcc</toc>
+ <toc>gnome1</toc>
+ <toc>gnustep</toc>
+ <toc>gtk</toc>
+ <toc>gtk_bugs</toc>
+ <toc>haskell</toc>
+ <toc>haskell_bugs_ghc</toc>
+ <toc>java_bugs_gcc</toc>
+ <toc>java_bugs_sun</toc>
+ <toc>opengl</toc>
+ <toc>pascal_bugs_fp</toc>
+ <toc>php</toc>
+ <toc>php_bugs</toc>
+ <toc>perl</toc>
+ <toc>perl_bugs</toc>
+ <toc>python</toc>
+ <toc>python_bugs</toc>
+ <toc>ruby</toc>
+ <toc>ruby_bugs</toc>
+ <toc>sdl</toc>
+ <toc>stl</toc>
+ <toc>sw</toc>
+ <toc>w3c-dom-level2-html</toc>
+ <toc>w3c-svg</toc>
+ <toc>w3c-uaag10</toc>
+ <toc>wxwidgets_bugs</toc>
+ </ignoretocs>
+ <ignoreqt_xml>
+ <toc>Guide to the Qt Translation Tools</toc>
+ <toc>Qt Assistant Manual</toc>
+ <toc>Qt Designer Manual</toc>
+ <toc>Qt Reference Documentation</toc>
+ </ignoreqt_xml>
+ </kdevdoctreeview>
+ <kdevdebugger>
+ <general>
+ <dbgshell>libtool</dbgshell>
+ </general>
+ </kdevdebugger>
+ <kdevfilecreate>
+ <filetypes/>
+ <useglobaltypes>
+ <type ext="cpp" />
+ <type ext="h" />
+ </useglobaltypes>
+ </kdevfilecreate>
+ <kdevdocumentation>
+ <projectdoc>
+ <docsystem>Doxygen Documentation Collection</docsystem>
+ <docurl>%{APPNAMELC}.tag</docurl>
+ </projectdoc>
+ </kdevdocumentation>
+</kdevelop>
diff --git a/languages/cpp/app_templates/kioslave/slave.protocol b/languages/cpp/app_templates/kioslave/slave.protocol
new file mode 100644
index 00000000..2e2cc076
--- /dev/null
+++ b/languages/cpp/app_templates/kioslave/slave.protocol
@@ -0,0 +1,39 @@
+[Protocol]
+exec=kio_%{APPNAMELC}
+protocol=%{APPNAMELC}
+input=none
+output=stream
+reading=true
+defaultMimetype=text/plain
+Icon=remote
+Description=A kioslave for %{APPNAMELC}
+Description[br]=Ur c'hioslave evit %{APPNAMELC}
+Description[ca]=Un kioslave per a %{APPNAMELC}
+Description[da]=En kioslave til %{APPNAMELC}
+Description[de]=Ein Ein-/Ausgabemodul für %{APPNAMELC}
+Description[el]=Ένα υπηρέτης kio για %{APPNAMELC}
+Description[es]=Un kioslave para %{APPNAMELC}
+Description[et]=%{APPNAMELC} IO-moodul
+Description[eu]=kioslave bat honentzat: %{APPNAMELC}
+Description[fa]=یک kioslave برای %{APPNAMELC}
+Description[fr]=Un esclave d'E/S (kioslave) pour %{APPNAMELC}
+Description[ga]=kioslave le haghaidh %{APPNAMELC}
+Description[gl]=Un kioslave para %{APPNAMELC}
+Description[hu]=%{APPNAMELC}-támogató KIOslave
+Description[it]=Un kioslave per %{APPNAMELC}
+Description[ja]=%{APPNAMELC} のための kioslave
+Description[nds]=En In-/Utgaavmoduul för %{APPNAMELC}
+Description[ne]= %{APPNAMELC} का लागि किवस्लेभ
+Description[nl]=Kioslave voor %{APPNAMELC}
+Description[pl]=kioslave dla %{APPNAMELC}
+Description[pt]=Um 'kioslave' para %{APPNAMELC}
+Description[pt_BR]=Um kioslave para %{APPNAMELC}
+Description[ru]=Канал kioslave для %{APPNAMELC}
+Description[sk]=kioslave pre %{APPNAMELC}
+Description[sl]=kioslave za %{APPNAMELC}
+Description[sr]=KIOSlave за %{APPNAMELC}
+Description[sr@Latn]=KIOSlave za %{APPNAMELC}
+Description[sv]=En I/O-slav för %{APPNAMELC}
+Description[tr]=%{APPNAMELC} için bir kioslave
+Description[zh_CN]=%{APPNAMELC} 的 kioslave
+Description[zh_TW]=%{APPNAMELC} 的 kioslave
diff --git a/languages/cpp/app_templates/kioslave/src-Makefile.am b/languages/cpp/app_templates/kioslave/src-Makefile.am
new file mode 100644
index 00000000..957ec330
--- /dev/null
+++ b/languages/cpp/app_templates/kioslave/src-Makefile.am
@@ -0,0 +1,14 @@
+INCLUDES = $(all_includes)
+
+kde_module_LTLIBRARIES = kio_%{APPNAMELC}.la
+
+kio_%{APPNAMELC}_la_SOURCES = %{APPNAMELC}.cpp
+kio_%{APPNAMELC}_la_LIBADD = -lkio
+kio_%{APPNAMELC}_la_LDFLAGS = -module -avoid-version $(all_libraries) $(KDE_PLUGIN)
+
+protocol_DATA = %{APPNAMELC}.protocol
+protocoldir = $(kde_servicesdir)
+
+messages: rc.cpp
+ $(EXTRACTRC) `find . -name \*.ui -o -name \*.rc` > rc.cpp
+ $(XGETTEXT) *.cpp -o $(podir)/kio_%{APPNAMELC}.pot
diff --git a/languages/cpp/app_templates/kioslave/subdirs b/languages/cpp/app_templates/kioslave/subdirs
new file mode 100644
index 00000000..0e678106
--- /dev/null
+++ b/languages/cpp/app_templates/kioslave/subdirs
@@ -0,0 +1,3 @@
+doc
+po
+src