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

dcop

  • dcop
dcopobject.h
1/*
2Copyright (c) 1999,2000 Preston Brown <pbrown@kde.org>
3Copyright (c) 1999, 2000 Matthias Ettrich <ettrich@kde.org>
4
5Permission is hereby granted, free of charge, to any person obtaining a copy
6of this software and associated documentation files (the "Software"), to deal
7in the Software without restriction, including without limitation the rights
8to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9copies of the Software, and to permit persons to whom the Software is
10furnished to do so, subject to the following conditions:
11
12The above copyright notice and this permission notice shall be included in
13all copies or substantial portions of the Software.
14
15THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
19AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
20CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
21*/
22
23#ifndef _DCOPOBJECT_H
24#define _DCOPOBJECT_H
25
26#include <tqobject.h>
27#include <tqmap.h>
28#include <tqstring.h>
29#include <tqptrlist.h>
30#include <tqvaluelist.h>
31#include <kdatastream.h> // needed for proper bool marshalling
32#include "tdelibs_export.h"
33
34class DCOPClient;
35typedef TQValueList<TQCString> QCStringList;
36
37// Makros for DCOP interfaces
38
39#define K_DCOP \
40public: \
41 virtual bool process(const TQCString &fun, const TQByteArray &data, TQCString& replyType, TQByteArray &replyData); \
42 QCStringList functions(); \
43 QCStringList interfaces(); \
44private:
45
46#define k_dcop_signals public
47#define k_dcop_hidden public
48#define k_dcop public
49#define ASYNC void
50
67class DCOP_EXPORT DCOPObject
68{
69public:
74 DCOPObject();
80 DCOPObject(TQObject *obj);
85 DCOPObject(const TQCString &objId);
90 virtual ~DCOPObject();
91
96 TQCString objId() const;
97
104 bool setObjId(const TQCString &objId);
105
137 virtual bool process(const TQCString &fun, const TQByteArray &data,
138 TQCString& replyType, TQByteArray &replyData);
139
140
163 virtual bool processDynamic(const TQCString &fun, const TQByteArray &data,
164 TQCString& replyType, TQByteArray &replyData);
165
177 virtual QCStringList functionsDynamic();
178
190 virtual QCStringList interfacesDynamic();
191
201 virtual QCStringList interfaces();
202
221 virtual QCStringList functions();
222
229 void emitDCOPSignal( const TQCString &signal, const TQByteArray &data);
230
250 bool connectDCOPSignal( const TQCString &sender, const TQCString &senderObj,
251 const TQCString &signal,
252 const TQCString &slot,
253 bool Volatile);
254
272 bool disconnectDCOPSignal( const TQCString &sender, const TQCString &senderObj,
273 const TQCString &signal,
274 const TQCString &slot);
275
284 DCOPClient *callingDcopClient();
285
290 void setCallingDcopClient(DCOPClient *);
291
299 static bool hasObject(const TQCString &objId);
300
307 static DCOPObject *find(const TQCString &objId);
308
309
319 static TQPtrList<DCOPObject> match(const TQCString &partialId);
320
327 static TQCString objectName( TQObject* obj );
328
329private:
333 TQCString ident;
334
335protected:
336 virtual void virtual_hook( int id, void* data );
337private:
338 class DCOPObjectPrivate;
339 DCOPObjectPrivate *d;
340};
341
342class DCOPObjectProxyPrivate;
352class DCOP_EXPORT DCOPObjectProxy
353{
354public:
358 DCOPObjectProxy();
359
366 DCOPObjectProxy( DCOPClient*);
367
371 virtual ~DCOPObjectProxy();
372
394 virtual bool process( const TQCString& obj, const TQCString& fun,
395 const TQByteArray& data,
396 TQCString& replyType, TQByteArray &replyData );
397private:
398 void* unused;
399 void* unused_too;
400 friend class DCOPClient;
401 static TQPtrList<DCOPObjectProxy>* proxies;
402protected:
403 virtual void virtual_hook( int id, void* data );
404private:
405 DCOPObjectProxyPrivate* d;
406};
407
408
409
410#endif
DCOPClient
Inter-process communication and remote procedure calls for KDE applications.
Definition: dcopclient.h:69
DCOPObjectProxy
You must use a proxy if you want to dispatch method calls for object IDs which don't have (yet) a cor...
Definition: dcopobject.h:353
DCOPObject
Provides an interface for receiving DCOP messages.
Definition: dcopobject.h:68

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.4
This website is maintained by Timothy Pearson.