summaryrefslogtreecommitdiffstats
path: root/dcopjava/tests/test_impl.cpp
diff options
context:
space:
mode:
authortoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
committertoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
commit90825e2392b2d70e43c7a25b8a3752299a933894 (patch)
treee33aa27f02b74604afbfd0ea4f1cfca8833d882a /dcopjava/tests/test_impl.cpp
downloadtdebindings-90825e2392b2d70e43c7a25b8a3752299a933894.tar.gz
tdebindings-90825e2392b2d70e43c7a25b8a3752299a933894.zip
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/kdebindings@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'dcopjava/tests/test_impl.cpp')
-rw-r--r--dcopjava/tests/test_impl.cpp108
1 files changed, 108 insertions, 0 deletions
diff --git a/dcopjava/tests/test_impl.cpp b/dcopjava/tests/test_impl.cpp
new file mode 100644
index 00000000..c220b3f8
--- /dev/null
+++ b/dcopjava/tests/test_impl.cpp
@@ -0,0 +1,108 @@
+#include <stream.h>
+#include <stdio.h>
+
+
+#include "test_impl.h"
+
+
+void test_impl::noArg()
+{
+ printf("SERVER: noArg() called\n");
+}
+
+
+void test_impl::asyncNoArg()
+{
+ printf("SERVER: asyncNoArg() called\n");
+}
+
+
+void test_impl::oneArg(bool b)
+{
+ printf("SERVER: oneArg(");
+ printf(b ? "true" : "false");
+ printf(") called\n");
+}
+
+
+bool test_impl::returnFalse()
+{
+ printf("SERVER: returnFalse() called\n");
+ return false;
+}
+
+
+bool test_impl::returnTrue()
+{
+ printf("SERVER: returnTrue() called\n");
+ return true;
+}
+
+
+short test_impl::shortArg(short in)
+{
+ cout << "SERVER: short in: " << in << endl;
+ return 123;
+}
+
+
+int test_impl::intArg(int in)
+{
+ cout << "SERVER: int in: " << in << endl;
+ return 123456;
+}
+
+
+long test_impl::longArg(long in)
+{
+ cout << "SERVER: long in: " << in << endl;
+ return 1234567890;
+}
+
+
+float test_impl::floatArg(float in)
+{
+ cout << "SERVER: float in: " << in << endl;
+ return 12.34;
+}
+
+
+double test_impl::doubleArg(double in)
+{
+ cout << "SERVER: double in: " << in << endl;
+ return 12.12313123;
+}
+
+
+QString test_impl::stringArg(QString in)
+{
+ cout << "SERVER: QString in: " << in << endl;
+ return "Hello Java";
+}
+
+
+QCString test_impl::cstringArg(QCString in)
+{
+ cout << "SERVER: QCString in: " << in << endl;
+ return "Hello Java";
+}
+
+
+QStringList test_impl::stringListArg(QStringList in)
+{
+ cout << "SERVER: QStringList in: ";
+ for (uint i=0; i<in.count(); ++i)
+ cout << in[i] << ", ";
+ cout << endl;
+ QStringList result;
+ result << "one" << "two" << "three";
+ return result;
+}
+
+
+DCOPRef test_impl::DCOPRefArg(DCOPRef in)
+{
+ cout << "SERVER: DCOPRef in: " << in.app() << ", "
+ << in.object() << ", " << in.type() << endl;
+ return DCOPRef("application", "object", "type");
+}