SmolRTSP  0.1.3
A small, portable, extensible RTSP 1.0 implementation in C99
status_code.h File Reference

An RTSP status code. More...

#include <smolrtsp/priv/compiler_attrs.h>
#include <smolrtsp/types/error.h>
#include <smolrtsp/writer.h>
#include <stdbool.h>
#include <stdint.h>
#include <slice99.h>
Include dependency graph for status_code.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define SMOLRTSP_STATUS_CONTINUE   100
 Continue.
 
#define SMOLRTSP_STATUS_OK   200
 OK.
 
#define SMOLRTSP_STATUS_CREATED   201
 Created.
 
#define SMOLRTSP_STATUS_LOW_ON_STORAGE_SPACE   250
 Low on Storage Space.
 
#define SMOLRTSP_STATUS_MULTIPLE_CHOICES   300
 Multiple Choices.
 
#define SMOLRTSP_STATUS_MOVED_PERMANENTLY   301
 Moved Permanently.
 
#define SMOLRTSP_STATUS_MOVED_TEMPORARILY   302
 Moved Temporarily.
 
#define SMOLRTSP_STATUS_SEE_OTHER   303
 See Other.
 
#define SMOLRTSP_STATUS_NOT_MODIFIED   304
 Not Modified.
 
#define SMOLRTSP_STATUS_USE_PROXY   305
 Use Proxy.
 
#define SMOLRTSP_STATUS_BAD_REQUEST   400
 Bad Request.
 
#define SMOLRTSP_STATUS_UNAUTHORIZED   401
 Unauthorized.
 
#define SMOLRTSP_STATUS_PAYMENT_REQUIRED   402
 Payment Required.
 
#define SMOLRTSP_STATUS_FORBIDDEN   403
 Forbidden.
 
#define SMOLRTSP_STATUS_NOT_FOUND   404
 Not Found.
 
#define SMOLRTSP_STATUS_METHOD_NOT_ALLOWED   405
 Method Not Allowed.
 
#define SMOLRTSP_STATUS_NOT_ACCEPTABLE   406
 Not Acceptable.
 
#define SMOLRTSP_STATUS_PROXY_AUTHENTICATION_REQUIRED   407
 Proxy Authentication Required.
 
#define SMOLRTSP_STATUS_REQUEST_TIMEOUT   408
 Request Time-out.
 
#define SMOLRTSP_STATUS_GONE   410
 Gone.
 
#define SMOLRTSP_STATUS_LENGTH_REQUIRED   411
 Length Required.
 
#define SMOLRTSP_STATUS_PRECONDITION_FAILED   412
 Precondition Failed.
 
#define SMOLRTSP_STATUS_REQUEST_ENTITY_TOO_LARGE   413
 Request Entity Too Large.
 
#define SMOLRTSP_STATUS_REQUEST_URI_TOO_LARGE   414
 Request-URI Too Large.
 
#define SMOLRTSP_STATUS_UNSUPPORTED_MEDIA_TYPE   415
 Unsupported Media Type.
 
#define SMOLRTSP_STATUS_PARAMETER_NOT_UNDERSTOOD   451
 Parameter Not Understood.
 
#define SMOLRTSP_STATUS_CONFERENCE_NOT_FOUND   452
 Conference Not Found.
 
#define SMOLRTSP_STATUS_NOT_ENOUGH_BANDWIDTH   453
 Not Enough Bandwidth.
 
#define SMOLRTSP_STATUS_SESSION_NOT_FOUND   454
 Session Not Found.
 
#define SMOLRTSP_STATUS_METHOD_NOT_VALID_IN_THIS_STATE   455
 Method Not Valid in This State.
 
#define SMOLRTSP_STATUS_HEADER_FIELD_NOT_VALID_FOR_RESOURCE   456
 Header Field Not Valid for Resource.
 
#define SMOLRTSP_STATUS_INVALID_RANGE   457
 Invalid Range.
 
#define SMOLRTSP_STATUS_PARAMETER_IS_READ_ONLY   458
 Parameter Is Read-Only.
 
#define SMOLRTSP_STATUS_AGGREGATE_OPERATION_NOT_ALLOWED   459
 Aggregate operation not allowed.
 
#define SMOLRTSP_STATUS_ONLY_AGGREGATE_OPERATION_ALLOWED   460
 Only aggregate operation allowed.
 
#define SMOLRTSP_STATUS_UNSUPPORTED_TRANSPORT   461
 Unsupported transport.
 
#define SMOLRTSP_STATUS_DESTINATION_UNREACHABLE   462
 Destination unreachable.
 
#define SMOLRTSP_STATUS_INTERNAL_SERVER_ERROR   500
 Internal Server Error.
 
#define SMOLRTSP_STATUS_NOT_IMPLEMENTED   501
 Not Implemented.
 
#define SMOLRTSP_STATUS_BAD_GATEWAY   502
 Bad Gateway.
 
#define SMOLRTSP_STATUS_SERVICE_UNAVAILABLE   503
 Service Unavailable.
 
#define SMOLRTSP_STATUS_GATEWAY_TIMEOUT   504
 Gateway Time-out.
 
#define SMOLRTSP_STATUS_RTSP_VERSION_NOT_SUPPORTED   505
 RTSP Version not supported.
 
#define SMOLRTSP_STATUS_OPTION_NOT_SUPPORTED   551
 Option not supported.
 

Typedefs

typedef uint16_t SmolRTSP_StatusCode
 An RTSP status code.
 

Functions

ssize_t SmolRTSP_StatusCode_serialize (const SmolRTSP_StatusCode *restrict self, SmolRTSP_Writer w) SMOLRTSP_PRIV_MUST_USE
 Serialises self into w. More...
 
SmolRTSP_ParseResult SmolRTSP_StatusCode_parse (SmolRTSP_StatusCode *restrict self, CharSlice99 input) SMOLRTSP_PRIV_MUST_USE
 Parses data to self.
 
bool SmolRTSP_StatusCode_eq (const SmolRTSP_StatusCode *restrict lhs, const SmolRTSP_StatusCode *restrict rhs) SMOLRTSP_PRIV_MUST_USE
 Tests lhs and rhs for equality. More...
 

Detailed Description

An RTSP status code.

Function Documentation

◆ SmolRTSP_StatusCode_eq()

bool SmolRTSP_StatusCode_eq ( const SmolRTSP_StatusCode *restrict  lhs,
const SmolRTSP_StatusCode *restrict  rhs 
)

Tests lhs and rhs for equality.

Precondition
lhs != NULL
rhs != NULL

◆ SmolRTSP_StatusCode_serialize()

ssize_t SmolRTSP_StatusCode_serialize ( const SmolRTSP_StatusCode *restrict  self,
SmolRTSP_Writer  w 
)

Serialises self into w.

Parameters
[in]selfThe instance to be serialised.
[in]wThe writer to be provided with serialised data.
Returns
The number of bytes written or a negative value on error.
Precondition
self != NULL
w.self && w.vptr