Compy 0.2.0
A lightweight RTSP 1.0 server library for embedded systems
Loading...
Searching...
No Matches
status_code.h File Reference

An RTSP status code. More...

#include <compy/priv/compiler_attrs.h>
#include <compy/types/error.h>
#include <compy/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 COMPY_STATUS_CONTINUE   100
 Continue.
 
#define COMPY_STATUS_OK   200
 OK.
 
#define COMPY_STATUS_CREATED   201
 Created.
 
#define COMPY_STATUS_LOW_ON_STORAGE_SPACE   250
 Low on Storage Space.
 
#define COMPY_STATUS_MULTIPLE_CHOICES   300
 Multiple Choices.
 
#define COMPY_STATUS_MOVED_PERMANENTLY   301
 Moved Permanently.
 
#define COMPY_STATUS_MOVED_TEMPORARILY   302
 Moved Temporarily.
 
#define COMPY_STATUS_SEE_OTHER   303
 See Other.
 
#define COMPY_STATUS_NOT_MODIFIED   304
 Not Modified.
 
#define COMPY_STATUS_USE_PROXY   305
 Use Proxy.
 
#define COMPY_STATUS_BAD_REQUEST   400
 Bad Request.
 
#define COMPY_STATUS_UNAUTHORIZED   401
 Unauthorized.
 
#define COMPY_STATUS_PAYMENT_REQUIRED   402
 Payment Required.
 
#define COMPY_STATUS_FORBIDDEN   403
 Forbidden.
 
#define COMPY_STATUS_NOT_FOUND   404
 Not Found.
 
#define COMPY_STATUS_METHOD_NOT_ALLOWED   405
 Method Not Allowed.
 
#define COMPY_STATUS_NOT_ACCEPTABLE   406
 Not Acceptable.
 
#define COMPY_STATUS_PROXY_AUTHENTICATION_REQUIRED   407
 Proxy Authentication Required.
 
#define COMPY_STATUS_REQUEST_TIMEOUT   408
 Request Time-out.
 
#define COMPY_STATUS_GONE   410
 Gone.
 
#define COMPY_STATUS_LENGTH_REQUIRED   411
 Length Required.
 
#define COMPY_STATUS_PRECONDITION_FAILED   412
 Precondition Failed.
 
#define COMPY_STATUS_REQUEST_ENTITY_TOO_LARGE   413
 Request Entity Too Large.
 
#define COMPY_STATUS_REQUEST_URI_TOO_LARGE   414
 Request-URI Too Large.
 
#define COMPY_STATUS_UNSUPPORTED_MEDIA_TYPE   415
 Unsupported Media Type.
 
#define COMPY_STATUS_PARAMETER_NOT_UNDERSTOOD   451
 Parameter Not Understood.
 
#define COMPY_STATUS_CONFERENCE_NOT_FOUND   452
 Conference Not Found.
 
#define COMPY_STATUS_NOT_ENOUGH_BANDWIDTH   453
 Not Enough Bandwidth.
 
#define COMPY_STATUS_SESSION_NOT_FOUND   454
 Session Not Found.
 
#define COMPY_STATUS_METHOD_NOT_VALID_IN_THIS_STATE   455
 Method Not Valid in This State.
 
#define COMPY_STATUS_HEADER_FIELD_NOT_VALID_FOR_RESOURCE   456
 Header Field Not Valid for Resource.
 
#define COMPY_STATUS_INVALID_RANGE   457
 Invalid Range.
 
#define COMPY_STATUS_PARAMETER_IS_READ_ONLY   458
 Parameter Is Read-Only.
 
#define COMPY_STATUS_AGGREGATE_OPERATION_NOT_ALLOWED   459
 Aggregate operation not allowed.
 
#define COMPY_STATUS_ONLY_AGGREGATE_OPERATION_ALLOWED   460
 Only aggregate operation allowed.
 
#define COMPY_STATUS_UNSUPPORTED_TRANSPORT   461
 Unsupported transport.
 
#define COMPY_STATUS_DESTINATION_UNREACHABLE   462
 Destination unreachable.
 
#define COMPY_STATUS_INTERNAL_SERVER_ERROR   500
 Internal Server Error.
 
#define COMPY_STATUS_NOT_IMPLEMENTED   501
 Not Implemented.
 
#define COMPY_STATUS_BAD_GATEWAY   502
 Bad Gateway.
 
#define COMPY_STATUS_SERVICE_UNAVAILABLE   503
 Service Unavailable.
 
#define COMPY_STATUS_GATEWAY_TIMEOUT   504
 Gateway Time-out.
 
#define COMPY_STATUS_RTSP_VERSION_NOT_SUPPORTED   505
 RTSP Version not supported.
 
#define COMPY_STATUS_OPTION_NOT_SUPPORTED   551
 Option not supported.
 

Typedefs

typedef uint16_t Compy_StatusCode
 An RTSP status code.
 

Functions

ssize_t Compy_StatusCode_serialize (const Compy_StatusCode *restrict self, Compy_Writer w) COMPY_PRIV_MUST_USE
 Serialises self into w.
 
Compy_ParseResult Compy_StatusCode_parse (Compy_StatusCode *restrict self, CharSlice99 input) COMPY_PRIV_MUST_USE
 Parses data to self.
 
bool Compy_StatusCode_eq (const Compy_StatusCode *restrict lhs, const Compy_StatusCode *restrict rhs) COMPY_PRIV_MUST_USE
 Tests lhs and rhs for equality.
 

Detailed Description

An RTSP status code.

Function Documentation

◆ Compy_StatusCode_eq()

bool Compy_StatusCode_eq ( const Compy_StatusCode *restrict  lhs,
const Compy_StatusCode *restrict  rhs 
)

Tests lhs and rhs for equality.

Precondition
lhs != NULL
rhs != NULL

◆ Compy_StatusCode_serialize()

ssize_t Compy_StatusCode_serialize ( const Compy_StatusCode *restrict  self,
Compy_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