From 114a878c64ce6f8223cfd22d76a20eb16d177e5e Mon Sep 17 00:00:00 2001 From: toma Date: Wed, 25 Nov 2009 17:56:58 +0000 Subject: Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features. BUG:215923 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdevelop@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- .../ruby/app_templates/dcopservice/dcopservice.rb | 37 ++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 languages/ruby/app_templates/dcopservice/dcopservice.rb (limited to 'languages/ruby/app_templates/dcopservice/dcopservice.rb') diff --git a/languages/ruby/app_templates/dcopservice/dcopservice.rb b/languages/ruby/app_templates/dcopservice/dcopservice.rb new file mode 100644 index 00000000..94a03ec9 --- /dev/null +++ b/languages/ruby/app_templates/dcopservice/dcopservice.rb @@ -0,0 +1,37 @@ + +class %{APPNAME} < KDE::DCOPObject + + k_dcop 'QString string(int)', + 'QStringList list()', + 'void add(QString)', + 'bool remove(QString)', + 'bool exit()' + + def initialize() + super("serviceInterface") + puts "Starting new service... " + @list = [] + end + + def string(idx) + return @list[idx] + end + + def list() + return @list + end + + def add(arg) + puts "Adding " + arg + " to the list" + @list << arg + end + + def remove(arg) + @list.delete(arg) ? true : false + end + + def exit() + $kapp.quit() + return true + end +end -- cgit v1.2.1