|
Compy 0.2.0
A lightweight RTSP 1.0 server library for embedded systems
|
Possible parsing errors. More...
#include <compy/writer.h>#include <stdbool.h>#include <stddef.h>#include <datatype99.h>#include <slice99.h>#include <compy/priv/compiler_attrs.h>

Go to the source code of this file.
Enumerations | |
| enum | Compy_ParseType { Compy_ParseType_Int , Compy_ParseType_Ident , Compy_ParseType_HeaderName } |
| Types of data that can be failed to parse. More... | |
Functions | |
| const char * | Compy_ParseType_str (Compy_ParseType self) COMPY_PRIV_MUST_USE |
Returns a string representation of self. | |
| datatype99 (Compy_ParseError,(Compy_ParseError_ContentLength, CharSlice99),(Compy_ParseError_StrMismatch, CharSlice99, CharSlice99),(Compy_ParseError_TypeMismatch, Compy_ParseType, CharSlice99),(Compy_ParseError_HeaderMapOverflow),(Compy_ParseError_MissingCSeq),(Compy_ParseError_InvalidCSeq, CharSlice99)) | |
| An error that might occur during parsing. | |
| int | Compy_ParseError_print (Compy_ParseError self, Compy_Writer w) COMPY_PRIV_MUST_USE |
Prints self into w. | |
| datatype99 (Compy_ParseStatus,(Compy_ParseStatus_Complete, size_t),(Compy_ParseStatus_Partial)) | |
| A status of successful parsing. | |
| bool | Compy_ParseStatus_is_complete (Compy_ParseStatus self) COMPY_PRIV_MUST_USE |
Returns whether self is complete. | |
| bool | Compy_ParseStatus_is_partial (Compy_ParseStatus self) COMPY_PRIV_MUST_USE |
Returns whether self is partial. | |
| datatype99 (Compy_ParseResult,(Compy_ParseResult_Success, Compy_ParseStatus),(Compy_ParseResult_Failure, Compy_ParseError)) | |
| A result of parsing (either success or failure). | |
| Compy_ParseResult | Compy_ParseResult_partial (void) COMPY_PRIV_MUST_USE |
| Creates a successful and partial parse result. | |
| Compy_ParseResult | Compy_ParseResult_complete (size_t offset) COMPY_PRIV_MUST_USE |
Creates a successful and complete parse result with the byte offset offset (from the beginning of input). | |
| bool | Compy_ParseResult_is_success (Compy_ParseResult self) COMPY_PRIV_MUST_USE |
Returns whether self is successful. | |
| bool | Compy_ParseResult_is_failure (Compy_ParseResult self) COMPY_PRIV_MUST_USE |
Returns whether self is a failure. | |
| bool | Compy_ParseResult_is_partial (Compy_ParseResult self) COMPY_PRIV_MUST_USE |
Returns whether self is both successful and partial. | |
| bool | Compy_ParseResult_is_complete (Compy_ParseResult self) COMPY_PRIV_MUST_USE |
| The same as Compy_ParseResult_is_partial but for a complete result. | |
Possible parsing errors.
| enum Compy_ParseType |
| int Compy_ParseError_print | ( | Compy_ParseError | self, |
| Compy_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 | datatype99 | ( | Compy_ParseError | , |
| (Compy_ParseError_ContentLength, CharSlice99) | , | ||
| (Compy_ParseError_StrMismatch, CharSlice99, CharSlice99) | , | ||
| (Compy_ParseError_TypeMismatch, Compy_ParseType, CharSlice99) | , | ||
| (Compy_ParseError_HeaderMapOverflow) | , | ||
| (Compy_ParseError_MissingCSeq) | , | ||
| (Compy_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 | ( | Compy_ParseResult | , |
| (Compy_ParseResult_Success, Compy_ParseStatus) | , | ||
| (Compy_ParseResult_Failure, Compy_ParseError) | |||
| ) |
A result of parsing (either success or failure).
See Datatype99 for the macro usage.
| datatype99 | ( | Compy_ParseStatus | , |
| (Compy_ParseStatus_Complete, size_t) | , | ||
| (Compy_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.