Bug 96738

Summary: dcopperl bindings do not support overloaded dcop functions
Product: [Developer tools] bindings Reporter: Zach Chadwick <zachad>
Component: generalAssignee: kde-bindings
Status: RESOLVED UNMAINTAINED    
Severity: crash CC: andresbajotierra
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: RedHat Enterprise Linux   
OS: Linux   
Latest Commit: Version Fixed In:

Description Zach Chadwick 2005-01-10 22:33:51 UTC
Version:            (using KDE KDE 3.3.2)
Installed from:    RedHat RPMs
OS:                Linux

When using the DCOP perl bindings, the DCOP object that is created is unable to choose the correct overloaded function.  

The KNotify DCOP provides the following functions:

QCStringList interfaces()
QCStringList functions()
void notify(QString event,QString fromApp,QString text,QString sound,QString file,
            int present,int level)
void notify(QString event,QString fromApp,QString text,QString sound,QString file,
            int present,int level,int winId)
void notify(QString event,QString fromApp,QString text,QString sound,QString file,
            int present,int level,int winId,int eventId)
void reconfigure()
void setVolume(int volume)

There are 3 notify functions, taking 7, 8 & 9 arguments respectivly. The following perl snippet attempts to only use the first notify() function, but is being called with 8 arguments.

#!/usr/bin/perl
use DCOP;

my $client = new DCOP;
$client->attach();

my $knot = $client->createObject("knotify");

$knot->notify("event-name",
              "application name",
	      "This is my message",
	      undef,
	      undef,
	      16,
	      1,
	      1);

This produces the error:

DCOP: Too many (8) arguments to function "notify(QString,QString,QString,QString,QString,int,int)" at /usr/lib/perl5/vendor_perl/5.8.3/i586-linux-thread-multi/DCOP/Object.pm line 19.
Segmentation fault

Expected is a passive-popup window in the corner with my message in it.
Comment 1 Dario Andres 2010-01-20 21:15:16 UTC
Closing as DCOP is unmaintained.