Re: RFC: GSound, a GObject library for playing system sounds
- From: Tristan Van Berkom <tristan upstairslabs com>
- To: Tristan Brindle <tcbrindle gmail com>
- Cc: desktop-devel-list gnome org
- Subject: Re: RFC: GSound, a GObject library for playing system sounds
- Date: Fri, 14 Nov 2014 22:45:03 +0900
On Fri, 2014-11-14 at 21:34 +0800, Tristan Brindle wrote:
On 14 Nov 2014, at 8:15 pm, Sébastien Wilmet <swilmet gnome org> wrote:
On Fri, Nov 14, 2014 at 05:47:52PM +0800, Tristan Brindle wrote:
https://tcbrindle.github.io/gsound-docs
With the name GSound I was worried that you reused the g_ namespace (for
GLib), but it's not the case, so it's fine.
gsound_context_play_full()
gsound_context_play_full_finish()
To follow the GIO convention for async operations, the first function
should be renamed as play_full_async(). So that in the future if you
want to create a sync version, you can name it play_full().
Thanks for the feedback :-)
In this case the async call will always be preferred, so if I ever added a sync version then it would be
gsound_context_play_full_sync()
I think this is the style gdbus uses for example to emphasise that you *should* be using the async version,
so I figured I’d copy it.
I think there is not strong consensus, or ample consistency in the
naming of sync/async methods (I certainly wish that all sync methods
ended in _sync() and async methods were left without suffixes, but I
don't see much consistency).
FWIW, evolution-data-server does use the _sync() suffix for all sync
calls, and no suffix for ordinary async operation.
Cheers,
-Tristan
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]