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 67 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. References QCString::sprintf(). |
|
Creates a DCOPObject and calculates the object id using QObject::name().
Definition at line 54 of file dcopobject.cpp. References QCString::mid(), QObject::name(), QObject::parent(), and QCString::prepend(). |
|
Creates a DCOPObject with object Id
Definition at line 69 of file dcopobject.cpp. References QCString::isEmpty(), and QCString::sprintf(). |
|
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.
Definition at line 112 of file dcopobject.cpp. 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.
Definition at line 98 of file dcopobject.cpp. References DCOPClient::disconnectDCOPSignal(), DCOPClient::mainClient(), and setObjId(). Referenced by setObjId(). |
|
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(), process(), and processDynamic(). Referenced by process(). |
|
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.
Definition at line 183 of file dcopobject.cpp. References processDynamic(). Referenced by process(), and processDynamic(). |
|
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.
Definition at line 193 of file dcopobject.cpp. 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.
Definition at line 187 of file dcopobject.cpp. 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.
Definition at line 198 of file dcopobject.cpp. 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.
Definition at line 205 of file dcopobject.cpp. References functionsDynamic(), and QValueList::prepend(). Referenced by process(). |
|
Emit
Definition at line 213 of file dcopobject.cpp. References DCOPClient::emitDCOPSignal(), emitDCOPSignal(), DCOPClient::mainClient(), and objId(). Referenced by emitDCOPSignal(). |
|
Connects to a DCOP signal.
Definition at line 220 of file dcopobject.cpp. References DCOPClient::connectDCOPSignal(), connectDCOPSignal(), DCOPClient::mainClient(), and objId(). Referenced by connectDCOPSignal(). |
|
Disconnects a DCOP signal.
A special case is when both
Definition at line 234 of file dcopobject.cpp. References DCOPClient::disconnectDCOPSignal(), disconnectDCOPSignal(), DCOPClient::mainClient(), and objId(). Referenced by disconnectDCOPSignal(). |
|
Returns the DCOPClient responsible for making the call. Only call this function while you are handling a DCOP call.
Definition at line 88 of file dcopobject.cpp. |
|
Checks whether an object with the given id is known in this process.
Definition at line 117 of file dcopobject.cpp. References hasObject(). Referenced by hasObject(). |
|
Try to find a dcop object with the given id. This function does not query the DCOPObjectProxy.
Definition at line 125 of file dcopobject.cpp. References find(). Referenced by find(). |
|
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.
Definition at line 135 of file dcopobject.cpp. References QPtrList::append(), QCString::length(), and match(). Referenced by match(). |
|
Creates an object id for the QObject This is done using the QObject::name() function.
Definition at line 146 of file dcopobject.cpp. References QCString::mid(), QObject::name(), objectName(), QObject::parent(), and QCString::prepend(). Referenced by objectName(). |
The documentation for this class was generated from the following files: