From freedesktop-dbus Tue Jun 13 16:20:02 2006 From: Thiago Macieira Date: Tue, 13 Jun 2006 16:20:02 +0000 To: freedesktop-dbus Subject: Re: Targetted signals Message-Id: <200606131820.02844.thiago.macieira () trolltech ! com> X-MARC-Message: https://marc.info/?l=freedesktop-dbus&m=117323265030752 MIME-Version: 1 Content-Type: multipart/mixed; boundary="--nextPart1182778.v5IpdpNvpt" --nextPart1182778.v5IpdpNvpt Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Ross Burton wrote: >I'd really like it if signals could be send to specific addresses.=20 I don't really agree with that. You're thinking of signals like a kind=20 of "broadcast": all parties receive it. However, signals are more like "multicast": only interested parties=20 receive it. You just have to craft the signal emission so that the=20 receivers can make up a rule to match them. Since you can't influence the service name, nor the interface name or the=20 signal name, you're left with two items: the object path and the=20 arguments (and signature). You've tried to construct the rule based on=20 the arguments: I would recomment the opposite approach: make the signals=20 distinct based on the object path. >My=20 >use-case is the DBus port of evolution-data-server. When a live book >view is updated a signal needs to be sent to interested parties, but as >there can be multiple book views with different queries and the message >arguments can be large (up to 40 vcards), restricting the sending of the >signals to only the relevant clients would be a good idea. =20 Without understanding what "relevant clients" means, there isn't much more= =20 we can help you with. But, for example, if this meant that "relevant clients" means "clients=20 that have open queries on the book view that got updated", one solution=20 would be to have one object path per book view. That means clients would=20 listen to the signals coming only from the book views that they queried,=20 because they would have queried according to the object path. >At the=20 >moment the server calls methods on the server, but this causes a method >return to be sent, which is not required. You can make a call with the "no reply needed" flag set. The receiver side= =20 can opt to not send a reply in that case. =2D-=20 Thiago Jos=E9 Macieira - thiago.macieira AT trolltech.com Trolltech AS - Sandakerveien 116, NO-0402 Oslo, Norway --nextPart1182778.v5IpdpNvpt Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2.2 (GNU/Linux) iD8DBQBEjuWyM/XwBW70U1gRAt0mAJ9H5YMTrjnFo0v3fTdwU1pMyAt/QgCgrjzz fQlbAXEuZ3IXg5ImPuFD9Fg= =bAD2 -----END PGP SIGNATURE----- --nextPart1182778.v5IpdpNvpt--