29 #include <tqapplication.h>
30 #include <tqbitarray.h>
31 #include <dcopclient.h>
32 #include <dcopobject.h>
52 void slotCallBack(
int,
const TQCString&,
const TQByteArray&);
59 class MyDCOPObject :
public TQObject,
public DCOPObject
63 MyDCOPObject(
const TQCString &name) :
DCOPObject(name) {}
64 bool process(
const TQCString &fun,
const TQByteArray &data,
65 TQCString& replyType, TQByteArray &replyData);
66 void function(
const TQString &arg1,
int arg2) { tqDebug(
"function got arg: %s and %d", arg1.utf8().data(), arg2); }
70 void registered(
const TQCString &appName)
71 { printf(
"REGISTER: %s\n", appName.data()); }
73 void unregistered(
const TQCString &appName)
74 { printf(
"UNREGISTER: %s\n", appName.data()); }
virtual QCStringList functions()
Returns the list of functions understood by the object.
$TQTDIR/bin/moc testdcop.cpp -o testdcop.moc g++ -o testdcop testdcop.cpp -I$TQTDIR/include -L$TQTDIR...
Provides an interface for receiving DCOP messages.
virtual bool process(const TQCString &fun, const TQByteArray &data, TQCString &replyType, TQByteArray &replyData)
Dispatches a message.