From d8d3c7cc672d89b26180a404d6f0b03494160cf5 Mon Sep 17 00:00:00 2001 From: Felipe Franciosi Date: Thu, 29 Sep 2016 08:52:37 -0700 Subject: io: Introduce a qio_channel_set_feature() helper Testing QIOChannel feature support can be done with a helper called qio_channel_has_feature(). Setting feature support, however, was done manually with a logical OR. This patch introduces a new helper called qio_channel_set_feature() and makes use of it where applicable. Signed-off-by: Felipe Franciosi Signed-off-by: Daniel P. Berrange --- include/io/channel.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'include/io') diff --git a/include/io/channel.h b/include/io/channel.h index 5368604c8e..cf1c6223fa 100644 --- a/include/io/channel.h +++ b/include/io/channel.h @@ -148,6 +148,16 @@ struct QIOChannelClass { bool qio_channel_has_feature(QIOChannel *ioc, QIOChannelFeature feature); +/** + * qio_channel_set_feature: + * @ioc: the channel object + * @feature: the feature to set support for + * + * Add channel support for the feature named in @feature. + */ +void qio_channel_set_feature(QIOChannel *ioc, + QIOChannelFeature feature); + /** * qio_channel_readv_full: * @ioc: the channel object -- cgit v1.2.3-55-g7522