SmolRTSP
0.1.3
A small, portable, extensible RTSP 1.0 implementation in C99
request.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/request_line.h
>
13
14
#include <stdbool.h>
15
16
#include <slice99.h>
17
21
typedef
struct
{
25
SmolRTSP_RequestLine
start_line
;
26
30
SmolRTSP_HeaderMap
header_map
;
31
35
SmolRTSP_MessageBody
body
;
36
40
uint32_t
cseq
;
41
}
SmolRTSP_Request
;
42
46
SmolRTSP_Request
SmolRTSP_Request_uninit
(
void
) SMOLRTSP_PRIV_MUST_USE;
47
64
ssize_t
SmolRTSP_Request_serialize
(
65
const
SmolRTSP_Request
*restrict
self
,
66
SmolRTSP_Writer w) SMOLRTSP_PRIV_MUST_USE;
67
73
SmolRTSP_ParseResult
SmolRTSP_Request_parse
(
74
SmolRTSP_Request
*restrict
self
, CharSlice99 input) SMOLRTSP_PRIV_MUST_USE;
75
82
bool
SmolRTSP_Request_eq
(
83
const
SmolRTSP_Request
*restrict lhs,
84
const
SmolRTSP_Request
*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_Request_serialize
ssize_t SmolRTSP_Request_serialize(const SmolRTSP_Request *restrict self, SmolRTSP_Writer w) SMOLRTSP_PRIV_MUST_USE
Serialises self into w.
SmolRTSP_Request_uninit
SmolRTSP_Request SmolRTSP_Request_uninit(void) SMOLRTSP_PRIV_MUST_USE
Returns an RTSP request suitable for being parsed.
SmolRTSP_Request_parse
SmolRTSP_ParseResult SmolRTSP_Request_parse(SmolRTSP_Request *restrict self, CharSlice99 input) SMOLRTSP_PRIV_MUST_USE
Parses data to self.
SmolRTSP_Request_eq
bool SmolRTSP_Request_eq(const SmolRTSP_Request *restrict lhs, const SmolRTSP_Request *restrict rhs) SMOLRTSP_PRIV_MUST_USE
Tests lhs and rhs for equality.
request_line.h
An RTSP request line.
SmolRTSP_HeaderMap
An RTSP header map.
Definition:
header_map.h:37
SmolRTSP_RequestLine
An RTSP request line.
Definition:
request_line.h:21
SmolRTSP_Request
An RTSP request.
Definition:
request.h:21
SmolRTSP_Request::cseq
uint32_t cseq
The sequence number for an RTSP request/response pair.
Definition:
request.h:40
SmolRTSP_Request::header_map
SmolRTSP_HeaderMap header_map
The header map.
Definition:
request.h:30
SmolRTSP_Request::body
SmolRTSP_MessageBody body
The message body.
Definition:
request.h:35
SmolRTSP_Request::start_line
SmolRTSP_RequestLine start_line
The request line.
Definition:
request.h:25
include
smolrtsp
types
request.h
Generated by
1.9.1