• 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::DCOPObjectProxy
DCOPObjectProxy()
Creates a new proxy.
Definition dcopobject.cpp:250
DCOPObjectProxy::process
virtual bool process(const TQCString &obj, const TQCString &fun, const TQByteArray &data, TQCString &replyType, TQByteArray &replyData)
Reimplement this method to dispatch method calls.
Definition dcopobject.cpp:270
DCOPObject::processDynamic
virtual bool processDynamic(const TQCString &fun, const TQByteArray &data, TQCString &replyType, TQByteArray &replyData)
This function is of interest when you used an IDL compiler to generate the implementation for process...
Definition dcopobject.cpp:183
DCOPObject::objectName
static TQCString objectName(TQObject *obj)
Creates an object id for the TQObject obj.
Definition dcopobject.cpp:146
DCOPObject::connectDCOPSignal
bool connectDCOPSignal(const TQCString &sender, const TQCString &senderObj, const TQCString &signal, const TQCString &slot, bool Volatile)
Connects to a DCOP signal.
Definition dcopobject.cpp:220
DCOPObject::match
static TQPtrList< DCOPObject > match(const TQCString &partialId)
Tries to find an object using a partial object id.
Definition dcopobject.cpp:135
DCOPObject::interfaces
virtual QCStringList interfaces()
Returns the names of the interfaces, specific ones last.
Definition dcopobject.cpp:198
DCOPObject::hasObject
static bool hasObject(const TQCString &objId)
Checks whether an object with the given id is known in this process.
Definition dcopobject.cpp:117
DCOPObject::DCOPObject
DCOPObject()
Creates a DCOPObject and calculates the object id using its physical memory address.
Definition dcopobject.cpp:47
DCOPObject::objId
TQCString objId() const
Returns the object id of the DCOPObject.
Definition dcopobject.cpp:112
DCOPObject::interfacesDynamic
virtual QCStringList interfacesDynamic()
This function is of interest when you used an IDL compiler to generate the implementation for interfa...
Definition dcopobject.cpp:187
DCOPObject::setObjId
bool setObjId(const TQCString &objId)
Renames a dcop object, if no other with the same name exists Use with care, all dcop signals are disc...
Definition dcopobject.cpp:98
DCOPObject::disconnectDCOPSignal
bool disconnectDCOPSignal(const TQCString &sender, const TQCString &senderObj, const TQCString &signal, const TQCString &slot)
Disconnects a DCOP signal.
Definition dcopobject.cpp:234
DCOPObject::functions
virtual QCStringList functions()
Returns the list of functions understood by the object.
Definition dcopobject.cpp:205
DCOPObject::find
static DCOPObject * find(const TQCString &objId)
Try to find a dcop object with the given id.
Definition dcopobject.cpp:125
DCOPObject::functionsDynamic
virtual QCStringList functionsDynamic()
This function is of interest when you used an IDL compiler to generate the implementation for functio...
Definition dcopobject.cpp:193
DCOPObject::process
virtual bool process(const TQCString &fun, const TQByteArray &data, TQCString &replyType, TQByteArray &replyData)
Dispatches a message.
Definition dcopobject.cpp:166
DCOPObject::callingDcopClient
DCOPClient * callingDcopClient()
Returns the DCOPClient responsible for making the call.
Definition dcopobject.cpp:88
DCOPObject::emitDCOPSignal
void emitDCOPSignal(const TQCString &signal, const TQByteArray &data)
Emit signal as DCOP signal from this object with data as arguments.
Definition dcopobject.cpp:213

dcop

Skip menu "dcop"
  • Main Page
  • 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.15.0
This website is maintained by Timothy Pearson.