[Spice-devel] [PATCH spice-gtk 2/4] SpiceAudio stream name default to get_application_name()

Christophe Fergeau cfergeau at redhat.com
Mon Nov 7 00:35:27 PST 2011


On Sat, Nov 05, 2011 at 05:56:07PM +0100, Marc-André Lureau wrote:
> ---
>  gtk/spice-audio.c |    9 +++++----
>  1 files changed, 5 insertions(+), 4 deletions(-)
> 
> diff --git a/gtk/spice-audio.c b/gtk/spice-audio.c
> index e991cea..3f4bb80 100644
> --- a/gtk/spice-audio.c
> +++ b/gtk/spice-audio.c
> @@ -64,22 +64,23 @@ static void spice_audio_init(SpiceAudio *self G_GNUC_UNUSED)
>   * spice_audio_new:
>   * @session: the #SpiceSession to connect to
>   * @context: a #GMainContext to attach to (or %NULL for default).
> - * @name: a name for the audio channels (or %NULL for default).
> + * @name: a name for the audio channels (or %NULL for application name).
>   *
>   * Once instantiated, #SpiceAudio will handle the playback and record
>   * channels to stream to your local audio system.
>   *
>   * Returns: a new #SpiceAudio instance or %NULL if no backend or failed.
> + * Deprecated: 0.8: Use spice_audio_get() instead
>   **/
>  SpiceAudio *spice_audio_new(SpiceSession *session, GMainContext *context,
> -                         const char *name)
> +                            const char *name)
>  {
>      SpiceAudio *audio = NULL;
>  
>      if (context == NULL)
> -      context = g_main_context_default();
> +        context = g_main_context_default();
>      if (name == NULL)
> -      name = "spice";
> +        name = g_get_application_name();

ACK, though this raises the question if this name will be enough when we
have multiple sessions/processes running different VMs,

Christophe
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/spice-devel/attachments/20111107/3c14d730/attachment.pgp>


More information about the Spice-devel mailing list