]>
code.delx.au - pulseaudio/blob - src/pstream-util.c
3 #include "protocol-native-spec.h"
4 #include "pstream-util.h"
6 void pstream_send_tagstruct(struct pstream
*p
, struct tagstruct
*t
) {
12 data
= tagstruct_free_data(t
, &length
);
13 assert(data
&& length
);
14 packet
= packet_new_dynamic(data
, length
);
16 pstream_send_packet(p
, packet
);
20 void pstream_send_error(struct pstream
*p
, uint32_t tag
, uint32_t error
) {
21 struct tagstruct
*t
= tagstruct_new(NULL
, 0);
23 tagstruct_putu32(t
, PA_COMMAND_ERROR
);
24 tagstruct_putu32(t
, tag
);
25 tagstruct_putu32(t
, error
);
26 pstream_send_tagstruct(p
, t
);
29 void pstream_send_simple_ack(struct pstream
*p
, uint32_t tag
) {
30 struct tagstruct
*t
= tagstruct_new(NULL
, 0);
32 tagstruct_putu32(t
, PA_COMMAND_REPLY
);
33 tagstruct_putu32(t
, tag
);
34 pstream_send_tagstruct(p
, t
);