summaryrefslogtreecommitdiffstats
path: root/kded/test
diff options
context:
space:
mode:
Diffstat (limited to 'kded/test')
-rw-r--r--kded/test/Makefile.am16
-rw-r--r--kded/test/test.cpp43
-rw-r--r--kded/test/test.desktop173
-rw-r--r--kded/test/test.h23
4 files changed, 255 insertions, 0 deletions
diff --git a/kded/test/Makefile.am b/kded/test/Makefile.am
new file mode 100644
index 000000000..788ea1a5f
--- /dev/null
+++ b/kded/test/Makefile.am
@@ -0,0 +1,16 @@
+# $Id$
+
+INCLUDES= -I$(srcdir)/.. $(all_includes)
+
+####### Files
+
+kde_module_LTLIBRARIES = kded_test.la
+
+kded_test_la_SOURCES = test.cpp test.skel
+kded_test_la_METASOURCES = AUTO
+kded_test_la_LDFLAGS = $(all_libraries) -module -avoid-version
+kded_test_la_LIBADD = $(LIB_KDECORE)
+
+servicesdir = $(kde_servicesdir)/kded
+services_DATA = test.desktop
+
diff --git a/kded/test/test.cpp b/kded/test/test.cpp
new file mode 100644
index 000000000..3e130abf6
--- /dev/null
+++ b/kded/test/test.cpp
@@ -0,0 +1,43 @@
+#include "test.h"
+
+class TestObject : public KShared
+{
+public:
+ TestObject(const QCString &_app) : app(_app)
+ { qWarning("Creating TestObject belonging to '%s'", app.data()); }
+ ~TestObject()
+ { qWarning("Destructing TestObject belonging to '%s'", app.data()); }
+protected:
+ QCString app;
+};
+
+TestModule::TestModule(const QCString &obj) : KDEDModule(obj)
+{
+ // Do stuff here
+ setIdleTimeout(15); // 15 seconds idle timeout.
+}
+
+QString TestModule::world()
+{
+ return "Hello World!";
+}
+
+void TestModule::idle()
+{
+ qWarning("TestModule is idle.");
+}
+
+void TestModule::registerMe(const QCString &app)
+{
+ insert(app, "test", new TestObject(app));
+ // When 'app' unregisters with DCOP, the TestObject will get deleted.
+}
+
+extern "C" {
+ KDE_EXPORT KDEDModule *create_test(const QCString &obj)
+ {
+ return new TestModule(obj);
+ }
+};
+
+#include "test.moc"
diff --git a/kded/test/test.desktop b/kded/test/test.desktop
new file mode 100644
index 000000000..b70407f93
--- /dev/null
+++ b/kded/test/test.desktop
@@ -0,0 +1,173 @@
+[Desktop Entry]
+Type=Service
+
+ServiceTypes=KDEDModule
+X-KDE-ModuleType=Library
+X-KDE-Library=test
+X-KDE-Factory=test
+X-KDE-Kded-autoload=false
+X-KDE-Kded-load-on-demand=true
+
+Name=KDED Test Module
+Name[af]=Kded Toets Module
+Name[ar]=وحدة KDED اختبارية
+Name[az]=KDE Sınaq Modulu
+Name[be]=Тэставы модуль KDED
+Name[bg]=Тестов модул KDED
+Name[bn]=KDED টেস্ট মডিউল
+Name[bs]=KDED probni modul
+Name[ca]=Mòdul de proves per a KDED
+Name[cs]=Testovací KDED modul
+Name[csb]=Testowi mòduł KDED
+Name[cy]=Modiwl Arbrofi KDED
+Name[da]=KDED-testmodul
+Name[de]=KDED-Testmodul
+Name[el]=Άρθρωμα δοκιμής KDED
+Name[eo]=KDED-testmodulo
+Name[es]=Módulo de prueba de KDED
+Name[et]=KDED testmoodul
+Name[eu]=KDED probako modulua
+Name[fa]=پیمانۀ آزمون KDED
+Name[fi]=KDED-testimoduuli
+Name[fr]=Module de test KDED
+Name[fy]=KDED Testmodule
+Name[ga]=Modúl Tástála KDED
+Name[gl]=Módulo de Proba de KDED
+Name[he]=מודול ניסיון של KDED
+Name[hi]=KDED-जाँच घटक (मॉड्यूल)
+Name[hr]=KDED probni modul
+Name[hsb]=Testowy modul za KDED
+Name[hu]=KDED tesztmodul
+Name[id]=Modul Uji KDED
+Name[is]=KDED prufueining
+Name[it]=Modulo di prova di KDED
+Name[ja]=KDED テストモジュール
+Name[ka]=KDED ტესტური მოდული
+Name[kk]=KDED сынақ модулі
+Name[km]=ម៉ូឌុល​សាកល្បង KDED
+Name[ko]=KDED 시험 모듈
+Name[lb]=KDED-Testmodul
+Name[lt]=KDED testinis modulis
+Name[lv]=KDED Testa Modulis
+Name[mk]=KDED Тест модул
+Name[mn]=KDED-Тест модул
+Name[ms]=Modul Uji KDED
+Name[mt]=Modulu test KDED
+Name[nb]=KDED-testmodul
+Name[nds]=KDED-Testmoduul
+Name[ne]=KDED पाठ मोड्युल
+Name[nn]=KDED-testmodul
+Name[nso]=Seripa sa Teko ya KDED
+Name[pa]=KDED ਜਾਂਚ ਮੈਡੀਊਲ
+Name[pl]=Moduł testowy KDED
+Name[pt]=Módulo de Teste do KDED
+Name[pt_BR]=Módulo de Teste KDED
+Name[ro]=Modul de test KDED
+Name[ru]=Тестовая служба KDED
+Name[rw]=Igice cyo kugerageza KDED
+Name[se]=KDED-geahččalanmoduvla
+Name[sk]=Testovací modul KDED
+Name[sl]=Preizkusni modul KDED
+Name[sq]=KDED Moduli për testim
+Name[sr]=KDED пробни модул
+Name[sr@Latn]=KDED probni modul
+Name[ss]=Sahluko seluhlolo ku KDE
+Name[sv]=KDED-testmodul
+Name[ta]=KDED சோதனைக் கூறு
+Name[te]=కెడిఈడి పరీక్షా మాడ్యూల్
+Name[tg]=Модули санҷишии KDED
+Name[th]=โมดูลทดสอบ KDED
+Name[tr]=KDED Test Modülü
+Name[tt]=KDED Sınaw Modulı
+Name[uk]=Модуль тестування KDED
+Name[uz]=KDED sinov moduli
+Name[uz@cyrillic]=KDED синов модули
+Name[ven]=Modulu ya mulingo wa KDED
+Name[vi]=Mô-đun thử ra KDED
+Name[xh]=Isichatshulwa Sovavanyo lwe KDED
+Name[zh_CN]=KDED 测试模块
+Name[zh_HK]=KDED 測試模組
+Name[zh_TW]=KDED 測試模組
+Name[zu]=Ingxenye Yokuvivinya ye-KDED
+Comment=A Test Module for KDED
+Comment[af]='n Toets Module vir Kded
+Comment[ar]=وحدة اختبارية لKDED
+Comment[az]=KDED üçün Sınaq Modulu
+Comment[be]=Тэставы модуль для KDED
+Comment[bg]=Тестов модул KDED
+Comment[bn]=KDED-র জন্য একটি টেস্ট মডিউল
+Comment[bs]=Probni modul za KDED
+Comment[ca]=Un mòdul de prova per a KDED
+Comment[cs]=Testovací modul pro KDED
+Comment[csb]=Testowi mòduł dlô KDED
+Comment[cy]=Modiwl Arbrofi i KDED
+Comment[da]=Et testmodul for KDED
+Comment[de]=Testmodul für KDED
+Comment[el]=Δοκιμαστικό άρθρωμα για το KDED
+Comment[eo]=Testmodulo por KDED
+Comment[es]=Un módulo de prueba para KDED
+Comment[et]=KDED testmoodul
+Comment[eu]=KDEDren probako modulua
+Comment[fa]=پیمانۀ آزمون برای KDED
+Comment[fi]=Testimoduuli KDED:lle
+Comment[fr]=Un module de test pour KDED
+Comment[fy]=In testmodule foar KDED
+Comment[ga]=Modúl Tástála le haghaidh KDED
+Comment[gl]=Un Módulo de Proba para KDED
+Comment[he]=מודול ניסיון ל־KDED
+Comment[hi]=KDED के लिए जाँच घटक (टेस्ट मॉड्यूल)
+Comment[hr]=Probni modul za KDED
+Comment[hsb]=Testowy modul za KDED
+Comment[hu]=Tesztmodul a KDED-hez
+Comment[id]=Modul pengujian untuk KDED
+Comment[is]=Prufueining fyrir KDED
+Comment[it]=Modulo di prova per KDED
+Comment[ja]=KDED のテストモジュール
+Comment[ka]=KDED-ს ტესტური მოდული
+Comment[kk]=KDED үшін сынақ модулі
+Comment[km]=ម៉ូឌុល​សាកល្បង​មួយ​សម្រាប់ KDED
+Comment[ko]=KDED를 시험하는 모듈
+Comment[lb]=En Testmodul fir KDED
+Comment[lt]=KDED testinis modulis
+Comment[lv]=KDED Testa Modulis
+Comment[mk]=Тест модул за KDED
+Comment[mn]=KDED-н тест модул
+Comment[ms]=Modul Uji untuk KDED
+Comment[mt]=Modulu għal testijiet ta' KDED
+Comment[nb]=En test-modul for KDED
+Comment[nds]=En Testmoduul för KDED
+Comment[ne]=KDED का लागि एउटा पाठ मोड्युल
+Comment[nl]=Een testmodule voor KDED
+Comment[nn]=Testmodul for KDED
+Comment[nso]=Seripa sa Teko sa KDED
+Comment[pa]=KDED ਲਈ ਜਾਂਚ ਮੈਡੀਊਲ
+Comment[pl]=Moduł testowy KDED
+Comment[pt]=Um módulo de teste para o KDED
+Comment[pt_BR]=Um módulo de Teste para KDED
+Comment[ro]=Un modul de test pentru KDED
+Comment[ru]=Тестовая служба KDED
+Comment[rw]=Igice cyo kugerageza KDED
+Comment[se]=Geahččalanmoduvla KDED:a várás
+Comment[sk]=Testovací modul pre KDED
+Comment[sl]=Preizkusni modul za KDED
+Comment[sq]=Një Modul Testimi për KDED
+Comment[sr]=Пробни модул за KDED
+Comment[sr@Latn]=Probni modul za KDED
+Comment[ss]=Sahluko seluhlolo se KDED
+Comment[sv]=Testmodul för KDED
+Comment[ta]=KDED சோதனைக் கூறு
+Comment[te]=కెడిఈడి కొరకు ఒక పరీక్షా మాడ్యూల్
+Comment[tg]=Модули санҷишии KDED
+Comment[th]=โมดูลสำหรับทดสอบ KDED
+Comment[tr]=KDED için bir Test Modülü
+Comment[tt]=KDED öçen Sınaw Modulı
+Comment[uk]=Модуль тестування для KDED
+Comment[uz]=KDED uchun sinov moduli
+Comment[uz@cyrillic]=KDED учун синов модули
+Comment[ven]=Modulu ya mulingo ya KDED
+Comment[vi]=Một mô-đun thử ra cho KDED.
+Comment[xh]=Isichatshulwa Sovavavanyo lwe KDED
+Comment[zh_CN]=KDED 的测试模块
+Comment[zh_HK]=KDED 的測試模組
+Comment[zh_TW]=KDED 的測試模組
+Comment[zu]=Ingxenye Yokuvivinya ye-KDED
diff --git a/kded/test/test.h b/kded/test/test.h
new file mode 100644
index 000000000..c805b7921
--- /dev/null
+++ b/kded/test/test.h
@@ -0,0 +1,23 @@
+/* This code is placed in the public domain */
+/* Waldo Bastian - 2001/04/01 */
+
+#ifndef _TEST_H_
+#define _TEST_H_
+
+#include "kdedmodule.h"
+
+class TestModule : public KDEDModule
+{
+ Q_OBJECT
+ K_DCOP
+public:
+ TestModule(const QCString &obj);
+
+ void idle();
+
+k_dcop:
+ QString world();
+ void registerMe(const QCString &app);
+};
+
+#endif