DCOP broadcasting

Waldo Bastian bastian at kde.org
Mon Oct 13 16:50:03 BST 2003


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Monday 13 October 2003 16:51, Andras Mantia wrote:
> Hi,
> 
>  Is it possible to do broadcasting with DCOP? I mean I would like to call
> a
 DCOP function of all running instances of an application even if the
> instances are run in different sessions. For example I have the "myapp"
> which registers itself every time as "myapp-PID". The
> myapp::myappIF:openedFile() returns let's say the file opened by the
> current instance in myapp. Now I would like to query all the running myapps
> and find the opened files. Is it possible to do this with DCOP?

DCOP supports broadcasts but it doesn't support replies to broadcasts. You may 
wish to use "dcopFind" which makes calls to different clients/objects till it 
finds one that replies with a positive acknowledgement. That's useful if you 
try to solve "find if any instance has file foobar open".

As far as sessions go. The DCOP address space is limited to a single session. 
There is some support for multiple sessions hacked into the dcop command line 
tool. 

If you want to prevent concurrent access to files you should be using a file-
locking mechanism and not DCOP. See e.g. http://www.cs.helsinki.fi/linux/
linux-kernel/2001-41/0633.html

Cheers,
Waldo
- -- 
bastian at kde.org -=|[ SUSE, The Linux Desktop Experts ]|=- bastian at suse.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE/ismrN4pvrENfboIRAh1yAKCYlccO+Zkz5N53Gvd4oF1OPSFAxgCfaESf
2zZ5BmJDnn2n1VmHAXvrnBY=
=0c+U
-----END PGP SIGNATURE-----




More information about the kde-core-devel mailing list