SmolRTSP 0.1.3
A small, portable, extensible RTSP 1.0 implementation in C99
Loading...
Searching...
No Matches
controller.h
Go to the documentation of this file.
1
6#pragma once
7
8#include <smolrtsp/context.h>
11#include <smolrtsp/writer.h>
12
13#include <stddef.h>
14
15#include <interface99.h>
16
31
39#define SmolRTSP_Controller_IFACE \
40 \
41 /* \
42 * Handles `OPTIONS` as defined in \
43 * <https://datatracker.ietf.org/doc/html/rfc2326#section-10.1>. \
44 */ \
45 vfunc99( \
46 void, options, VSelf99, SmolRTSP_Context *ctx, \
47 const SmolRTSP_Request *req) \
48 \
49 /* \
50 * Handles `OPTIONS` as defined in \
51 * <https://datatracker.ietf.org/doc/html/rfc2326#section-10.2>. \
52 */ \
53 vfunc99( \
54 void, describe, VSelf99, SmolRTSP_Context *ctx, \
55 const SmolRTSP_Request *req) \
56 \
57 /* \
58 * Handles `OPTIONS` as defined in \
59 * <https://datatracker.ietf.org/doc/html/rfc2326#section-10.4>. \
60 */ \
61 vfunc99( \
62 void, setup, VSelf99, SmolRTSP_Context *ctx, \
63 const SmolRTSP_Request *req) \
64 \
65 /* \
66 * Handles `OPTIONS` as defined in \
67 * <https://datatracker.ietf.org/doc/html/rfc2326#section-10.5>. \
68 */ \
69 vfunc99( \
70 void, play, VSelf99, SmolRTSP_Context *ctx, \
71 const SmolRTSP_Request *req) \
72 \
73 /* \
74 * Handles `OPTIONS` as defined in \
75 * <https://datatracker.ietf.org/doc/html/rfc2326#section-10.7>. \
76 */ \
77 vfunc99( \
78 void, teardown, VSelf99, SmolRTSP_Context *ctx, \
79 const SmolRTSP_Request *req) \
80 \
81 /* \
82 * Handles a command that is neither of the above. \
83 */ \
84 vfunc99( \
85 void, unknown, VSelf99, SmolRTSP_Context *ctx, \
86 const SmolRTSP_Request *req) \
87 \
88 /* \
89 * A method that is invoked _before_ the actual request handling. \
90 */ \
91 vfunc99( \
92 SmolRTSP_ControlFlow, before, VSelf99, SmolRTSP_Context *ctx, \
93 const SmolRTSP_Request *req) \
94 \
95 /* \
96 * A method that is invoked _after_ request handling. \
97 */ \
98 vfunc99( \
99 void, after, VSelf99, ssize_t ret, SmolRTSP_Context *ctx, \
100 const SmolRTSP_Request *req)
101
105#define SmolRTSP_Controller_EXTENDS (SmolRTSP_Droppable)
106
113interface99(SmolRTSP_Controller);
114
144 SmolRTSP_Writer conn, SmolRTSP_Controller controller,
145 const SmolRTSP_Request *restrict req);
A request context.
SmolRTSP_ControlFlow
Whether to stop or continue some processing.
Definition controller.h:20
@ SmolRTSP_ControlFlow_Continue
Continue processing.
Definition controller.h:29
@ SmolRTSP_ControlFlow_Break
Break processing.
Definition controller.h:24
interface99(SmolRTSP_Controller)
Defines the SmolRTSP_Controller interface.
void smolrtsp_dispatch(SmolRTSP_Writer conn, SmolRTSP_Controller controller, const SmolRTSP_Request *restrict req)
Dispatches an incoming request to controller.
Droppable types support.
An RTSP request.
An RTSP request.
Definition request.h:21
The writer interface.