Re: fourth report: cheese integration
- From: Cosimo Cecchi <cosimoc gnome org>
- To: Felix Kaser <f kaser gmx net>
- Cc: "gnome-soc-list gnome org" <gnome-soc-list gnome org>
- Subject: Re: fourth report: cheese integration
- Date: Tue, 24 Jun 2008 01:51:59 +0200
On Mon, 2008-06-23 at 10:34 +0200, Felix Kaser wrote:
> The problem is: When cheese gets called via dbus, it enters a specific
> method (remote method). In this method cheese should wait until the user
> has taken a picture, then return the path via dbus. But what about the
> waiting? Well the client blocks, but this is not a problem in my
> opinion. The thing is, how to make the "waiting" of the cheese-method?
> Active waiting (while (return_path == null) wait(1); ) sounds really
> ugly! But what else? Make a new thread? Work with signals? Change the
> whole work flow?
>
> Can somebody help me with that? I'm sure one of you has had similar
> problems and has solved them in a nice way :)
I am having my first experiences with DBus too these days ;)
It seems that an object on the bus can have signals too, other than
methods. So a very simple way to solve your issue could be splitting the
picture acquisition process into two steps: first you call the remote
method on the cheese manager, then, when the picture is ready, a signal
is emitted from the manager itself, with the path as argument.
Hope that I understood your problem correctly ;)
Cheers!
--
Cosimo
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]