DCOPObject Class Reference
Provides an interface for receiving DCOP messages. More...
#include <dcopobject.h>
Inheritance diagram for DCOPObject:

Public Member Functions | |
DCOPObject () | |
DCOPObject (QObject *obj) | |
DCOPObject (const QCString &objId) | |
virtual | ~DCOPObject () |
QCString | objId () const |
bool | setObjId (const QCString &objId) |
virtual bool | process (const QCString &fun, const QByteArray &data, QCString &replyType, QByteArray &replyData) |
virtual bool | processDynamic (const QCString &fun, const QByteArray &data, QCString &replyType, QByteArray &replyData) |
virtual QCStringList | functionsDynamic () |
virtual QCStringList | interfacesDynamic () |
virtual QCStringList | interfaces () |
virtual QCStringList | functions () |
void | emitDCOPSignal (const QCString &signal, const QByteArray &data) |
bool | connectDCOPSignal (const QCString &sender, const QCString &senderObj, const QCString &signal, const QCString &slot, bool Volatile) |
bool | disconnectDCOPSignal (const QCString &sender, const QCString &senderObj, const QCString &signal, const QCString &slot) |
DCOPClient * | callingDcopClient () |
void | setCallingDcopClient (DCOPClient *) |
Static Public Member Functions | |
bool | hasObject (const QCString &objId) |
DCOPObject * | find (const QCString &objId) |
QPtrList< DCOPObject > | match (const QCString &partialId) |
QCString | objectName (QObject *obj) |
Protected Member Functions | |
virtual void | virtual_hook (int id, void *data) |
Detailed Description
Provides an interface for receiving DCOP messages.This class provides an interface for receiving DCOP messages. To use it, simply multiply-inherit from DCOPObject and from some other class, and then implement the DCOPObject::process() method. Because this method is pure virtual, you must implement the method.
Note that it is usually more convenient to mark a section in the class with "k_dcop:", add your DCOP methods there and let the IDL compiler do the rest. Read the tutorials for more information.
- See also:
- DCOPClient
- Author:
- Preston Brown <pbrown@kde.org>, Matthias Ettrich <ettrich@kde.org>
Definition at line 66 of file dcopobject.h.
Constructor & Destructor Documentation
|
Creates a DCOPObject and calculates the object id using its physical memory address. Definition at line 47 of file dcopobject.cpp. |
|
Creates a DCOPObject and calculates the object id using QObject::name().
|
|
Creates a DCOPObject with object Id
|
|
Destroys the DCOPObject and removes it from the map of known objects. Definition at line 78 of file dcopobject.cpp. References DCOPClient::disconnectDCOPSignal(), DCOPClient::mainClient(), and objId(). |
Member Function Documentation
|
Returns the object id of the DCOPObject.
Referenced by connectDCOPSignal(), disconnectDCOPSignal(), emitDCOPSignal(), and ~DCOPObject(). |
|
Renames a dcop object, if no other with the same name exists Use with care, all dcop signals are disconnected.
References DCOPClient::disconnectDCOPSignal(), and DCOPClient::mainClient(). |
|
Dispatches a message. Usually you want to use an IDL compiler to automatically generate an implementation for this function. If this function returns false, then processDynamic() is called. Note to implementators: remember to call the baseclasses implementation. It handles the functions "functions()" and "interfaces()" which return the lists of supported functions and interfaces, respectively.
Reimplemented in KUniqueApplication. Definition at line 166 of file dcopobject.cpp. References functions(), interfaces(), and processDynamic(). |
|
This function is of interest when you used an IDL compiler to generate the implementation for process() but you still want to dispatch some functions dynamically. Dynamically means that methods may appear and vanish during runtime.
Referenced by process(). |
|
This function is of interest when you used an IDL compiler to generate the implementation for functions() but you still want to list some functions dynamically. Dynamically means that the methods may appear and vanish during runtime.
Referenced by functions(). |
|
This function is of interest when you used an IDL compiler to generate the implementation for interfaces() but you still want to list some interfaces dynamically. Dynamically means that they may appear and vanish during runtime.
Referenced by interfaces(). |
|
Returns the names of the interfaces, specific ones last. The functions gets reimplemented by the IDL compiler. If you don't use the IDL compiler, consider implementing this function manually if you want your object to be easily explorable.
References interfacesDynamic(). Referenced by process(). |
|
Returns the list of functions understood by the object. It gets reimplemented by the IDL compiler. If you don't use the IDL compiler, consider implementing this function manually if you want your object to be easily scriptable. Rationale: functions() allows an interpreter to do client-side type-casting properly. Note to implementators: remember to call the baseclasses implementation.
References functionsDynamic(). Referenced by process(). |
|
Emit
References DCOPClient::emitDCOPSignal(), DCOPClient::mainClient(), and objId(). |
|
Connects to a DCOP signal.
References DCOPClient::connectDCOPSignal(), DCOPClient::mainClient(), and objId(). |
|
Disconnects a DCOP signal.
A special case is when both
References DCOPClient::disconnectDCOPSignal(), DCOPClient::mainClient(), and objId(). |
|
Returns the DCOPClient responsible for making the call. Only call this function while you are handling a DCOP call.
|
|
Checks whether an object with the given id is known in this process.
|
|
Try to find a dcop object with the given id. This function does not query the DCOPObjectProxy.
|
|
Tries to find an object using a partial object id. This function is used for multicasting a DCOP message to several objects inside a single process.
|
|
Creates an object id for the QObject This is done using the QObject::name() function.
|
The documentation for this class was generated from the following files: