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

Christophe Fergeau cfergeau at redhat.com
Thu Mar 8 10:49:28 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)

> 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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/spice-devel/attachments/20180308/26b11170/attachment-0001.sig>


More information about the Spice-devel mailing list