[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-core-devel
Subject:    Re: DCOP extension (Was: scripts using kxmlrpcd) [long]
From:       David Faure <david () mandrakesoft ! com>
Date:       2000-06-05 18:48:41
[Download RAW message or body]

On Mon, Jun 05, 2000 at 12:05:04PM -0700, Waldo Bastian wrote:
> On Sat, 03 Jun 2000, David Faure wrote:
> > I would call the function findObject, though, since it's looking
> > for a DCOPObject, not for a DCOPClient :)
> 
> Done. See kdelibs/dcop/testdcop.cpp for some examples. Make sure to restart 
> your dcopserver before using this feature.

Thanks.

> Small problem, there is no operator<< / operator>> for bool.

I know :((
Casting to int all over the place :(
Maybe we should provide one ? But I guess we have to check not to do that
on systems where bool is a #define to int (or even a typedef ?).

>   /**
>    * Searches for an object which matches a criteria.
>    *
>    * @param remApp The remote application id.
>    * @param remObj The name of the remote object.
>    * @param remFun The remote function in the specified object to call.
>    *               This function should return a bool and is used as 
>    *               criteria. 
>    * @param data The data to provide to the remote function.
>    * @param foundApp The remote application id that matched the criteria.
>    * @param foundObj The remote object that matched the criteria.
>    * @param fast Tf set to @p true, a "fast" form of IPC will be used.

Small kdoc note: @p is for parameters, not for "true" :-)   [AFAIK]

>    *        Fast connections are not guaranteed to be implemented, but
>    *        if they are they work only on the local machine, not across
>    *        the network.  "fast" is only a hint not an order.

The doc seems to imply this would be a good thing to use ?
Why is the default false, then ?

(Besides, I wonder what it does, but I haven't read the sources yet).

>    * findObject calls @p remFun in the applications and objects identified
>    * by @p remApp and @remObj until @p remFun returns @p true. The name of 
>    * the application and object that returned @p true are returned in
>    * @p foundApp and @p foundObj respectively.
>    *
>    * If @p remFun is empty a default function is called in the object 
>    * which always returns @p true/.
>    *
>    * @return @p true is returned when an object was found for which @remFun
>    * returned @p true. If no such object is the function returns @p false.
>    *
>    * A findObject blocks the application until the process receives the
>    * answer, for a maximum of 1/10 of a second. If the call was not
>    * answered by then, the client opens a local event loop in order to
>    * keep the user interface updated (by processing paint events and
>    * such) until the answer message finally drops in.
>    *
>    * @see send()
>    */
>   bool findObject(const QCString &remApp, const QCString &remObj,
> 	    const QCString &remFun, const QByteArray &data,
> 	    QCString &foundApp, QCString &foundObj,
> 	    bool fast=false);

Great. Now let's use that in .... ah yes, kfmclient.

-- 
David FAURE, david@mandrakesoft.com, faure@kde.org
http://home.clara.net/faure/
KDE, Making The Future of Computing Available Today
See http://www.kde.org/kde1-and-kde2.html for how to set up KDE 2

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic