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

An RTSP header. More...

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

Go to the source code of this file.

Data Structures

struct  Compy_Header
 An RTSP header. More...
 

Macros

#define COMPY_HEADER_ACCEPT   (CharSlice99_from_str("Accept"))
 Accept.
 
#define COMPY_HEADER_ACCEPT_ENCODING   (CharSlice99_from_str("Accept-Encoding"))
 Accept-Encoding.
 
#define COMPY_HEADER_ACCEPT_LANGUAGE   (CharSlice99_from_str("Accept-Language"))
 Accept-Language.
 
#define COMPY_HEADER_ALLOW   (CharSlice99_from_str("Allow"))
 Allow.
 
#define COMPY_HEADER_AUTHORIZATION   (CharSlice99_from_str("Authorization"))
 Authorization.
 
#define COMPY_HEADER_BANDWIDTH   (CharSlice99_from_str("Bandwidth"))
 Bandwidth.
 
#define COMPY_HEADER_BLOCKSIZE   (CharSlice99_from_str("Blocksize"))
 Blocksize.
 
#define COMPY_HEADER_CACHE_CONTROL   (CharSlice99_from_str("Cache-Control"))
 Cache-Control.
 
#define COMPY_HEADER_CONFERENCE   (CharSlice99_from_str("Conference"))
 Conference.
 
#define COMPY_HEADER_CONNECTION   (CharSlice99_from_str("Connection"))
 Connection.
 
#define COMPY_HEADER_CONTENT_BASE   (CharSlice99_from_str("Content-Base"))
 Content-Base.
 
#define COMPY_HEADER_CONTENT_ENCODING   (CharSlice99_from_str("Content-Encoding"))
 Content-Encoding.
 
#define COMPY_HEADER_CONTENT_LANGUAGE   (CharSlice99_from_str("Content-Language"))
 Content-Language.
 
#define COMPY_HEADER_CONTENT_LENGTH   (CharSlice99_from_str("Content-Length"))
 Content-Length.
 
#define COMPY_HEADER_CONTENT_LOCATION   (CharSlice99_from_str("Content-Location"))
 Content-Location".
 
#define COMPY_HEADER_CONTENT_TYPE   (CharSlice99_from_str("Content-Type"))
 Content-Type.
 
#define COMPY_HEADER_C_SEQ   (CharSlice99_from_str("CSeq"))
 CSeq.
 
#define COMPY_HEADER_DATE   (CharSlice99_from_str("Date"))
 Date.
 
#define COMPY_HEADER_EXPIRES   (CharSlice99_from_str("Expires"))
 Expires.
 
#define COMPY_HEADER_FROM   (CharSlice99_from_str("From"))
 From.
 
#define COMPY_HEADER_IF_MODIFIED_SINCE    (CharSlice99_from_str("If-Modified-Since"))
 If-Modified-Since.
 
#define COMPY_HEADER_LAST_MODIFIED   (CharSlice99_from_str("Last-Modified"))
 "Last-Modified.
 
#define COMPY_HEADER_PROXY_AUTHENTICATE    (CharSlice99_from_str("Proxy-Authenticate"))
 Proxy-Authenticate.
 
#define COMPY_HEADER_PROXY_REQUIRE   (CharSlice99_from_str("Proxy-Require"))
 Proxy-Require.
 
#define COMPY_HEADER_PUBLIC   (CharSlice99_from_str("Public"))
 Public.
 
#define COMPY_HEADER_RANGE   (CharSlice99_from_str("Range"))
 Range.
 
#define COMPY_HEADER_REFERER   (CharSlice99_from_str("Referrer"))
 Referrer.
 
#define COMPY_HEADER_REQUIRE   (CharSlice99_from_str("Require"))
 Require.
 
#define COMPY_HEADER_RETRY_AFTER   (CharSlice99_from_str("Retry-After"))
 Retry-After.
 
#define COMPY_HEADER_RTP_INFO   (CharSlice99_from_str("RTP-Info"))
 RTP-Info.
 
#define COMPY_HEADER_SCALE   (CharSlice99_from_str("Scale"))
 Scale.
 
#define COMPY_HEADER_SESSION   (CharSlice99_from_str("Session"))
 Session.
 
#define COMPY_HEADER_SERVER   (CharSlice99_from_str("Server"))
 Server.
 
#define COMPY_HEADER_SPEED   (CharSlice99_from_str("Speed"))
 Speed.
 
#define COMPY_HEADER_TRANSPORT   (CharSlice99_from_str("Transport"))
 Transport.
 
#define COMPY_HEADER_UNSUPPORTED   (CharSlice99_from_str("Unsupported"))
 Unsupported.
 
#define COMPY_HEADER_USER_AGENT   (CharSlice99_from_str("User-Agent"))
 User-Agent.
 
#define COMPY_HEADER_VIA   (CharSlice99_from_str("Via"))
 Via.
 
#define COMPY_HEADER_WWW_AUTHENTICATE   (CharSlice99_from_str("WWW-Authenticate"))
 WWW-Authenticate.
 

Functions

ssize_t Compy_Header_serialize (const Compy_Header *restrict self, Compy_Writer w) COMPY_PRIV_MUST_USE
 Serialises self into w.
 
Compy_ParseResult Compy_Header_parse (Compy_Header *restrict self, CharSlice99 input) COMPY_PRIV_MUST_USE
 Parses data to self.
 
bool Compy_Header_eq (const Compy_Header *restrict lhs, const Compy_Header *restrict rhs) COMPY_PRIV_MUST_USE
 Tests lhs and rhs for equality.
 

Detailed Description

An RTSP header.

Function Documentation

◆ Compy_Header_eq()

bool Compy_Header_eq ( const Compy_Header *restrict  lhs,
const Compy_Header *restrict  rhs 
)

Tests lhs and rhs for equality.

Precondition
lhs != NULL
rhs != NULL

◆ Compy_Header_parse()

Compy_ParseResult Compy_Header_parse ( Compy_Header *restrict  self,
CharSlice99  input 
)

Parses data to self.

Precondition
self != NULL

◆ Compy_Header_serialize()

ssize_t Compy_Header_serialize ( const Compy_Header *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