[Spice-devel] [PATCH spice-server v2 1/2] stream-device: Separate declaration in a separate header

Frediano Ziglio fziglio at redhat.com
Thu Mar 8 11:15:36 UTC 2018


> 
> On Wed, Mar 07, 2018 at 08:26:15AM +0000, Frediano Ziglio wrote:
> > Move public declaration (stream_device_connect) from char-device.h
> > to a new stream-device.h.
> > Add type declaration for StreamDevice.
> > This allows to use the type outside the implementation file and
> 
> "outside *of* the implementation file"? (not 100% sure here)
> 

Not sure either, I found this:
https://english.stackexchange.com/questions/9700/outside-or-outside-of
so looks like without is meant to be better.

> > make easier to extend the interface without changing char-device.h
> 
> "makes it easier"
> 
> 
> > diff --git a/server/stream-device.h b/server/stream-device.h
> > new file mode 100644
> > index 00000000..501629c1
> > --- /dev/null
> > +++ b/server/stream-device.h
> > @@ -0,0 +1,49 @@
> > +/* -*- Mode: C; c-basic-offset: 4; indent-tabs-mode: nil -*- */
> > +/*
> > +   Copyright (C) 2018 Red Hat, Inc.
> > +
> > +   This library is free software; you can redistribute it and/or
> > +   modify it under the terms of the GNU Lesser General Public
> > +   License as published by the Free Software Foundation; either
> > +   version 2.1 of the License, or (at your option) any later version.
> > +
> > +   This library is distributed in the hope that it will be useful,
> > +   but WITHOUT ANY WARRANTY; without even the implied warranty of
> > +   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
> > +   Lesser General Public License for more details.
> > +
> > +   You should have received a copy of the GNU Lesser General Public
> > +   License along with this library; if not, see
> > <http://www.gnu.org/licenses/>.
> > +*/
> > +
> > +#ifndef STREAM_DEVICE_H
> > +#define STREAM_DEVICE_H
> > +
> > +#include "char-device.h"
> > +
> > +G_BEGIN_DECLS
> > +
> > +/**
> > + * This type it's a RedCharDevice class.
> > + * A pointer to StreamDevice can be converted to a RedCharDevice.
> > + */
> 
> Maybe just "StreamDevice inherits from RedCharDevice"? At least
> s/it's/is/
> 
> Acked-by: Christophe Fergeau <cfergeau at redhat.com>
> 
> Christophe
> 

Frediano


More information about the Spice-devel mailing list