]> Git Repo - qemu.git/blame - hw/core/stream.c
ccid-card: include libcacard.h only
[qemu.git] / hw / core / stream.c
CommitLineData
18c86e2b 1#include "qemu/osdep.h"
83c9f4ca 2#include "hw/stream.h"
669b4983 3
35e60bfd 4size_t
42bb9c91 5stream_push(StreamSlave *sink, uint8_t *buf, size_t len)
669b4983
PC
6{
7 StreamSlaveClass *k = STREAM_SLAVE_GET_CLASS(sink);
8
42bb9c91 9 return k->push(sink, buf, len);
35e60bfd
PC
10}
11
12bool
13stream_can_push(StreamSlave *sink, StreamCanPushNotifyFn notify,
14 void *notify_opaque)
15{
16 StreamSlaveClass *k = STREAM_SLAVE_GET_CLASS(sink);
17
18 return k->can_push ? k->can_push(sink, notify, notify_opaque) : true;
669b4983
PC
19}
20
8c43a6f0 21static const TypeInfo stream_slave_info = {
669b4983
PC
22 .name = TYPE_STREAM_SLAVE,
23 .parent = TYPE_INTERFACE,
24 .class_size = sizeof(StreamSlaveClass),
25};
26
27
28static void stream_slave_register_types(void)
29{
30 type_register_static(&stream_slave_info);
31}
32
33type_init(stream_slave_register_types)
This page took 0.31641 seconds and 4 git commands to generate.