Checking pending method calls in DBus.

Ville M. Vainio vivainio at gmail.com
Thu Jul 16 03:51:51 PDT 2009


On Thu, Jul 16, 2009 at 10:36 AM, NayaN kumar<nayankk at gmail.com> wrote:

> I am implementing an asynchronous method through DBus, which will
> download files over-the-network. This async method say 'StartDownload'
> will be exposed via DBus. During the process of download, client may
> wish to cancel the download, say using 'CancelDownload' method. This
> means, while I am executing StartDownload method, if I get
> 'CancelDownload' request, I need to handle 'CancelDownload' request
> first.
>
> In order to implement this functionality, I need to have a provision of
> checking the pending methods calls initiated by client via DBus. Does
> DBus provides any API's which queries pending method calls?

You don't need to ask dbus for this (and even if you could, it would
seem to be unsafe). Since it's you creating the pending call in the
first place, you can put it in your own data structure and use that
for your cancel operation. Also, you shouldn't think in terms of
"cancel this pending call", but in terms of "cancel download number
7". You are mixing app level vs. dbus level concepts here.

-- 
Ville M. Vainio
http://tinyurl.com/vainio


More information about the dbus mailing list