• Skip to content
  • Skip to link menu
Trinity API Reference
  • Trinity API Reference
  • dcop
 

dcop

  • dcop
testdcop.h
1 /*****************************************************************
2 
3 Copyright (c) 1999 Preston Brown <pbrown@kde.org>
4 Copyright (c) 1999 Matthias Ettrich <ettrich@kde.org>
5 
6 Permission is hereby granted, free of charge, to any person obtaining a copy
7 of this software and associated documentation files (the "Software"), to deal
8 in the Software without restriction, including without limitation the rights
9 to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 copies of the Software, and to permit persons to whom the Software is
11 furnished to do so, subject to the following conditions:
12 
13 The above copyright notice and this permission notice shall be included in
14 all copies or substantial portions of the Software.
15 
16 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
20 AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
21 CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22 
23 ******************************************************************
24 */
25 
26 #ifndef _TESTDCOP_H_
27 #define _TESTDCOP_H_
28 
29 #include <tqapplication.h>
30 #include <tqbitarray.h>
31 #include <dcopclient.h>
32 #include <dcopobject.h>
33 
34 #include <tqobject.h>
35 
36 #include <stdio.h>
44 class TestObject : public TQObject
45 {
46  TQ_OBJECT
47 public:
48  TestObject(const TQCString &app);
49 
50 public slots:
51  void slotTimeout();
52  void slotCallBack(int, const TQCString&, const TQByteArray&);
53 private:
54 
55  TQCString m_app;
56 };
57 
58 
59 class MyDCOPObject : public TQObject, public DCOPObject
60 {
61  TQ_OBJECT
62 public:
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); }
67 public slots:
68  void slotTimeout();
69  void slotTimeout2();
70  void registered(const TQCString &appName)
71  { printf("REGISTER: %s\n", appName.data()); }
72 
73  void unregistered(const TQCString &appName)
74  { printf("UNREGISTER: %s\n", appName.data()); }
75  QCStringList functions();
76 };
77 #endif
DCOPObject
Provides an interface for receiving DCOP messages.
Definition: dcopobject.h:68
DCOPObject::functions
virtual QCStringList functions()
Returns the list of functions understood by the object.
Definition: dcopobject.cpp:205
DCOPObject::process
virtual bool process(const TQCString &fun, const TQByteArray &data, TQCString &replyType, TQByteArray &replyData)
Dispatches a message.
Definition: dcopobject.cpp:166
TestObject
$TQTDIR/bin/moc testdcop.cpp -o testdcop.moc g++ -o testdcop testdcop.cpp -I$TQTDIR/include -L$TQTDIR...
Definition: testdcop.h:45

dcop

Skip menu "dcop"
  • Main Page
  • Modules
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Class Members
  • Related Pages

dcop

Skip menu "dcop"
  • arts
  • dcop
  • dnssd
  • interfaces
  •   kspeech
  •     interface
  •     library
  •   tdetexteditor
  • kate
  • kded
  • kdoctools
  • kimgio
  • kjs
  • libtdemid
  • libtdescreensaver
  • tdeabc
  • tdecmshell
  • tdecore
  • tdefx
  • tdehtml
  • tdeinit
  • tdeio
  •   bookmarks
  •   httpfilter
  •   kpasswdserver
  •   kssl
  •   tdefile
  •   tdeio
  •   tdeioexec
  • tdeioslave
  •   http
  • tdemdi
  •   tdemdi
  • tdenewstuff
  • tdeparts
  • tdeprint
  • tderandr
  • tderesources
  • tdespell2
  • tdesu
  • tdeui
  • tdeunittest
  • tdeutils
  • tdewallet
Generated for dcop by doxygen 1.9.1
This website is maintained by Timothy Pearson.