Getting most recent message from queue

Havoc Pennington hp at redhat.com
Thu Jun 1 20:44:36 PDT 2006



Jan Banan wrote:
>  Hallo 
> 
> are there in D-BUS any simple mechanism for obtaining the most recent
> message of specified type (filter) from receiver`s queue ?
> 
> Example: [Most recent]  ->XAXXXAXXAXA-> [oldest] -> receiver APP 
> 
> I`d like to pop message type 'A' but the most recent  and all other
> message type 'A' discard. Message type 'X' should stay untouched. Is it
> this possible to do ? I`d like to use only exported low-level C API and
> signal type messages. 
>

DBusConnection does something like this internally for method replies, 
but there's currently no way to do it for signals, short of building 
your own message queue on top of the DBusConnection queue.

Havoc


More information about the dbus mailing list