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

An RTSP header. More...

#include <smolrtsp/priv/compiler_attrs.h>
#include <smolrtsp/types/error.h>
#include <smolrtsp/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  SmolRTSP_Header
 An RTSP header. More...
 

Macros

#define SMOLRTSP_HEADER_ACCEPT   (CharSlice99_from_str("Accept"))
 Accept.
 
#define SMOLRTSP_HEADER_ACCEPT_ENCODING    (CharSlice99_from_str("Accept-Encoding"))
 Accept-Encoding.
 
#define SMOLRTSP_HEADER_ACCEPT_LANGUAGE    (CharSlice99_from_str("Accept-Language"))
 Accept-Language.
 
#define SMOLRTSP_HEADER_ALLOW   (CharSlice99_from_str("Allow"))
 Allow.
 
#define SMOLRTSP_HEADER_AUTHORIZATION   (CharSlice99_from_str("Authorization"))
 Authorization.
 
#define SMOLRTSP_HEADER_BANDWIDTH   (CharSlice99_from_str("Bandwidth"))
 Bandwidth.
 
#define SMOLRTSP_HEADER_BLOCKSIZE   (CharSlice99_from_str("Blocksize"))
 Blocksize.
 
#define SMOLRTSP_HEADER_CACHE_CONTROL   (CharSlice99_from_str("Cache-Control"))
 Cache-Control.
 
#define SMOLRTSP_HEADER_CONFERENCE   (CharSlice99_from_str("Conference"))
 Conference.
 
#define SMOLRTSP_HEADER_CONNECTION   (CharSlice99_from_str("Connection"))
 Connection.
 
#define SMOLRTSP_HEADER_CONTENT_BASE   (CharSlice99_from_str("Content-Base"))
 Content-Base.
 
#define SMOLRTSP_HEADER_CONTENT_ENCODING    (CharSlice99_from_str("Content-Encoding"))
 Content-Encoding.
 
#define SMOLRTSP_HEADER_CONTENT_LANGUAGE    (CharSlice99_from_str("Content-Language"))
 Content-Language.
 
#define SMOLRTSP_HEADER_CONTENT_LENGTH   (CharSlice99_from_str("Content-Length"))
 Content-Length.
 
#define SMOLRTSP_HEADER_CONTENT_LOCATION    (CharSlice99_from_str("Content-Location"))
 Content-Location".
 
#define SMOLRTSP_HEADER_CONTENT_TYPE   (CharSlice99_from_str("Content-Type"))
 Content-Type.
 
#define SMOLRTSP_HEADER_C_SEQ   (CharSlice99_from_str("CSeq"))
 CSeq.
 
#define SMOLRTSP_HEADER_DATE   (CharSlice99_from_str("Date"))
 Date.
 
#define SMOLRTSP_HEADER_EXPIRES   (CharSlice99_from_str("Expires"))
 Expires.
 
#define SMOLRTSP_HEADER_FROM   (CharSlice99_from_str("From"))
 From.
 
#define SMOLRTSP_HEADER_IF_MODIFIED_SINCE    (CharSlice99_from_str("If-Modified-Since"))
 If-Modified-Since.
 
#define SMOLRTSP_HEADER_LAST_MODIFIED   (CharSlice99_from_str("Last-Modified"))
 "Last-Modified.
 
#define SMOLRTSP_HEADER_PROXY_AUTHENTICATE    (CharSlice99_from_str("Proxy-Authenticate"))
 Proxy-Authenticate.
 
#define SMOLRTSP_HEADER_PROXY_REQUIRE   (CharSlice99_from_str("Proxy-Require"))
 Proxy-Require.
 
#define SMOLRTSP_HEADER_PUBLIC   (CharSlice99_from_str("Public"))
 Public.
 
#define SMOLRTSP_HEADER_RANGE   (CharSlice99_from_str("Range"))
 Range.
 
#define SMOLRTSP_HEADER_REFERER   (CharSlice99_from_str("Referrer"))
 Referrer.
 
#define SMOLRTSP_HEADER_REQUIRE   (CharSlice99_from_str("Require"))
 Require.
 
#define SMOLRTSP_HEADER_RETRY_AFTER   (CharSlice99_from_str("Retry-After"))
 Retry-After.
 
#define SMOLRTSP_HEADER_RTP_INFO   (CharSlice99_from_str("RTP-Info"))
 RTP-Info.
 
#define SMOLRTSP_HEADER_SCALE   (CharSlice99_from_str("Scale"))
 Scale.
 
#define SMOLRTSP_HEADER_SESSION   (CharSlice99_from_str("Session"))
 Session.
 
#define SMOLRTSP_HEADER_SERVER   (CharSlice99_from_str("Server"))
 Server.
 
#define SMOLRTSP_HEADER_SPEED   (CharSlice99_from_str("Speed"))
 Speed.
 
#define SMOLRTSP_HEADER_TRANSPORT   (CharSlice99_from_str("Transport"))
 Transport.
 
#define SMOLRTSP_HEADER_UNSUPPORTED   (CharSlice99_from_str("Unsupported"))
 Unsupported.
 
#define SMOLRTSP_HEADER_USER_AGENT   (CharSlice99_from_str("User-Agent"))
 User-Agent.
 
#define SMOLRTSP_HEADER_VIA   (CharSlice99_from_str("Via"))
 Via.
 
#define SMOLRTSP_HEADER_WWW_AUTHENTICATE    (CharSlice99_from_str("WWW-Authenticate"))
 WWW-Authenticate.
 

Functions

ssize_t SmolRTSP_Header_serialize (const SmolRTSP_Header *restrict self, SmolRTSP_Writer w) SMOLRTSP_PRIV_MUST_USE
 Serialises self into w. More...
 
SmolRTSP_ParseResult SmolRTSP_Header_parse (SmolRTSP_Header *restrict self, CharSlice99 input) SMOLRTSP_PRIV_MUST_USE
 Parses data to self. More...
 
bool SmolRTSP_Header_eq (const SmolRTSP_Header *restrict lhs, const SmolRTSP_Header *restrict rhs) SMOLRTSP_PRIV_MUST_USE
 Tests lhs and rhs for equality. More...
 

Detailed Description

An RTSP header.

Function Documentation

◆ SmolRTSP_Header_eq()

bool SmolRTSP_Header_eq ( const SmolRTSP_Header *restrict  lhs,
const SmolRTSP_Header *restrict  rhs 
)

Tests lhs and rhs for equality.

Precondition
lhs != NULL
rhs != NULL

◆ SmolRTSP_Header_parse()

SmolRTSP_ParseResult SmolRTSP_Header_parse ( SmolRTSP_Header *restrict  self,
CharSlice99  input 
)

Parses data to self.

Precondition
self != NULL

◆ SmolRTSP_Header_serialize()

ssize_t SmolRTSP_Header_serialize ( const SmolRTSP_Header *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