SmolRTSP  0.1.3
A small, portable, extensible RTSP 1.0 implementation in C99
status_code.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/writer.h>
11 
12 #include <stdbool.h>
13 #include <stdint.h>
14 
15 #include <slice99.h>
16 
20 typedef uint16_t SmolRTSP_StatusCode;
21 
34  const SmolRTSP_StatusCode *restrict self,
35  SmolRTSP_Writer w) SMOLRTSP_PRIV_MUST_USE;
36 
40 SmolRTSP_ParseResult SmolRTSP_StatusCode_parse(
41  SmolRTSP_StatusCode *restrict self,
42  CharSlice99 input) SMOLRTSP_PRIV_MUST_USE;
43 
51  const SmolRTSP_StatusCode *restrict lhs,
52  const SmolRTSP_StatusCode *restrict rhs) SMOLRTSP_PRIV_MUST_USE;
53 
57 #define SMOLRTSP_STATUS_CONTINUE 100
58 
62 #define SMOLRTSP_STATUS_OK 200
63 
67 #define SMOLRTSP_STATUS_CREATED 201
68 
72 #define SMOLRTSP_STATUS_LOW_ON_STORAGE_SPACE 250
73 
77 #define SMOLRTSP_STATUS_MULTIPLE_CHOICES 300
78 
82 #define SMOLRTSP_STATUS_MOVED_PERMANENTLY 301
83 
87 #define SMOLRTSP_STATUS_MOVED_TEMPORARILY 302
88 
92 #define SMOLRTSP_STATUS_SEE_OTHER 303
93 
97 #define SMOLRTSP_STATUS_NOT_MODIFIED 304
98 
102 #define SMOLRTSP_STATUS_USE_PROXY 305
103 
107 #define SMOLRTSP_STATUS_BAD_REQUEST 400
108 
112 #define SMOLRTSP_STATUS_UNAUTHORIZED 401
113 
117 #define SMOLRTSP_STATUS_PAYMENT_REQUIRED 402
118 
122 #define SMOLRTSP_STATUS_FORBIDDEN 403
123 
127 #define SMOLRTSP_STATUS_NOT_FOUND 404
128 
132 #define SMOLRTSP_STATUS_METHOD_NOT_ALLOWED 405
133 
137 #define SMOLRTSP_STATUS_NOT_ACCEPTABLE 406
138 
142 #define SMOLRTSP_STATUS_PROXY_AUTHENTICATION_REQUIRED 407
143 
147 #define SMOLRTSP_STATUS_REQUEST_TIMEOUT 408
148 
152 #define SMOLRTSP_STATUS_GONE 410
153 
157 #define SMOLRTSP_STATUS_LENGTH_REQUIRED 411
158 
162 #define SMOLRTSP_STATUS_PRECONDITION_FAILED 412
163 
167 #define SMOLRTSP_STATUS_REQUEST_ENTITY_TOO_LARGE 413
168 
172 #define SMOLRTSP_STATUS_REQUEST_URI_TOO_LARGE 414
173 
177 #define SMOLRTSP_STATUS_UNSUPPORTED_MEDIA_TYPE 415
178 
182 #define SMOLRTSP_STATUS_PARAMETER_NOT_UNDERSTOOD 451
183 
187 #define SMOLRTSP_STATUS_CONFERENCE_NOT_FOUND 452
188 
192 #define SMOLRTSP_STATUS_NOT_ENOUGH_BANDWIDTH 453
193 
197 #define SMOLRTSP_STATUS_SESSION_NOT_FOUND 454
198 
202 #define SMOLRTSP_STATUS_METHOD_NOT_VALID_IN_THIS_STATE 455
203 
207 #define SMOLRTSP_STATUS_HEADER_FIELD_NOT_VALID_FOR_RESOURCE 456
208 
212 #define SMOLRTSP_STATUS_INVALID_RANGE 457
213 
217 #define SMOLRTSP_STATUS_PARAMETER_IS_READ_ONLY 458
218 
222 #define SMOLRTSP_STATUS_AGGREGATE_OPERATION_NOT_ALLOWED 459
223 
227 #define SMOLRTSP_STATUS_ONLY_AGGREGATE_OPERATION_ALLOWED 460
228 
232 #define SMOLRTSP_STATUS_UNSUPPORTED_TRANSPORT 461
233 
237 #define SMOLRTSP_STATUS_DESTINATION_UNREACHABLE 462
238 
242 #define SMOLRTSP_STATUS_INTERNAL_SERVER_ERROR 500
243 
247 #define SMOLRTSP_STATUS_NOT_IMPLEMENTED 501
248 
252 #define SMOLRTSP_STATUS_BAD_GATEWAY 502
253 
257 #define SMOLRTSP_STATUS_SERVICE_UNAVAILABLE 503
258 
262 #define SMOLRTSP_STATUS_GATEWAY_TIMEOUT 504
263 
267 #define SMOLRTSP_STATUS_RTSP_VERSION_NOT_SUPPORTED 505
268 
272 #define SMOLRTSP_STATUS_OPTION_NOT_SUPPORTED 551
Possible parsing errors.
bool SmolRTSP_StatusCode_eq(const SmolRTSP_StatusCode *restrict lhs, const SmolRTSP_StatusCode *restrict rhs) SMOLRTSP_PRIV_MUST_USE
Tests lhs and rhs for equality.
SmolRTSP_ParseResult SmolRTSP_StatusCode_parse(SmolRTSP_StatusCode *restrict self, CharSlice99 input) SMOLRTSP_PRIV_MUST_USE
Parses data to self.
uint16_t SmolRTSP_StatusCode
An RTSP status code.
Definition: status_code.h:20
ssize_t SmolRTSP_StatusCode_serialize(const SmolRTSP_StatusCode *restrict self, SmolRTSP_Writer w) SMOLRTSP_PRIV_MUST_USE
Serialises self into w.
The writer interface.