|
SmolRTSP 0.1.3
A small, portable, extensible RTSP 1.0 implementation in C99
|
Possible parsing errors. More...
#include <smolrtsp/writer.h>#include <stdbool.h>#include <stddef.h>#include <datatype99.h>#include <slice99.h>#include <smolrtsp/priv/compiler_attrs.h>

Go to the source code of this file.
Enumerations | |
| enum | SmolRTSP_ParseType { SmolRTSP_ParseType_Int , SmolRTSP_ParseType_Ident , SmolRTSP_ParseType_HeaderName } |
| Types of data that can be failed to parse. More... | |
Functions | |
| const char * | SmolRTSP_ParseType_str (SmolRTSP_ParseType self) SMOLRTSP_PRIV_MUST_USE |
Returns a string representation of self. | |
| datatype99 (SmolRTSP_ParseError,(SmolRTSP_ParseError_ContentLength, CharSlice99),(SmolRTSP_ParseError_StrMismatch, CharSlice99, CharSlice99),(SmolRTSP_ParseError_TypeMismatch, SmolRTSP_ParseType, CharSlice99),(SmolRTSP_ParseError_HeaderMapOverflow),(SmolRTSP_ParseError_MissingCSeq),(SmolRTSP_ParseError_InvalidCSeq, CharSlice99)) | |
| An error that might occur during parsing. | |
| int | SmolRTSP_ParseError_print (SmolRTSP_ParseError self, SmolRTSP_Writer w) SMOLRTSP_PRIV_MUST_USE |
Prints self into w. | |
| datatype99 (SmolRTSP_ParseStatus,(SmolRTSP_ParseStatus_Complete, size_t),(SmolRTSP_ParseStatus_Partial)) | |
| A status of successful parsing. | |
| bool | SmolRTSP_ParseStatus_is_complete (SmolRTSP_ParseStatus self) SMOLRTSP_PRIV_MUST_USE |
Returns whether self is complete. | |
| bool | SmolRTSP_ParseStatus_is_partial (SmolRTSP_ParseStatus self) SMOLRTSP_PRIV_MUST_USE |
Returns whether self is partial. | |
| datatype99 (SmolRTSP_ParseResult,(SmolRTSP_ParseResult_Success, SmolRTSP_ParseStatus),(SmolRTSP_ParseResult_Failure, SmolRTSP_ParseError)) | |
| A result of parsing (either success or failure). | |
| SmolRTSP_ParseResult | SmolRTSP_ParseResult_partial (void) SMOLRTSP_PRIV_MUST_USE |
| Creates a successful and partial parse result. | |
| SmolRTSP_ParseResult | SmolRTSP_ParseResult_complete (size_t offset) SMOLRTSP_PRIV_MUST_USE |
Creates a successful and complete parse result with the byte offset offset (from the beginning of input). | |
| bool | SmolRTSP_ParseResult_is_success (SmolRTSP_ParseResult self) SMOLRTSP_PRIV_MUST_USE |
Returns whether self is successful. | |
| bool | SmolRTSP_ParseResult_is_failure (SmolRTSP_ParseResult self) SMOLRTSP_PRIV_MUST_USE |
Returns whether self is a failure. | |
| bool | SmolRTSP_ParseResult_is_partial (SmolRTSP_ParseResult self) SMOLRTSP_PRIV_MUST_USE |
Returns whether self is both successful and partial. | |
| bool | SmolRTSP_ParseResult_is_complete (SmolRTSP_ParseResult self) SMOLRTSP_PRIV_MUST_USE |
| The same as SmolRTSP_ParseResult_is_partial but for a complete result. | |
Possible parsing errors.
| enum SmolRTSP_ParseType |
| datatype99 | ( | SmolRTSP_ParseError | , |
| (SmolRTSP_ParseError_ContentLength, CharSlice99) | , | ||
| (SmolRTSP_ParseError_StrMismatch, CharSlice99, CharSlice99) | , | ||
| (SmolRTSP_ParseError_TypeMismatch, SmolRTSP_ParseType, CharSlice99) | , | ||
| (SmolRTSP_ParseError_HeaderMapOverflow) | , | ||
| (SmolRTSP_ParseError_MissingCSeq) | , | ||
| (SmolRTSP_ParseError_InvalidCSeq, CharSlice99) | |||
| ) |
An error that might occur during parsing.
ContentLength – An invalid value of the Content-Length header was specified. Arguments:StrMismatch – Two given strings are uneqal. Arguments:TypeMismatch – Failed to parse an item. Arguments:HeaderMapOverflow – An attempt to add a header to a full header map.MissingCSeq – Missing the CSeq header.InvalidCSeq – Failed to parse the CSeq header.See Datatype99 for the macro usage.
| datatype99 | ( | SmolRTSP_ParseResult | , |
| (SmolRTSP_ParseResult_Success, SmolRTSP_ParseStatus) | , | ||
| (SmolRTSP_ParseResult_Failure, SmolRTSP_ParseError) | |||
| ) |
A result of parsing (either success or failure).
See Datatype99 for the macro usage.
| datatype99 | ( | SmolRTSP_ParseStatus | , |
| (SmolRTSP_ParseStatus_Complete, size_t) | , | ||
| (SmolRTSP_ParseStatus_Partial) | |||
| ) |
A status of successful parsing.
Complete – The parsing has completed. Arguments:Partial – Need more data to continue parsing.See Datatype99 for the macro usage.
| int SmolRTSP_ParseError_print | ( | SmolRTSP_ParseError | self, |
| SmolRTSP_Writer | w | ||
| ) |
Prints self into w.
| [in] | self | The error to print. |
| [in] | w | The writer to be provided with data. |
w.self && w.vptr