about activation
anlong sun
anlongsun at gmail.com
Mon Jan 29 20:07:49 PST 2007
Hi Havoc Pennington:
Thank you for giving implement suggestions.
I am glad to explain what I am doing.
It is a "open with" function of applications manager in smart phone.
when user click a *.mp3 file in file manager, a open with file message
will be sent to app manager, app manager will find certain media player
to launch it to open the mp3 file.
before i implement it by Qt QCopchannel, store the message in
/tmp/pid-message RAM file by "data >> QByteArray".
when media player is started, it will read the /tmp/pid-message file and
send out a signal
in MediaApplication.cpp class.
Now, I implement it by Gtk and dbus. Also I want to do it by write and read
/tmp/pid-message,
but i don not know how to store into and read from a dbus message
pid-message.
I know some test code can write and read dbus message into a file, but i can
not find the source code.
It is easy to implement by "command lines", something like "MediaPlayer
/a/mp3/file.mp3"
but we want to make it a more general facility , something like
open_file_with_app_and_save_setting_and_tell_user (const std::string
&file, const std::string &app, bool save, const std::string
&user_message);
it is a auto message which is sent to app manager by file manager, app
manager will check if the media player is live, if live, then send the
message,
if not live, should start the media player first, and after the player is
ready to receive the message, send message then.
I do not know how Gnome an KDE implement such function.
On 1/25/07, Havoc Pennington <hp at redhat.com> wrote:
>
> A queued message with a timeout would create a race condition anyway; it
> would be more robust if you do it like:
> 1) start your application B to receive the message
> 2) in application A, listen for the NameOwnerChanged signal
> when B receives its bus name
> 3) in application A, send your message to B
This is sound a good idea, I will try it first.
Thanks:)
Havoc
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freedesktop.org/archives/dbus/attachments/20070130/897a5718/attachment.htm
More information about the dbus
mailing list