* On 28 Jan 2015, Oswald Buddenhagen wrote: > On Wed, Jan 28, 2015 at 04:08:15AM -0600, David Champion wrote: > > > at first sight this doesn't look like anything that would actually need > a persistent dbus connection (e.g., to *receive* notifications), so why > don't you just use dbus-send via the biff interface?
No, it doesn't require a persistent connection. But I'm not sure why you ask the question this way; these don't seem like related issues to me. I'm not using the dbus api in order to persist the connection. I wrote the code this way only as an optimization -- I usually cache sockets in general practice. It survives connection closure, and it could be rewritten to close the socket after use in all cases, if people are more comfortable with that. I wrote the dbus code as I did because I generally prefer to link to a library than to shell out external commands, if the library code is reliable and available. In this case it is equally available as dbus-send is. 1. I think this is much easier for end users; dbus-send is a bit difficult to get right, and I think expecting users to understand dbus makes dbus support a problem, not a feature. 2. I sometimes get bursts of thousands of messages at once and I don't really want mutt to shell out a command for each message. Whatever receives the dbus messages can and should deal with that -- but mutt should not need to. It's just advertising an event. -- David Champion • [email protected]
