[Kde-bindings] C interface to dcop

Josef Spillner josef at ggzgamingzone.org
Sun Apr 20 11:54:14 UTC 2003

Is the dcopc library still maintained?
It is still based on Gtk 1.x, and doesn't work as it should.

The following changes are due, and I've tried to look into the sources a bit 
* Fix Gtk+ unique type registration. gtk_type_init() must be called before 
registering the DCOP type.
* Compiler warnings. I've commented out unneeded variables.
The same in the case of unneeded parameters, even though they are marked with 
/* shutup gcc */. Shouldn't really result in a performance loss, since gcc 
will see that they're "used" but not for real.
* Source indentation. I probably made it even worse :)
But there should be a consistant style.
* Renaming of the 'daemon' argument to 'daemonmode' to avoid shadowing 
* Proper function prototyping.

* Not solved yet: Don't crash if app_id is NULL in dcop_client_send().
The problem is somewhere in the registration code (dcop_client_register_as()), 
since this always fails, even for anonymous registration. Thus 
dcop_client_is_attached() returns true even though app_id is still NULL.
So 2 things must be fixed here:
- find out why registration fails
- if it fails, don't segfault, but also don't silently claim a DCOP method 
doesn't exist if in fact the registration failed.

The complete patch is available here:
(the debug statements should later be removed)

A sample program is attached.


Play for fun, win for freedom.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: kicker.c
Type: text/x-csrc
Size: 758 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-bindings/attachments/20030420/adb6e3bd/attachment.c>

More information about the Kde-bindings mailing list