Compy 0.2.0
A lightweight RTSP 1.0 server library for embedded systems
Loading...
Searching...
No Matches
status_code.h
Go to the documentation of this file.
1
6#pragma once
7
8#include <compy/priv/compiler_attrs.h>
9#include <compy/types/error.h>
10#include <compy/writer.h>
11
12#include <stdbool.h>
13#include <stdint.h>
14
15#include <slice99.h>
16
20typedef uint16_t Compy_StatusCode;
21
34 const Compy_StatusCode *restrict self, Compy_Writer w) COMPY_PRIV_MUST_USE;
35
39Compy_ParseResult Compy_StatusCode_parse(
40 Compy_StatusCode *restrict self, CharSlice99 input) COMPY_PRIV_MUST_USE;
41
49 const Compy_StatusCode *restrict lhs,
50 const Compy_StatusCode *restrict rhs) COMPY_PRIV_MUST_USE;
51
55#define COMPY_STATUS_CONTINUE 100
56
60#define COMPY_STATUS_OK 200
61
65#define COMPY_STATUS_CREATED 201
66
70#define COMPY_STATUS_LOW_ON_STORAGE_SPACE 250
71
75#define COMPY_STATUS_MULTIPLE_CHOICES 300
76
80#define COMPY_STATUS_MOVED_PERMANENTLY 301
81
85#define COMPY_STATUS_MOVED_TEMPORARILY 302
86
90#define COMPY_STATUS_SEE_OTHER 303
91
95#define COMPY_STATUS_NOT_MODIFIED 304
96
100#define COMPY_STATUS_USE_PROXY 305
101
105#define COMPY_STATUS_BAD_REQUEST 400
106
110#define COMPY_STATUS_UNAUTHORIZED 401
111
115#define COMPY_STATUS_PAYMENT_REQUIRED 402
116
120#define COMPY_STATUS_FORBIDDEN 403
121
125#define COMPY_STATUS_NOT_FOUND 404
126
130#define COMPY_STATUS_METHOD_NOT_ALLOWED 405
131
135#define COMPY_STATUS_NOT_ACCEPTABLE 406
136
140#define COMPY_STATUS_PROXY_AUTHENTICATION_REQUIRED 407
141
145#define COMPY_STATUS_REQUEST_TIMEOUT 408
146
150#define COMPY_STATUS_GONE 410
151
155#define COMPY_STATUS_LENGTH_REQUIRED 411
156
160#define COMPY_STATUS_PRECONDITION_FAILED 412
161
165#define COMPY_STATUS_REQUEST_ENTITY_TOO_LARGE 413
166
170#define COMPY_STATUS_REQUEST_URI_TOO_LARGE 414
171
175#define COMPY_STATUS_UNSUPPORTED_MEDIA_TYPE 415
176
180#define COMPY_STATUS_PARAMETER_NOT_UNDERSTOOD 451
181
185#define COMPY_STATUS_CONFERENCE_NOT_FOUND 452
186
190#define COMPY_STATUS_NOT_ENOUGH_BANDWIDTH 453
191
195#define COMPY_STATUS_SESSION_NOT_FOUND 454
196
200#define COMPY_STATUS_METHOD_NOT_VALID_IN_THIS_STATE 455
201
205#define COMPY_STATUS_HEADER_FIELD_NOT_VALID_FOR_RESOURCE 456
206
210#define COMPY_STATUS_INVALID_RANGE 457
211
215#define COMPY_STATUS_PARAMETER_IS_READ_ONLY 458
216
220#define COMPY_STATUS_AGGREGATE_OPERATION_NOT_ALLOWED 459
221
225#define COMPY_STATUS_ONLY_AGGREGATE_OPERATION_ALLOWED 460
226
230#define COMPY_STATUS_UNSUPPORTED_TRANSPORT 461
231
235#define COMPY_STATUS_DESTINATION_UNREACHABLE 462
236
240#define COMPY_STATUS_INTERNAL_SERVER_ERROR 500
241
245#define COMPY_STATUS_NOT_IMPLEMENTED 501
246
250#define COMPY_STATUS_BAD_GATEWAY 502
251
255#define COMPY_STATUS_SERVICE_UNAVAILABLE 503
256
260#define COMPY_STATUS_GATEWAY_TIMEOUT 504
261
265#define COMPY_STATUS_RTSP_VERSION_NOT_SUPPORTED 505
266
270#define COMPY_STATUS_OPTION_NOT_SUPPORTED 551
Possible parsing errors.
uint16_t Compy_StatusCode
An RTSP status code.
Definition status_code.h:20
ssize_t Compy_StatusCode_serialize(const Compy_StatusCode *restrict self, Compy_Writer w) COMPY_PRIV_MUST_USE
Serialises self into w.
Definition status_code.c:12
bool Compy_StatusCode_eq(const Compy_StatusCode *restrict lhs, const Compy_StatusCode *restrict rhs) COMPY_PRIV_MUST_USE
Tests lhs and rhs for equality.
Definition status_code.c:42
Compy_ParseResult Compy_StatusCode_parse(Compy_StatusCode *restrict self, CharSlice99 input) COMPY_PRIV_MUST_USE
Parses data to self.
Definition status_code.c:21
The writer interface.