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

An RTSP response. More...

#include <compy/priv/compiler_attrs.h>
#include <compy/types/error.h>
#include <compy/types/header_map.h>
#include <compy/types/message_body.h>
#include <compy/types/response_line.h>
#include <stdbool.h>
#include <slice99.h>
Include dependency graph for response.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  Compy_Response
 An RTSP response. More...
 

Functions

Compy_Response Compy_Response_uninit (void) COMPY_PRIV_MUST_USE
 Returns an RTSP response suitable for being parsed.
 
ssize_t Compy_Response_serialize (const Compy_Response *restrict self, Compy_Writer w) COMPY_PRIV_MUST_USE
 Serialises self into w.
 
Compy_ParseResult Compy_Response_parse (Compy_Response *restrict self, CharSlice99 input) COMPY_PRIV_MUST_USE
 Parses data to self.
 
bool Compy_Response_eq (const Compy_Response *restrict lhs, const Compy_Response *restrict rhs) COMPY_PRIV_MUST_USE
 Tests lhs and rhs for equality.
 

Detailed Description

An RTSP response.

Function Documentation

◆ Compy_Response_eq()

bool Compy_Response_eq ( const Compy_Response *restrict  lhs,
const Compy_Response *restrict  rhs 
)

Tests lhs and rhs for equality.

Precondition
lhs != NULL
rhs != NULL

◆ Compy_Response_parse()

Compy_ParseResult Compy_Response_parse ( Compy_Response *restrict  self,
CharSlice99  input 
)

Parses data to self.

Precondition
self != NULL

◆ Compy_Response_serialize()

ssize_t Compy_Response_serialize ( const Compy_Response *restrict  self,
Compy_Writer  w 
)

Serialises self into w.

If CSeq and Content-Length are not present in Compy_Response.header_map, they will be taken from Compy_Response.cseq and Compy_Response.body, respectively, and serialised as first headers automatically.

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