2 * QEMU I/O channels null driver
4 * Copyright (c) 2022 Red Hat, Inc.
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, see <http://www.gnu.org/licenses/>.
21 #ifndef QIO_CHANNEL_FILE_H
22 #define QIO_CHANNEL_FILE_H
24 #include "io/channel.h"
25 #include "qom/object.h"
27 #define TYPE_QIO_CHANNEL_NULL "qio-channel-null"
28 OBJECT_DECLARE_SIMPLE_TYPE(QIOChannelNull, QIO_CHANNEL_NULL)
34 * The QIOChannelNull object provides a channel implementation
35 * that discards all writes and returns EOF for all reads.
38 struct QIOChannelNull {
45 * qio_channel_null_new:
47 * Create a new IO channel object that discards all writes
48 * and returns EOF for all reads.
50 * Returns: the new channel object
53 qio_channel_null_new(void);
55 #endif /* QIO_CHANNEL_NULL_H */