<HTML> <HEAD> <TITLE>class DCOPObject</TITLE> <META NAME="Generator" CONTENT="KDOC "> </HEAD> <BODY bgcolor="#ffffff" text="#000000" link="#0000ff" vlink="#000099" alink= "#ffffff"> <TABLE WIDTH="100%" BORDER="0"> <TR> <TD> <TABLE BORDER="0"> <TR><TD valign="top" align="left" cellspacing="10"> <h1>class DCOPObject</h1> </TD> <TD valign="top" align="right" colspan="1"> Provides an interface for receiving DCOP messages. <small><A HREF="#longdesc">More...</A></small></TD></TR> </TABLE> <HR> <TABLE BORDER="0"> <TR><TH>Definition</TH><TD><code>#include <<A HREF="dcopobject_h.html">dcopobject.h</A>></code></TD></TR> <TR><TH>Inherited by</TH><TD><A HREF="MyDCOPObject.html">MyDCOPObject</A></TD></TR> <TR><TH><A HREF="full-list-DCOPObject.html">List of all Methods</A></TH></TR> </TABLE> </TD> <TD align="right"><TABLE BORDER="0"><TR><TD><small><A HREF="index-long.html">Annotated List</A></small></TD></TR> <TR><TD><small><A HREF="header-list.html">Files</A></small></TD></TR> <TR><TD><small><A HREF="all-globals.html">Globals</A></small></TD></TR> <TR><TD><small><A HREF="hier.html">Hierarchy</A></small></TD></TR> <TR><TD><small><A HREF="index.html">Index</A></small></TD></TR> </TABLE></TD></TR></TABLE> <h4>Public Methods</h4><ul><LI> <b><A HREF="#ref1">DCOPObject</A></b> () </LI> <LI> <b><A HREF="#ref2">DCOPObject</A></b> (<A HREF="../../../../../../../../../usr/share/doc/qt-2.3.1/html/qobject.html">QObject</A> *obj) </LI> <LI> <b><A HREF="#ref3">DCOPObject</A></b> (const <A HREF="../../../../../../../../../usr/share/doc/qt-2.3.1/html/qcstring.html">QCString</A> &objId) </LI> <LI>virtual <b><A HREF="#ref4">~DCOPObject</A></b> () </LI> <LI><A HREF="../../../../../../../../../usr/share/doc/qt-2.3.1/html/qcstring.html">QCString</A> <b><A HREF="#ref5">objId</A></b> () const </LI> <LI>virtual bool <b><A HREF="#ref6">process</A></b> (const <A HREF="../../../../../../../../../usr/share/doc/qt-2.3.1/html/qcstring.html">QCString</A> &fun, const <A HREF="../../../../../../../../../usr/share/doc/qt-2.3.1/html/qbytearray.html">QByteArray</A> &data, <A HREF="../../../../../../../../../usr/share/doc/qt-2.3.1/html/qcstring.html">QCString</A>& replyType, <A HREF="../../../../../../../../../usr/share/doc/qt-2.3.1/html/qbytearray.html">QByteArray</A> &replyData) </LI> <LI>virtual bool <b><A HREF="#ref7">processDynamic</A></b> (const <A HREF="../../../../../../../../../usr/share/doc/qt-2.3.1/html/qcstring.html">QCString</A> &fun, const <A HREF="../../../../../../../../../usr/share/doc/qt-2.3.1/html/qbytearray.html">QByteArray</A> &data, <A HREF="../../../../../../../../../usr/share/doc/qt-2.3.1/html/qcstring.html">QCString</A>& replyType, <A HREF="../../../../../../../../../usr/share/doc/qt-2.3.1/html/qbytearray.html">QByteArray</A> &replyData) </LI> <LI>virtual <A HREF="#QCStringList">QCStringList</A> <b><A HREF="#ref8">interfaces</A></b> () </LI> <LI>virtual <A HREF="#QCStringList">QCStringList</A> <b><A HREF="#ref9">functions</A></b> () </LI> <LI>void <b><A HREF="#ref10">emitDCOPSignal</A></b> ( const <A HREF="../../../../../../../../../usr/share/doc/qt-2.3.1/html/qcstring.html">QCString</A> &signal, const <A HREF="../../../../../../../../../usr/share/doc/qt-2.3.1/html/qbytearray.html">QByteArray</A> &data) </LI> <LI>bool <b><A HREF="#ref11">connectDCOPSignal</A></b> ( const <A HREF="../../../../../../../../../usr/share/doc/qt-2.3.1/html/qcstring.html">QCString</A> &sender, const <A HREF="../../../../../../../../../usr/share/doc/qt-2.3.1/html/qcstring.html">QCString</A> &senderObj, const <A HREF="../../../../../../../../../usr/share/doc/qt-2.3.1/html/qcstring.html">QCString</A> &signal, const <A HREF="../../../../../../../../../usr/share/doc/qt-2.3.1/html/qcstring.html">QCString</A> &slot, bool Volatile) </LI> <LI>bool <b><A HREF="#ref12">disconnectDCOPSignal</A></b> ( const <A HREF="../../../../../../../../../usr/share/doc/qt-2.3.1/html/qcstring.html">QCString</A> &sender, const <A HREF="../../../../../../../../../usr/share/doc/qt-2.3.1/html/qcstring.html">QCString</A> &senderObj, const <A HREF="../../../../../../../../../usr/share/doc/qt-2.3.1/html/qcstring.html">QCString</A> &signal, const <A HREF="../../../../../../../../../usr/share/doc/qt-2.3.1/html/qcstring.html">QCString</A> &slot) </LI> </ul><h4>Public Static Methods</h4><ul><LI>static bool <b><A HREF="#ref13">hasObject</A></b> (const <A HREF="../../../../../../../../../usr/share/doc/qt-2.3.1/html/qcstring.html">QCString</A> &objId) </LI> <LI>static <A HREF="DCOPObject.html">DCOPObject</A> * <b><A HREF="#ref14">find</A></b> (const <A HREF="../../../../../../../../../usr/share/doc/qt-2.3.1/html/qcstring.html">QCString</A> &objId) </LI> <LI>static <A HREF="../../../../../../../../../usr/share/doc/qt-2.3.1/html/qlist.html">QList</A><<A HREF="DCOPObject.html">DCOPObject</A>> <b><A HREF="#ref15">match</A></b> (const <A HREF="../../../../../../../../../usr/share/doc/qt-2.3.1/html/qcstring.html">QCString</A> &partialId) </LI> <LI>static <A HREF="../../../../../../../../../usr/share/doc/qt-2.3.1/html/qcstring.html">QCString</A> <b><A HREF="#ref16">objectName</A></b> ( <A HREF="../../../../../../../../../usr/share/doc/qt-2.3.1/html/qobject.html">QObject</A>* obj ) </LI> </ul><HR><H2><A NAME="longdesc">Detailed Description</A></H2><p> Provides an interface for receiving DCOP messages. </p> <p> 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 <code>must</code> implement the method. </p> <p></p> <A NAME="DCOPObject"></A><A NAME="ref1"></A><table width="100%"><tr bgcolor="#eeeeee"><td> <strong>DCOPObject</strong> () <br></td><td align="right"><h3><strong>DCOPObject</strong></h3></td></tr></table><p></p><p> Creates a <A HREF="DCOPObject.html#DCOPObject">DCOPObject</A> and calculates the object id using its physical memory address. </p> <A NAME="DCOPObject"></A><A NAME="ref2"></A><table width="100%"><tr bgcolor="#eeeeee"><td> <strong>DCOPObject</strong> (<A HREF="../../../../../../../../../usr/share/doc/qt-2.3.1/html/qobject.html">QObject</A> *obj) <br></td><td align="right"><h3><strong>DCOPObject</strong></h3></td></tr></table><p></p><p> Creates a <A HREF="DCOPObject.html#DCOPObject">DCOPObject</A> and calculates the object id using <A HREF="../../../../../../../../../usr/share/doc/qt-2.3.1/html/qobject.html#6f3030">QObject::name</A>(). </p> <A NAME="DCOPObject"></A><A NAME="ref3"></A><table width="100%"><tr bgcolor="#eeeeee"><td> <strong>DCOPObject</strong> (const <A HREF="../../../../../../../../../usr/share/doc/qt-2.3.1/html/qcstring.html">QCString</A> &objId) <br></td><td align="right"><h3><strong>DCOPObject</strong></h3></td></tr></table><p></p><p> Creates a <A HREF="DCOPObject.html#DCOPObject">DCOPObject</A> with object Id <code>objId</code>. </p> <A NAME="~DCOPObject"></A><A NAME="ref4"></A><table width="100%"><tr bgcolor="#eeeeee"><td> <strong>~DCOPObject</strong> () <br></td><td align="right"><h3><strong>~DCOPObject</strong></h3></td></tr></table><p> <small>[virtual]</small></p><p> Destroys the <A HREF="DCOPObject.html#DCOPObject">DCOPObject</A> and removes it from the map of known objects. </p> <A NAME="objId"></A><A NAME="ref5"></A><table width="100%"><tr bgcolor="#eeeeee"><td><A HREF="../../../../../../../../../usr/share/doc/qt-2.3.1/html/qcstring.html">QCString</A> <strong>objId</strong> () <br></td><td align="right"><h3><strong>objId</strong></h3></td></tr></table><p> <small>[const]</small></p><A NAME="process"></A><A NAME="ref6"></A><table width="100%"><tr bgcolor="#eeeeee"><td> bool <strong>process</strong> (const <A HREF="../../../../../../../../../usr/share/doc/qt-2.3.1/html/qcstring.html">QCString</A> &fun, const <A HREF="../../../../../../../../../usr/share/doc/qt-2.3.1/html/qbytearray.html">QByteArray</A> &data, <A HREF="../../../../../../../../../usr/share/doc/qt-2.3.1/html/qcstring.html">QCString</A>& replyType, <A HREF="../../../../../../../../../usr/share/doc/qt-2.3.1/html/qbytearray.html">QByteArray</A> &replyData) <br></td><td align="right"><h3><strong>process</strong></h3></td></tr></table><p> <small>[virtual]</small></p><p> Dispatches a message. </p> <p> Usually you want to use an IDL compiler to automatically generate an implementation for this function. </p> <p> If this function returns <code>false</code>, then <A HREF="DCOPObject.html#processDynamic">processDynamic</A>() is called. </p> <p></p> <p> Note to implementators: remember to call the baseclasses implementation. </p> <p></p> <p><b>Parameters</b>:<TABLE BORDER="0" CELLPADDING="5"> <TR><TD align="left" valign="top"><i>fun</i></TD><TD align="left" valign="top">is the normalized function signature. Such a signature usually looks like <code>foobar</code>(QString,int). The return type, qualifiers like "const" etc. are not part of the signature. </TD></TR> </TABLE></P> <p><b>See also</b>: DCOPClient::normalizeFunctionSignature(), functions()</p> <A NAME="processDynamic"></A><A NAME="ref7"></A><table width="100%"><tr bgcolor="#eeeeee"><td> bool <strong>processDynamic</strong> (const <A HREF="../../../../../../../../../usr/share/doc/qt-2.3.1/html/qcstring.html">QCString</A> &fun, const <A HREF="../../../../../../../../../usr/share/doc/qt-2.3.1/html/qbytearray.html">QByteArray</A> &data, <A HREF="../../../../../../../../../usr/share/doc/qt-2.3.1/html/qcstring.html">QCString</A>& replyType, <A HREF="../../../../../../../../../usr/share/doc/qt-2.3.1/html/qbytearray.html">QByteArray</A> &replyData) <br></td><td align="right"><h3><strong>processDynamic</strong></h3></td></tr></table><p> <small>[virtual]</small></p><p> This function is of interest when you used an IDL compiler to generate the implementation for <A HREF="DCOPObject.html#process">process</A>() but you still want to dispatch some functions dynamically. Dynamically means that methods may appear and vanish during runtime. </p> <p></p> <p></p> <p><b>Returns</b>: <code>false</code> by default. </p> <p><b>See also</b>: process(), DCOPClient::normalizeFunctionSignature(), functions()</p> <A NAME="interfaces"></A><A NAME="ref8"></A><table width="100%"><tr bgcolor="#eeeeee"><td> <A HREF="#QCStringList">QCStringList</A> <strong>interfaces</strong> () <br></td><td align="right"><h3><strong>interfaces</strong></h3></td></tr></table><p> <small>[virtual]</small></p><p> 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. </p> <p></p> <p><b>See also</b>: functions()</p> <A NAME="functions"></A><A NAME="ref9"></A><table width="100%"><tr bgcolor="#eeeeee"><td> <A HREF="#QCStringList">QCStringList</A> <strong>functions</strong> () <br></td><td align="right"><h3><strong>functions</strong></h3></td></tr></table><p> <small>[virtual]</small></p><p> 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. </p> <p> Rationale: functions() allows an interpreter to do client-side type-casting properly. </p> <p> Note to implementators: remember to call the baseclasses implementation. </p> <p></p> <p><b>See also</b>: process(), processDynamic(), DCOPClient::normalizeFunctionSignature()</p> <A NAME="emitDCOPSignal"></A><A NAME="ref10"></A><table width="100%"><tr bgcolor="#eeeeee"><td>void <strong>emitDCOPSignal</strong> ( const <A HREF="../../../../../../../../../usr/share/doc/qt-2.3.1/html/qcstring.html">QCString</A> &signal, const <A HREF="../../../../../../../../../usr/share/doc/qt-2.3.1/html/qbytearray.html">QByteArray</A> &data) <br></td><td align="right"><h3><strong>emitDCOPSignal</strong></h3></td></tr></table><p></p><p> Emit <code>signal</code> as DCOP signal from this object with <code>data</code> as arguments </p> <A NAME="connectDCOPSignal"></A><A NAME="ref11"></A><table width="100%"><tr bgcolor="#eeeeee"><td>bool <strong>connectDCOPSignal</strong> ( const <A HREF="../../../../../../../../../usr/share/doc/qt-2.3.1/html/qcstring.html">QCString</A> &sender, const <A HREF="../../../../../../../../../usr/share/doc/qt-2.3.1/html/qcstring.html">QCString</A> &senderObj, const <A HREF="../../../../../../../../../usr/share/doc/qt-2.3.1/html/qcstring.html">QCString</A> &signal, const <A HREF="../../../../../../../../../usr/share/doc/qt-2.3.1/html/qcstring.html">QCString</A> &slot, bool Volatile) <br></td><td align="right"><h3><strong>connectDCOPSignal</strong></h3></td></tr></table><p></p><p> Connect to a DCOP signal </p> <p></p> <ul> <li><code>Volatile</code> is true and <code>sender</code> does not exist. </li> <li><code>signal</code> and <code>slot</code> do not have matching arguments. </li> </ul> <p> </p> <p><b>Parameters</b>:<TABLE BORDER="0" CELLPADDING="5"> <TR><TD align="left" valign="top"><i>sender</i></TD><TD align="left" valign="top">the name of the client that emits the signal. When empty the signal will be passed from any client. </TD></TR> <TR><TD align="left" valign="top"><i>senderObj</i></TD><TD align="left" valign="top">the name of the sending object that emits the signal. </TD></TR> <TR><TD align="left" valign="top"><i>signal</i></TD><TD align="left" valign="top">the name of the signal. The arguments should match with slot. </TD></TR> <TR><TD align="left" valign="top"><i>slot</i></TD><TD align="left" valign="top">The name of the slot to call. Its arguments should match with signal. </TD></TR> <TR><TD align="left" valign="top"><i>Volatile</i></TD><TD align="left" valign="top">If true, the connection will not be reestablished when <code>sender</code> unregisters and reregisters with DCOP. In this case the <code>sender</code> must be registered when the connection is made. If false, the connection will be reestablished when <code>sender</code> reregisters. In this case the connection can be made even if <code>sender</code> is not registered at that time. </TD></TR> </TABLE></P> <p><b>Returns</b>: false if a connection could not be established. This will be the case when </p> <A NAME="disconnectDCOPSignal"></A><A NAME="ref12"></A><table width="100%"><tr bgcolor="#eeeeee"><td>bool <strong>disconnectDCOPSignal</strong> ( const <A HREF="../../../../../../../../../usr/share/doc/qt-2.3.1/html/qcstring.html">QCString</A> &sender, const <A HREF="../../../../../../../../../usr/share/doc/qt-2.3.1/html/qcstring.html">QCString</A> &senderObj, const <A HREF="../../../../../../../../../usr/share/doc/qt-2.3.1/html/qcstring.html">QCString</A> &signal, const <A HREF="../../../../../../../../../usr/share/doc/qt-2.3.1/html/qcstring.html">QCString</A> &slot) <br></td><td align="right"><h3><strong>disconnectDCOPSignal</strong></h3></td></tr></table><p></p><p> Disconnect a DCOP signal </p> <p> A special case is when both sender & signal are empty. In this case all connections related to this object in the current client are disconnected. (Both connections from as well as to this object!) </p> <p></p> <p><b>Parameters</b>:<TABLE BORDER="0" CELLPADDING="5"> <TR><TD align="left" valign="top"><i>sender</i></TD><TD align="left" valign="top">the name of the client that emits the signal. </TD></TR> <TR><TD align="left" valign="top"><i>senderObj</i></TD><TD align="left" valign="top">the name of the object that emits the signal. If empty all objects will be disconnected. </TD></TR> <TR><TD align="left" valign="top"><i>signal</i></TD><TD align="left" valign="top">the name of the signal. The arguments should match with slot. If empty all objects will be disconnected. </TD></TR> <TR><TD align="left" valign="top"><i>slot</i></TD><TD align="left" valign="top">The name of the slot the signal is connected to. If empty all slots will be disconnected. </TD></TR> </TABLE></P> <p><b>Returns</b>: false if no connection(s) where removed. </p> <A NAME="hasObject"></A><A NAME="ref13"></A><table width="100%"><tr bgcolor="#eeeeee"><td> bool <strong>hasObject</strong> (const <A HREF="../../../../../../../../../usr/share/doc/qt-2.3.1/html/qcstring.html">QCString</A> &objId) <br></td><td align="right"><h3><strong>hasObject</strong></h3></td></tr></table><p> <small>[static]</small></p><p> </p> <p> <A HREF="DCOPObjectProxy.html">DCOPObjectProxy</A> </p> <p><b>Returns</b>: <code>true</code> if an obejct with the questionable <code>objId</code> is known in this process. This query does not ask proxies. </p> <A NAME="find"></A><A NAME="ref14"></A><table width="100%"><tr bgcolor="#eeeeee"><td> <A HREF="DCOPObject.html">DCOPObject</A> * <strong>find</strong> (const <A HREF="../../../../../../../../../usr/share/doc/qt-2.3.1/html/qcstring.html">QCString</A> &objId) <br></td><td align="right"><h3><strong>find</strong></h3></td></tr></table><p> <small>[static]</small></p><p> </p> <p> This function does not query the <A HREF="DCOPObjectProxy.html">DCOPObjectProxy</A>. </p> <p><b>Returns</b>: the <A HREF="DCOPObject.html#DCOPObject">DCOPObject</A> for the id <code>objId</code>. </p> <A NAME="match"></A><A NAME="ref15"></A><table width="100%"><tr bgcolor="#eeeeee"><td> <A HREF="../../../../../../../../../usr/share/doc/qt-2.3.1/html/qlist.html">QList</A><<A HREF="DCOPObject.html">DCOPObject</A>> <strong>match</strong> (const <A HREF="../../../../../../../../../usr/share/doc/qt-2.3.1/html/qcstring.html">QCString</A> &partialId) <br></td><td align="right"><h3><strong>match</strong></h3></td></tr></table><p> <small>[static]</small></p><p> </p> <p></p> <p> This function is used for multicasting a DCOP message to several objects inside a single process. </p> <p><b>Returns</b>: a list of DCOPObjects beginning with the string contained in <code>partialId</code>. </p> <A NAME="objectName"></A><A NAME="ref16"></A><table width="100%"><tr bgcolor="#eeeeee"><td> <A HREF="../../../../../../../../../usr/share/doc/qt-2.3.1/html/qcstring.html">QCString</A> <strong>objectName</strong> ( <A HREF="../../../../../../../../../usr/share/doc/qt-2.3.1/html/qobject.html">QObject</A>* obj ) <br></td><td align="right"><h3><strong>objectName</strong></h3></td></tr></table><p> <small>[static]</small></p><p> Creates an object id for the QObject <code>obj</code>. This is done using the <A HREF="../../../../../../../../../usr/share/doc/qt-2.3.1/html/qobject.html#6f3030">QObject::name</A>() function. </p> <HR><UL><LI><i>Author</i>: Preston Brown <pbrown@kde.org>, Matthias Ettrich <ettrich@kde.org> </LI><LI><i>Generated</i>: qateam on updates.mandrakesoft.com on Mon Dec 30 16:08:51 2002, using kdoc 2.0a53.</LI></UL></BODY></HTML>