1 #ifndef STREAM_H 2 #define STREAM_H 1 3 4 #include "qemu-common.h" 5 #include "qom/object.h" 6 7 /* stream slave. Used until qdev provides a generic way. */ 8 #define TYPE_STREAM_SLAVE "stream-slave" 9 10 #define STREAM_SLAVE_CLASS(klass) \ 11 OBJECT_CLASS_CHECK(StreamSlaveClass, (klass), TYPE_STREAM_SLAVE) 12 #define STREAM_SLAVE_GET_CLASS(obj) \ 13 OBJECT_GET_CLASS(StreamSlaveClass, (obj), TYPE_STREAM_SLAVE) 14 #define STREAM_SLAVE(obj) \ 15 INTERFACE_CHECK(StreamSlave, (obj), TYPE_STREAM_SLAVE) 16 17 typedef struct StreamSlave { 18 Object Parent; 19 } StreamSlave; 20 21 typedef struct StreamSlaveClass { 22 InterfaceClass parent; 23 24 void (*push)(StreamSlave *obj, unsigned char *buf, size_t len, 25 uint32_t *app); 26 } StreamSlaveClass; 27 28 void 29 stream_push(StreamSlave *sink, uint8_t *buf, size_t len, uint32_t *app); 30 31 #endif /* STREAM_H */ 32