DBUS glibc simple code problem

Zhang Shunchang freebsd13 at gmail.com
Wed Mar 26 04:29:10 EDT 2008

On Wed, 2008-03-26 at 03:29 -0400, Sadrul Habib Chowdhury wrote:
> This is a pretty old post, and the OP has probably resolved the issue by
> now. I am going to respond anyway! I should also mention that I don't
> know much about DBUS foo. 
> * flying match had this to say on [19 Feb 2008, 11:20:21 -0800]:
> [snip]
> > The code is complied, but just cannot get any received-im-msg notification
> > no matter how hard I try.  I wonder if anyone could spend some time helping
> > me find the reason (guess could be very stupid anyway)? If I managed to get
> > the code run as smoothly as that purple-notifications-example, I'll submit
> > to the web page to share with the community.
> > 
> I looked at the tutorial at
> http://www-128.ibm.com/developerworks/linux/library/l-dbus.html?ca=dgr-lnxw95D-BUS,
> and following the tutorial, the attached code works for me.
> When I run your code, I get a  runtime warning ("No marshaller for
> signature of signal 'ReceivedImMsg'"). I tried adding a marshaller with
> dbus_g_object_register_marshaller, but that didn't work either. I don't
> really know whether that's the correct way of doing it or not. If you
> do find a proper fix, perhaps you could let us know!
> [snip]
> > Couple of questions if you are still reading:
> > 1. Unlike Pidgin dbus methods which can be viewed by dbus-viewer, dbus
> > signals don't have any definitions. As a result, I have no way to know the
> > parameters associated with each signal. I.e., I'm just guessing what
> > parameters associated with signal ReceviedImMsg above.
agree, there should be more docs on the dbus interface.
> Ticket #3243 (http://developer.pidgin.im/ticket/3243) probably has
> something to do with this.
> > 2. The dbus_g_proxy_add_signal() and dbus_g_proxy_connect_signal() do not
> > return any failure, so I don't know if my signal handler is added
> > successfully or not. I tried to change different parameters associated with
> > the ReceivedImMsg signal, given any parameter, the code can compile and run,
> > but just don't actually work.
> I got the above mentioned error message. I think the signal handler is
> not being added correctly because there's no marshaller for the signal
> (and not because the signature of the signal you create in
>  _add_signal may be incorrect).
it works well in my system, it prints out "Received IM!!" when i
send/receive a msg to somebody.

i just adding a line:
in the head of your C file.
OS:OpenSuSE 10.1
Pidgin: 2.3.0
DBus: 1.0
dbus-glib: 1.0

> Sadrul
> _______________________________________________
> Devel mailing list
> Devel at pidgin.im
> http://pidgin.im/cgi-bin/mailman/listinfo/devel

More information about the Devel mailing list