[Spice-devel] [PATCH spice-server 04/18] sound: Rename some objects

Christophe Fergeau cfergeau at redhat.com
Tue Nov 29 14:35:30 UTC 2016


On Tue, Nov 29, 2016 at 06:49:01AM -0500, Frediano Ziglio wrote:
> > 
> > On Wed, Nov 23, 2016 at 06:07:18PM +0000, Frediano Ziglio wrote:
> > > SndChannel -> SndChannelClient
> > > SndWorker -> SndChannel
> > 
> > I'd expect an explanation as to why what was called a SndChannel so far
> > really is a SndChannelClient (as it's going to inherit from
> > RedChannelClient in the future). Ditto for SndWorker->SndChannel
> > 
> 
> For the explanation I don't really know. I can imagine that as only
> one client is supported and channel/client objects are not used the
> usage of "SndChannel" make sense implementing client/server code.
> For SndWorker I think Worker is quite a generic term for "code that
> does something specific", in this case code that deal with sound.
> 
> From history this names came from the first commit in git so
> not much explanation. However I can see
> 
> struct SndWorker {
>     Channel base;
>     VDInterface *interface;
>     SndChannel *connection;
>     SndWorker *next;
> };
> 
> so I can assume that the SndWorker was always though as a RedChannel
> (Channel in this commit is the current RedChannel).
> 
> What about (suggestions welcome):
> 
> "SndWorker was always based on RedChannel (formerly Channel) while
> SndChannel always deals with client so moving to current naming
> it's less coherent to rename SndChannel to SndChannelClient and
> SndWorker to SndChannel."

something like

"SndWorker has been historically based on RedChannel, initial git commit
has:
struct SndWorker {
     Channel base;
     ...
};

SndChannel, contrary to what its name may imply is more focused on
marshalling/sending of sound data, which is the responsibility of
RedChannelClient for the other SPICE channels.

This commit makes the naming of these 2 types more consistent with how
the rest of the code is structured."

Christophe
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/spice-devel/attachments/20161129/b528f675/attachment.sig>


More information about the Spice-devel mailing list