diff options
Diffstat (limited to 'languages/cpp/app_templates/tdeioslave')
-rw-r--r-- | languages/cpp/app_templates/tdeioslave/.kdev_ignore | 0 | ||||
-rw-r--r-- | languages/cpp/app_templates/tdeioslave/CMakeLists.txt | 26 | ||||
-rw-r--r-- | languages/cpp/app_templates/tdeioslave/Makefile.am | 17 | ||||
-rw-r--r-- | languages/cpp/app_templates/tdeioslave/slave.cpp | 88 | ||||
-rw-r--r-- | languages/cpp/app_templates/tdeioslave/slave.h | 23 | ||||
-rw-r--r-- | languages/cpp/app_templates/tdeioslave/slave.protocol | 39 | ||||
-rw-r--r-- | languages/cpp/app_templates/tdeioslave/slave.tdevelop | 113 | ||||
-rw-r--r-- | languages/cpp/app_templates/tdeioslave/src-Makefile.am | 14 | ||||
-rw-r--r-- | languages/cpp/app_templates/tdeioslave/subdirs | 3 | ||||
-rw-r--r-- | languages/cpp/app_templates/tdeioslave/tdeioslave.kdevtemplate | 183 | ||||
-rw-r--r-- | languages/cpp/app_templates/tdeioslave/tdeioslave.png | bin | 0 -> 9524 bytes |
11 files changed, 506 insertions, 0 deletions
diff --git a/languages/cpp/app_templates/tdeioslave/.kdev_ignore b/languages/cpp/app_templates/tdeioslave/.kdev_ignore new file mode 100644 index 00000000..e69de29b --- /dev/null +++ b/languages/cpp/app_templates/tdeioslave/.kdev_ignore diff --git a/languages/cpp/app_templates/tdeioslave/CMakeLists.txt b/languages/cpp/app_templates/tdeioslave/CMakeLists.txt new file mode 100644 index 00000000..584bdc19 --- /dev/null +++ b/languages/cpp/app_templates/tdeioslave/CMakeLists.txt @@ -0,0 +1,26 @@ +################################################# +# +# (C) 2010-2011 Serghei Amelian +# serghei (DOT) amelian (AT) gmail.com +# +# Improvements and feedback are welcome +# +# This file is released under GPL >= 2 +# +################################################# + +add_custom_target( tdeioslave.tar.gz ALL + COMMAND tar zcf tdeioslave.tar.gz -C ${CMAKE_CURRENT_SOURCE_DIR} + slave.cpp slave.h slave.protocol slave.tdevelop + src-Makefile.am tdeioslave.png subdirs +) + + +install( FILES + ${CMAKE_CURRENT_BINARY_DIR}/tdeioslave.tar.gz tdeioslave.png + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard ) + + +install( FILES + tdeioslave.kdevtemplate + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard/templates ) diff --git a/languages/cpp/app_templates/tdeioslave/Makefile.am b/languages/cpp/app_templates/tdeioslave/Makefile.am new file mode 100644 index 00000000..bee7ddb6 --- /dev/null +++ b/languages/cpp/app_templates/tdeioslave/Makefile.am @@ -0,0 +1,17 @@ +dataFiles = slave.cpp slave.h slave.protocol slave.tdevelop \ + src-Makefile.am tdeioslave.png subdirs +templateName = tdeioslave + +### 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/tdeioslave/slave.cpp b/languages/cpp/app_templates/tdeioslave/slave.cpp new file mode 100644 index 00000000..3c780e7f --- /dev/null +++ b/languages/cpp/app_templates/tdeioslave/slave.cpp @@ -0,0 +1,88 @@ + +#include <tqcstring.h> +#include <tqsocket.h> +#include <tqdatetime.h> +#include <tqbitarray.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 TDEIO; + + +kio_%{APPNAMELC}Protocol::kio_%{APPNAMELC}Protocol(const TQCString &pool_socket, const TQCString &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; + TQString 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 + TQString theData = "This is a test of kio_%{APPNAMELC}"; + data(TQCString(theData.local8Bit())); + data(TQByteArray()); // 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) + { + TDEInstance 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/tdeioslave/slave.h b/languages/cpp/app_templates/tdeioslave/slave.h new file mode 100644 index 00000000..672e6121 --- /dev/null +++ b/languages/cpp/app_templates/tdeioslave/slave.h @@ -0,0 +1,23 @@ + +#ifndef _%{APPNAMELC}_H_ +#define _%{APPNAMELC}_H_ + +#include <tqstring.h> +#include <tqcstring.h> + +#include <kurl.h> +#include <tdeio/global.h> +#include <tdeio/slavebase.h> + +class TQCString; + +class kio_%{APPNAMELC}Protocol : public TDEIO::SlaveBase +{ +public: + kio_%{APPNAMELC}Protocol(const TQCString &pool_socket, const TQCString &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/tdeioslave/slave.protocol b/languages/cpp/app_templates/tdeioslave/slave.protocol new file mode 100644 index 00000000..5a1f6445 --- /dev/null +++ b/languages/cpp/app_templates/tdeioslave/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 tdeioslave for %{APPNAMELC} +Description[br]=Ur c'hioslave evit %{APPNAMELC} +Description[ca]=Un tdeioslave per a %{APPNAMELC} +Description[da]=En tdeioslave til %{APPNAMELC} +Description[de]=Ein Ein-/Ausgabemodul für %{APPNAMELC} +Description[el]=Ένα υπηρέτης kio για %{APPNAMELC} +Description[es]=Un tdeioslave para %{APPNAMELC} +Description[et]=%{APPNAMELC} IO-moodul +Description[eu]=tdeioslave bat honentzat: %{APPNAMELC} +Description[fa]=یک tdeioslave برای %{APPNAMELC} +Description[fr]=Un esclave d'E/S (tdeioslave) pour %{APPNAMELC} +Description[ga]=tdeioslave le haghaidh %{APPNAMELC} +Description[gl]=Un tdeioslave para %{APPNAMELC} +Description[hu]=%{APPNAMELC}-támogató KIOslave +Description[it]=Un tdeioslave per %{APPNAMELC} +Description[ja]=%{APPNAMELC} のための tdeioslave +Description[nds]=En In-/Utgaavmoduul för %{APPNAMELC} +Description[ne]= %{APPNAMELC} का लागि किवस्लेभ +Description[nl]=Kioslave voor %{APPNAMELC} +Description[pl]=tdeioslave dla %{APPNAMELC} +Description[pt]=Um 'tdeioslave' para %{APPNAMELC} +Description[pt_BR]=Um tdeioslave para %{APPNAMELC} +Description[ru]=Канал tdeioslave для %{APPNAMELC} +Description[sk]=tdeioslave pre %{APPNAMELC} +Description[sl]=tdeioslave 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 tdeioslave +Description[zh_CN]=%{APPNAMELC} 的 tdeioslave +Description[zh_TW]=%{APPNAMELC} 的 tdeioslave diff --git a/languages/cpp/app_templates/tdeioslave/slave.tdevelop b/languages/cpp/app_templates/tdeioslave/slave.tdevelop new file mode 100644 index 00000000..cb257385 --- /dev/null +++ b/languages/cpp/app_templates/tdeioslave/slave.tdevelop @@ -0,0 +1,113 @@ +<?xml version="1.0"?> +<tdevelop> + <general> + <author>%{AUTHOR}</author> + <email>%{EMAIL}</email> + <version>%{VERSION}</version> + <projectmanagement>KDevTDEAutoProject</projectmanagement> + <primarylanguage>C++</primarylanguage> + <keywords> + <keyword>C++</keyword> + <keyword>Code</keyword> + <keyword>Qt</keyword> + <keyword>TDE</keyword> + <keyword>tdeioslave</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> +</tdevelop> diff --git a/languages/cpp/app_templates/tdeioslave/src-Makefile.am b/languages/cpp/app_templates/tdeioslave/src-Makefile.am new file mode 100644 index 00000000..b160d973 --- /dev/null +++ b/languages/cpp/app_templates/tdeioslave/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) $(LIB_QT) $(LIB_TDECORE) $(LIB_TDEUI) $(LIB_KPARTS) + +protocol_DATA = %{APPNAMELC}.protocol +protocoldir = $(kde_servicesdir) + +messages: rc.cpp + $(EXTRACTRC) `find . -name \*.ui -o -name \*.rc` > rc.cpp + $(XGETTEXT) *.cpp -o $(podir)/tdeio_%{APPNAMELC}.pot diff --git a/languages/cpp/app_templates/tdeioslave/subdirs b/languages/cpp/app_templates/tdeioslave/subdirs new file mode 100644 index 00000000..0e678106 --- /dev/null +++ b/languages/cpp/app_templates/tdeioslave/subdirs @@ -0,0 +1,3 @@ +doc +po +src diff --git a/languages/cpp/app_templates/tdeioslave/tdeioslave.kdevtemplate b/languages/cpp/app_templates/tdeioslave/tdeioslave.kdevtemplate new file mode 100644 index 00000000..27279fd2 --- /dev/null +++ b/languages/cpp/app_templates/tdeioslave/tdeioslave.kdevtemplate @@ -0,0 +1,183 @@ +# TDE 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]=TDE-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=tdeioslave.png +Category=C++/TDE +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 для TDE +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=tdeioslave.tar.gz + +[ADMIN] +Type=include +File=%{tdevelop}/template-common/admin.kdevtemplate + +[GNU] +Type=include +File=%{tdevelop}/template-common/gnu.kdevtemplate + +[MKDIR_DOCBOOK1] +Type=mkdir +Dir=%{dest}/doc + +[MKDIR_DOCBOOK2] +Type=mkdir +Dir=%{dest}/doc/en + +[FILE1] +Type=install +Source=%{tdevelop}/template-common/kde-doc-Makefile.am +Dest=%{dest}/doc/Makefile.am + +[FILE2] +Type=install +Source=%{tdevelop}/template-common/kde-doc-en-Makefile.am +Dest=%{dest}/doc/en/Makefile.am + +[FILE3] +Type=install +EscapeXML=true +Source=%{tdevelop}/template-common/kde-index.docbook +Dest=%{dest}/doc/en/index.docbook + +[FILE4] +Type=install +EscapeXML=true +Source=%{src}/slave.tdevelop +Dest=%{dest}/%{APPNAMELC}.tdevelop + +[MkDir3] +Type=mkdir +Dir=%{dest}/src + +[FILE5] +Type=install +Source=%{tdevelop}/template-common/kde-app.lsm +Dest=%{dest}/src/%{APPNAMELC}.lsm + +[MkDir4] +Type=mkdir +Dir=%{dest}/po + +[FILE6] +Type=install +Source=%{tdevelop}/template-common/kde-po-Makefile.am +Dest=%{dest}/po/Makefile.am + +[FILE7] +Type=install +Source=%{tdevelop}/template-common/kde-Makefile.am +Dest=%{dest}/Makefile.am + +[FILE8] +Type=install +Source=%{tdevelop}/template-common/kde-Makefile.cvs +Dest=%{dest}/Makefile.cvs + +[FILE9] +Type=install +Source=%{tdevelop}/template-common/tde-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/tdeioslave/tdeioslave.png b/languages/cpp/app_templates/tdeioslave/tdeioslave.png Binary files differnew file mode 100644 index 00000000..f0cd89a8 --- /dev/null +++ b/languages/cpp/app_templates/tdeioslave/tdeioslave.png |