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

An RTSP request. 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/request_line.h>
#include <stdbool.h>
#include <slice99.h>
Include dependency graph for request.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  Compy_Request
 An RTSP request. More...
 

Functions

Compy_Request Compy_Request_uninit (void) COMPY_PRIV_MUST_USE
 Returns an RTSP request suitable for being parsed.
 
ssize_t Compy_Request_serialize (const Compy_Request *restrict self, Compy_Writer w) COMPY_PRIV_MUST_USE
 Serialises self into w.
 
Compy_ParseResult Compy_Request_parse (Compy_Request *restrict self, CharSlice99 input) COMPY_PRIV_MUST_USE
 Parses data to self.
 
bool Compy_Request_eq (const Compy_Request *restrict lhs, const Compy_Request *restrict rhs) COMPY_PRIV_MUST_USE
 Tests lhs and rhs for equality.
 

Detailed Description

An RTSP request.

Function Documentation

◆ Compy_Request_eq()

bool Compy_Request_eq ( const Compy_Request *restrict  lhs,
const Compy_Request *restrict  rhs 
)

Tests lhs and rhs for equality.

Precondition
lhs != NULL
rhs != NULL

◆ Compy_Request_parse()

Compy_ParseResult Compy_Request_parse ( Compy_Request *restrict  self,
CharSlice99  input 
)

Parses data to self.

Precondition
self != NULL

◆ Compy_Request_serialize()

ssize_t Compy_Request_serialize ( const Compy_Request *restrict  self,
Compy_Writer  w 
)

Serialises self into w.

If CSeq and Content-Length are not present in Compy_Request.header_map, they will be taken from Compy_Request.cseq and Compy_Request.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