SmolRTSP
0.1.3
A small, portable, extensible RTSP 1.0 implementation in C99
response.h
Go to the documentation of this file.
1
6
#pragma once
7
8
#include <smolrtsp/priv/compiler_attrs.h>
9
#include <
smolrtsp/types/error.h
>
10
#include <
smolrtsp/types/header_map.h
>
11
#include <
smolrtsp/types/message_body.h
>
12
#include <
smolrtsp/types/response_line.h
>
13
14
#include <stdbool.h>
15
16
#include <slice99.h>
17
21
typedef
struct
{
25
SmolRTSP_ResponseLine
start_line
;
26
30
SmolRTSP_HeaderMap
header_map
;
31
35
SmolRTSP_MessageBody
body
;
36
40
uint32_t
cseq
;
41
}
SmolRTSP_Response
;
42
46
SmolRTSP_Response
SmolRTSP_Response_uninit
(
void
) SMOLRTSP_PRIV_MUST_USE;
47
64
ssize_t
SmolRTSP_Response_serialize
(
65
const
SmolRTSP_Response
*restrict
self
,
66
SmolRTSP_Writer w) SMOLRTSP_PRIV_MUST_USE;
67
73
SmolRTSP_ParseResult
SmolRTSP_Response_parse
(
74
SmolRTSP_Response
*restrict
self
, CharSlice99 input) SMOLRTSP_PRIV_MUST_USE;
75
82
bool
SmolRTSP_Response_eq
(
83
const
SmolRTSP_Response
*restrict lhs,
84
const
SmolRTSP_Response
*restrict rhs) SMOLRTSP_PRIV_MUST_USE;
error.h
Possible parsing errors.
header_map.h
An RTSP header map.
message_body.h
An RTSP message body.
SmolRTSP_MessageBody
CharSlice99 SmolRTSP_MessageBody
An RTSP message body.
Definition:
message_body.h:19
SmolRTSP_Response_parse
SmolRTSP_ParseResult SmolRTSP_Response_parse(SmolRTSP_Response *restrict self, CharSlice99 input) SMOLRTSP_PRIV_MUST_USE
Parses data to self.
SmolRTSP_Response_eq
bool SmolRTSP_Response_eq(const SmolRTSP_Response *restrict lhs, const SmolRTSP_Response *restrict rhs) SMOLRTSP_PRIV_MUST_USE
Tests lhs and rhs for equality.
SmolRTSP_Response_uninit
SmolRTSP_Response SmolRTSP_Response_uninit(void) SMOLRTSP_PRIV_MUST_USE
Returns an RTSP response suitable for being parsed.
SmolRTSP_Response_serialize
ssize_t SmolRTSP_Response_serialize(const SmolRTSP_Response *restrict self, SmolRTSP_Writer w) SMOLRTSP_PRIV_MUST_USE
Serialises self into w.
response_line.h
An RTSP response line.
SmolRTSP_HeaderMap
An RTSP header map.
Definition:
header_map.h:37
SmolRTSP_ResponseLine
An RTSP response line.
Definition:
response_line.h:21
SmolRTSP_Response
An RTSP response.
Definition:
response.h:21
SmolRTSP_Response::start_line
SmolRTSP_ResponseLine start_line
The response line.
Definition:
response.h:25
SmolRTSP_Response::cseq
uint32_t cseq
The sequence number for an RTSP request/response pair.
Definition:
response.h:40
SmolRTSP_Response::header_map
SmolRTSP_HeaderMap header_map
The header map.
Definition:
response.h:30
SmolRTSP_Response::body
SmolRTSP_MessageBody body
The message body.
Definition:
response.h:35
include
smolrtsp
types
response.h
Generated by
1.9.1