[Spice-devel] [announce] alpha glib/gtk client library + app.

Alexander Larsson alexl at redhat.com
Thu Sep 30 13:58:50 PDT 2010


On Thu, 2010-09-30 at 22:08 +0200, Gerd Hoffmann wrote:

> > "spice_watch", "spice_msg_out" etc is a pretty uncommon capitalization
> > for Gtk+/GObject APIs. Generally all (public) types are CamelCase.
> 
> spice_msg_out I want keep internal.  Right now it isn't but I want 
> figure a way to change that.
> 
> Need to look at spice_watch again, not sure how much sense this makes, 
> the original idea was to allow different os-specific implementations 
> there.  But when we require glib anyway we can just depend on the glib 
> main loop unconditionally.

Oh, ignore the specifics, i'm just talking about the captialization of
the type names.


> > Also, i don't like the audio integration, as it exposes the backend
> > implementation (at least by name) in the API. If we have multiple sound
> > implementations then each client must have code to integrate with each
> > one. So, I'd rather have a public SpiceAudioSink type that has different
> > implementations under the hood (which one gets picked might be solely a
> > build-time thing, or we could have an env var to choose between them).
> 
> Hmm.  The idea was to allow for SpicePulse and SpiceAlsa and probably 
> something else on windows and macos.  There isn't much interfacing 
> needed, the only thing the client app must do is creating a object 
> instance and hand it over a SpiceSesson object.  So having a convenience 
> helper function which picks one implementation should be easy to do.

I understand that, and underneath the covers there obviously have to be
these implementations. However, there is no need to expose these in the
public api. All the API the user needs is to create some type of object
that can handle the playing. I guess what you want is a base class which
is derived by each implementation, and then a factory function that gets
you the default implementation.

Also:

SpicePulse *spice_pulse_new(SpiceSession *session, GMainLoop *mainloop,
                            const char *name);


The name should probably just be taken from g_get_prgname() or
g_get_application_name().

-- 
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 Alexander Larsson                                            Red Hat, Inc 
       alexl at redhat.com            alexander.larsson at gmail.com 
He's an uncontrollable drug-addicted barbarian who hides his scarred face 
behind a mask. She's a man-hating green-skinned pearl diver on the trail of a 
serial killer. They fight crime! 



More information about the Spice-devel mailing list