summaryrefslogtreecommitdiffstats
path: root/kdecore/tests/KIDLTest.cpp
blob: 89e2142fc92759d4f76c042693d7a133885b4013 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#include "KIDLTest.h"

#include <kapplication.h>
#include <dcopclient.h>

KIDLTest::KIDLTest( const QCString& id )
    : DCOPObject( id )
{
}

QString KIDLTest::hello( const QString& name )
{
    qDebug("Du heter %s", name.latin1() );
    qDebug("Ha det %s", name.latin1() );
	
    return QString("Jeg heter KIDLTest");
}

int main( int argc, char** argv )
{
    KApplication app( argc, argv, "kidlservertest", false /* No GUI */ );

    app.dcopClient()->attach();
    app.dcopClient()->registerAs( "kidlservertest" );

    qDebug("Server process started...");

    (void) new KIDLTest( "Hello" );

    qDebug("Server listening ...");

    return app.exec();
}