About DBUS signals

Sumit Jain sumitjain82 at gmail.com
Mon Oct 16 21:09:14 PDT 2006


Hi Keith,
Thanks for directing me to the example code. As i see the code, one thing
that i can understand is that the application is doing add and connect to
the signal. What will actually trigger DBUS to send the signal to the
application.
What i mean to say is that how from an application can i send signals to
other application with DBUS working as a mediator for passing signals.( as i
can see no such calls in this code atleast)

It will be of great help if you could help me with sorting it out.

Thanks in advance.

Regards,
Sumit

On 10/16/06, dbus-request at lists.freedesktop.org <
dbus-request at lists.freedesktop.org> wrote:
>
> Send dbus mailing list submissions to
>         dbus at lists.freedesktop.org
>
> To subscribe or unsubscribe via the World Wide Web, visit
>         http://lists.freedesktop.org/mailman/listinfo/dbus
> or, via email, send a message with subject or body 'help' to
>         dbus-request at lists.freedesktop.org
>
> You can reach the person managing the list at
>         dbus-owner at lists.freedesktop.org
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of dbus digest..."
>
>
> Today's Topics:
>
>    1. Re: patch or not patch ? (frederic heem)
>    2. Re: patch or not patch ? (Thiago Macieira)
>    3. dbus-glib maintained ? (frederic heem)
>    4. Re: dbus-glib maintained ? (Rob Taylor)
>    5. Re: patch or not patch ? (Timo Hoenig)
>    6. QtDBus bindings: transparent usage (Sebastian Tr?g)
>    7. Re: About dbus signals (keith preston)
>    8. Re: QtDBus bindings: transparent usage (Thiago Macieira)
>    9. Re: patch or not patch ? (frederic heem)
>   10. [rfc] move activation to a helper process (David Zeuthen)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Mon, 16 Oct 2006 14:04:55 +0200
> From: frederic heem <frederic.heem at telsey.it>
> Subject: Re: patch or not patch ?
> To: dbus at lists.freedesktop.org
> Message-ID: <200610161404.55820.frederic.heem at telsey.it>
> Content-Type: text/plain;  charset="iso-8859-1"
>
> Hi,
> Just for curiosity, the opensuse dbus rpm (dbus-1-0.92-8.1.src.rpm) has
> also 5
> patches, debian has also some patches, all different from each other.
>
>
> Alle 12:33, lunedì 16 ottobre 2006, frederic heem ha scritto:
> > Hi,
> > the dbus.spec has been found in the fc5 source rpm
> > (dbus-0.61-3.fc5.1.src.rpm) The packager has added 5 patches, only one
> of
> > them has been commited to cvs. Is there any chance to grab all patches
> form
> > all packagers and include them in the official source.
> > What will happen when an application linked with dbus if every
> distribution
> > has a different libdbus ?
> > Frederic Heem
> >
> > _______________________________________________
> > dbus mailing list
> > dbus at lists.freedesktop.org
> > http://lists.freedesktop.org/mailman/listinfo/dbus
>
>
> ------------------------------
>
> Message: 2
> Date: Mon, 16 Oct 2006 13:19:17 +0200
> From: Thiago Macieira <thiago at kde.org>
> Subject: Re: patch or not patch ?
> To: dbus at lists.freedesktop.org
> Message-ID: <200610161319.33384.thiago at kde.org>
> Content-Type: text/plain; charset="iso-8859-1"
>
> frederic heem wrote:
> >Hi,
> >the dbus.spec has been found in the fc5 source rpm
> > (dbus-0.61-3.fc5.1.src.rpm) The packager has added 5 patches, only one
> > of them has been commited to cvs. Is there any chance to grab all
> > patches form all packagers and include them in the official source.
>
> Said patches must be posted to the mailing list or Bugzilla for
> verification.
>
> >What will happen when an application linked with dbus if every
> > distribution has a different libdbus ?
>
> As long as they all are binary- and behaviour-compatible, it should be ok.
>
> --
> Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
>   PGP/GPG: 0x6EF45358; fingerprint:
>   E067 918B B660 DBD1 105C 966C 33F5 F005 6EF4 5358
> -------------- next part --------------
> A non-text attachment was scrubbed...
> Name: not available
> Type: application/pgp-signature
> Size: 189 bytes
> Desc: not available
> Url :
> http://lists.freedesktop.org/archives/dbus/attachments/20061016/2fdb45b4/attachment-0001.pgp
>
> ------------------------------
>
> Message: 3
> Date: Mon, 16 Oct 2006 14:44:35 +0200
> From: frederic heem <frederic.heem at telsey.it>
> Subject: dbus-glib maintained ?
> To: dbus at lists.freedesktop.org
> Message-ID: <200610161444.35171.frederic.heem at telsey.it>
> Content-Type: text/plain;  charset="us-ascii"
>
> Hi,
> Is it possible to get the status of the dbus-glib ? It seems that it's no
> longer maintain. 7 bugs has been reported, for some of them, patches has
> been
> included. So far, not even a reply. Can someone take over the maintenance
> ?
> Frederic Heem
>
>
> ------------------------------
>
> Message: 4
> Date: Mon, 16 Oct 2006 14:11:55 +0100
> From: Rob Taylor <robtaylor at floopily.org>
> Subject: Re: dbus-glib maintained ?
> To: frederic heem <frederic.heem at telsey.it>
> Cc: dbus at lists.freedesktop.org
> Message-ID: <4533851B.9020001 at floopily.org>
> Content-Type: text/plain; charset=ISO-8859-1
>
> frederic heem wrote:
> > Hi,
> > Is it possible to get the status of the dbus-glib ? It seems that it's
> no
> > longer maintain. 7 bugs has been reported, for some of them, patches has
> been
> > included. So far, not even a reply. Can someone take over the
> maintenance ?
>
> It is maintained, though currently only by me! One issue is I'm not set
> as the default maintainer in the bugzilla.. (/me pokes fd.o maints)
>
> I don't have a whole load of time to dedicate to it. If you look at
> http://gitweb.freedesktop.org/?p=dbus/dbus-glib.git;a=summary you can
> see what's been done towards a 0.72 release - currently on my TODO is
> add tests for the GInterfaces/GObject inheritance stuff by Steve
> Frécinaux, and to remove the need for a system bus at build time.
>
> If you want to help out with bug triaging and testing fixes (ideally
> there should be a unit test testing each fix, where possible), I'd be
> very grateful for a helping hand!
>
> Thanks,
> Rob Taylor
>
>
> ------------------------------
>
> Message: 5
> Date: Mon, 16 Oct 2006 15:29:18 +0200
> From: Timo Hoenig <thoenig at suse.de>
> Subject: Re: patch or not patch ?
> To: frederic heem <frederic.heem at telsey.it>
> Cc: dbus at lists.freedesktop.org
> Message-ID: <1161005358.8094.26.camel at nouse.suse.de>
> Content-Type: text/plain
>
> Hi,
>
> On Mon, 2006-10-16 at 14:04 +0200, frederic heem wrote:
>
> > Just for curiosity, the opensuse dbus rpm (dbus-1-0.92-8.1.src.rpm) has
> also 5
> > patches, debian has also some patches, all different from each other.
>
> D-Bus 0.94 is being checked into openSUSE FACTORY without any patches.
>
>    Timo
>
>
>
> ------------------------------
>
> Message: 6
> Date: Mon, 16 Oct 2006 15:28:56 +0200
> From: Sebastian Tr?g <strueg at mandriva.com>
> Subject: QtDBus bindings: transparent usage
> To: dbus at lists.freedesktop.org
> Message-ID: <200610161528.56454.strueg at mandriva.com>
> Content-Type: text/plain;  charset="us-ascii"
>
> This is my scenario:
>
> I have a frontend library that hides DBus (thus, in theory once could
> replace
> dbus with something else without changing the API). This is no problem as
> long as I am just using clients that call methods. However, if I want to
> export methods I have a little problem becasue these methods need to be
> inserted into an AbstractAdaptor which will not be available in the API.
>
> Is there a clean way to handle this? Maybe using some meta-object magic?
>
> Thanks,
> Sebastian
>
>
> ------------------------------
>
> Message: 7
> Date: Mon, 16 Oct 2006 09:03:49 -0500
> From: "keith preston" <keithpre at gmail.com>
> Subject: Re: About dbus signals
> To: "Sumit Jain" <sumitjain82 at gmail.com>
> Cc: dbus at lists.freedesktop.org
> Message-ID:
>         <3837d8b10610160703w3b466a4bwc6be6a45779434da at mail.gmail.com>
> Content-Type: text/plain; charset="iso-8859-1"
>
> I also had a really difficult time getting started with using glib and
> dbus.   I know there still isn't a very good tutorial, although one is
> being
> worked on.   Is there any way to just get a good list of links to source
> code of projects that use dbus?   Maybe this could go on the dbus
> homepage?
> Otherwise, here is a good example I found of dbus glib signals.   I would
> read up a lot about gobjects and signals in general (along with the
> marshallers).   If you can write them, dbus just piggybacks onto them
> easily
>
> http://svn.navi.cx/misc/trunk/xchat-gnome/src/common/dbus/example.c
>
> Keith Preston
>
> On 10/16/06, Sumit Jain <sumitjain82 at gmail.com> wrote:
> >
> > Hi,
> > I am using glib bindings of dbus.I have seen some dbus example code but
> > all the code explains how to use method invocation but i could not find
> good
> > example code on usage of signals.
> >
> > I want to create a gobject and use it signals. How can i do this using
> > DBUS? I have tried going through the dbus docs and some code but nothing
> has
> > been very useful. Can someone please help me with this. An example code
> > snippet will be very useful.
> >
> > Thanks in advance.
> >
> > --
> > Regards,
> > Sumit
> >
> > Sumit Kumar Jain
> >
> > _______________________________________________
> > dbus mailing list
> > dbus at lists.freedesktop.org
> > http://lists.freedesktop.org/mailman/listinfo/dbus
> >
> >
> >
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL:
> http://lists.freedesktop.org/archives/dbus/attachments/20061016/90d60692/attachment.html
>
> ------------------------------
>
> Message: 8
> Date: Mon, 16 Oct 2006 16:13:46 +0200
> From: Thiago Macieira <thiago at kde.org>
> Subject: Re: QtDBus bindings: transparent usage
> To: dbus at lists.freedesktop.org
> Message-ID: <200610161613.52703.thiago at kde.org>
> Content-Type: text/plain; charset="iso-8859-1"
>
> Sebastian Trüg wrote:
> >I have a frontend library that hides DBus (thus, in theory once could
> > replace dbus with something else without changing the API). This is no
> > problem as long as I am just using clients that call methods. However,
> > if I want to export methods I have a little problem becasue these
> > methods need to be inserted into an AbstractAdaptor which will not be
> > available in the API.
> >
> >Is there a clean way to handle this? Maybe using some meta-object magic?
>
> You can easily export slots, signals and properties of any given QObject.
> So, I recommend that you use that method of construction: create your own
> hierarchy of QObject with the exportable methods.
>
> [Hint: making them Q_SCRIPTABLE and using the ExportScriptableSlots flag
> makes it easy to distinguish which slots are meant to be exported.]
>
> Note, however, that there are some limitations on what you can hide from:
> the QtDBus demarshaller works in a lazy mode, which means that any
> complex that is not integer, double, QString, QByteArray or QStringList
> (or a QVariant containing any of those) will not be decoded until much
> later. This means it requires some help from the application code itself
> to do the decoding -- especially in the case of QVariants.
>
> If you don't need any other type, you should be reasonably safe, though.
> (Just don't ever try to access QObject::sender())
>
> --
> Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
>   PGP/GPG: 0x6EF45358; fingerprint:
>   E067 918B B660 DBD1 105C 966C 33F5 F005 6EF4 5358
> -------------- next part --------------
> A non-text attachment was scrubbed...
> Name: not available
> Type: application/pgp-signature
> Size: 189 bytes
> Desc: not available
> Url :
> http://lists.freedesktop.org/archives/dbus/attachments/20061016/d41a61a8/attachment-0001.pgp
>
> ------------------------------
>
> Message: 9
> Date: Mon, 16 Oct 2006 16:16:47 +0200
> From: frederic heem <frederic.heem at telsey.it>
> Subject: Re: patch or not patch ?
> To: Timo Hoenig <thoenig at suse.de>
> Cc: dbus at lists.freedesktop.org
> Message-ID: <200610161616.47748.frederic.heem at telsey.it>
> Content-Type: text/plain;  charset="iso-8859-1"
>
> Alle 15:29, lunedì 16 ottobre 2006, Timo Hoenig ha scritto:
> > Hi,
> >
> > On Mon, 2006-10-16 at 14:04 +0200, frederic heem wrote:
> > > Just for curiosity, the opensuse dbus rpm (dbus-1-0.92-8.1.src.rpm)
> has
> > > also 5 patches, debian has also some patches, all different from each
> > > other.
> >
> > D-Bus 0.94 is being checked into openSUSE FACTORY without any patches.
> >
> Good news.
> What about redhat patches ?
> >    Timo
>
> Another question is why redhat, suse and <put your favorite distribution>
> have
> different spec, different /etc/init.d/dbus, different dbus-daemon location
> etc.. Not even talking about debian & friends...
> No one is adding value by making things incompatible, and it's real burden
> for
> application developer.
> Why not building one rpm that can be installed on *all* rpm based system ?
> Is
> it so difficult to agree between packager ?
> Frederic Heem
>
>
> ------------------------------
>
> Message: 10
> Date: Mon, 16 Oct 2006 10:21:07 -0400
> From: David Zeuthen <david at fubar.dk>
> Subject: [rfc] move activation to a helper process
> To: dbus at lists.freedesktop.org
> Message-ID: <1161008467.2620.23.camel at zelda.fubar.dk>
> Content-Type: text/plain; charset="us-ascii"
>
>
> Hi,
>
> Here's an almost finished patch for moving activation into a helper
> process. This enables us to fork off the activation helper early and
> keep it running as root, thus being able to make activation on the
> system message bus useful.
>
> Details
>
> - Move some test harness around
> - BusContext now requires a function to clean up
> - The bus process and the helper process communicate over a pair
>    of pipes. I specifically avoided using D-Bus as the IPC because
>    if the bus process is compromised the likely way it is compromised
>    is by libdbus being compromised. The protocol is very custom and
>    simple. Should be feasible to do security audits on it.
> - Helper process is written with paranoia in mind - it does not trust
>    the bus process
> - There's a new 'User' key that can be set in service files to specify
>    what user to run the activated service as
>
> TODO's
>
> - What should we do if 'User' key is not set for system bus activation?
>    Just run it as root?
> - Conversely, what to do if 'User' key is set for session bus
>    activation? Just refuse to run it?
> - The test suite fails, says OOM handling doesn't work. I'm looking at
>    this, I think I'm doing the wrong thing if a BusTransactions fails,
>    should be feasible to fix (any quick ideas what I'm doing wrong?)
>    Apart from OOM handling the test suite works and this is good as the
>    test suite exercises a lot of the activation subsystem.
> - Not sure how to do OOM tests for helper since it's a separate
>    process, ideas welcome
> - Not sure how add meaningful tests to activation-helper.c, ideas
>    welcome too
> - Some general cleanups and removing some noise I've introduced in
>    places.
>
> Anyway, I think the patch is in a state and I'd like feedback on the
> approach and details too. Thanks!
>
>      David
>
> Makefile.am         |    5
> activation-helper.c | 1537
> ++++++++++++++++++++++++++++++++++++++++++++++++++++
> activation-helper.h |   67 ++
> activation.c        |  321 +++++-----
> bus.c               |   46 +
> bus.h               |   11
> dispatch.c          |   24
> main.c              |    9
> test-main.c         |   92 ---
> test.c              |   76 ++
> test.h              |   17
> 11 files changed, 1976 insertions(+), 229 deletions(-)
>
>
> -------------- next part --------------
> A non-text attachment was scrubbed...
> Name: dbus-sysbus-activation-helper.patch
> Type: text/x-patch
> Size: 78492 bytes
> Desc: not available
> Url :
> http://lists.freedesktop.org/archives/dbus/attachments/20061016/3b817ca6/dbus-sysbus-activation-helper.bin
>
> ------------------------------
>
> _______________________________________________
> dbus mailing list
> dbus at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/dbus
>
>
> End of dbus Digest, Vol 15, Issue 24
> ************************************
>



-- 
Regards,
Sumit

Sumit Kumar Jain
Call me: +91-9880472974
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freedesktop.org/archives/dbus/attachments/20061017/ff0d1739/attachment-0001.html


More information about the dbus mailing list