9 #include <smolrtsp/priv/compiler_attrs.h>
17 #include <interface99.h>
77 va_list list) SMOLRTSP_PRIV_GCC_ATTR(format(printf, 3, 0));
84 SMOLRTSP_PRIV_GCC_ATTR(format(printf, 3, 4));
void void smolrtsp_header(SmolRTSP_Context *ctx, CharSlice99 key, const char *restrict fmt,...) SMOLRTSP_PRIV_GCC_ATTR(format(printf
The smolrtsp_vheader twin.
ssize_t SmolRTSP_Context_get_ret(const SmolRTSP_Context *ctx) SMOLRTSP_PRIV_MUST_USE
Retrieves the RTSP respond return value.
ssize_t smolrtsp_respond_internal_error(SmolRTSP_Context *ctx)
A shortcut for smolrtsp_respond(ctx, SMOLRTSP_STATUS_INTERNAL_SERVER_ERROR, "Internal error").
void smolrtsp_vheader(SmolRTSP_Context *ctx, CharSlice99 key, const char *restrict fmt, va_list list) SMOLRTSP_PRIV_GCC_ATTR(format(printf
Appends an RTSP header to the request context.
void void void smolrtsp_body(SmolRTSP_Context *ctx, SmolRTSP_MessageBody body)
Sets an RTSP body in the request context.
struct SmolRTSP_Context SmolRTSP_Context
An opaque type used to conveniently respond to RTSP clients.
Definition: context.h:23
SmolRTSP_Context * SmolRTSP_Context_new(SmolRTSP_Writer w, uint32_t cseq) SMOLRTSP_PRIV_MUST_USE
Creates a new SmolRTSP context.
uint32_t SmolRTSP_Context_get_cseq(const SmolRTSP_Context *ctx) SMOLRTSP_PRIV_MUST_USE
Retrieves cseq specified in SmolRTSP_Context_new.
SmolRTSP_Writer SmolRTSP_Context_get_writer(const SmolRTSP_Context *ctx) SMOLRTSP_PRIV_MUST_USE
Retrieves the writer specified in SmolRTSP_Context_new.
declImplExtern99(SmolRTSP_Droppable, SmolRTSP_Context)
Implements SmolRTSP_Droppable_IFACE for SmolRTSP_Context.
ssize_t smolrtsp_respond(SmolRTSP_Context *ctx, SmolRTSP_StatusCode code, const char *reason)
Writes an RTSP response to the underlying writer.
ssize_t smolrtsp_respond_ok(SmolRTSP_Context *ctx)
A shortcut for smolrtsp_respond(ctx, SMOLRTSP_STATUS_OK, "OK").
CharSlice99 SmolRTSP_MessageBody
An RTSP message body.
Definition: message_body.h:19
uint16_t SmolRTSP_StatusCode
An RTSP status code.
Definition: status_code.h:20