| Uri.h | | Uri.h | |
| | | | |
| skipping to change at line 88 | | skipping to change at line 88 | |
| | | | |
| /** | | /** | |
| * Specifies a range of characters within a string. | | * Specifies a range of characters within a string. | |
| * The range includes all characters from <code>first</code> | | * The range includes all characters from <code>first</code> | |
| * to one before <code>afterLast</code>. So if both are | | * to one before <code>afterLast</code>. So if both are | |
| * non-NULL the difference is the length of the text range. | | * non-NULL the difference is the length of the text range. | |
| */ | | */ | |
| typedef struct URI_TYPE(TextRangeStruct) { | | typedef struct URI_TYPE(TextRangeStruct) { | |
| const URI_CHAR * first; /**< Pointer to first character */ | | const URI_CHAR * first; /**< Pointer to first character */ | |
| const URI_CHAR * afterLast; /**< Pointer to character after the last
one still in */ | | const URI_CHAR * afterLast; /**< Pointer to character after the last
one still in */ | |
|
| } URI_TYPE(TextRange); | | } URI_TYPE(TextRange); /**< @copydoc UriTextRangeStructA */ | |
| | | | |
| /** | | /** | |
| * Represents a segment within a %URI path. | | * Represents a segment within a %URI path. | |
| * More precisely it is a node in a linked | | * More precisely it is a node in a linked | |
| * list of path segments. | | * list of path segments. | |
| */ | | */ | |
| typedef struct URI_TYPE(PathSegmentStruct) { | | typedef struct URI_TYPE(PathSegmentStruct) { | |
| URI_TYPE(TextRange) text; /**< Path segment name */ | | URI_TYPE(TextRange) text; /**< Path segment name */ | |
| struct URI_TYPE(PathSegmentStruct) * next; /**< Pointer to the next
path segment in the list, can be NULL if last already */ | | struct URI_TYPE(PathSegmentStruct) * next; /**< Pointer to the next
path segment in the list, can be NULL if last already */ | |
| | | | |
| void * reserved; /**< Reserved to the parser */ | | void * reserved; /**< Reserved to the parser */ | |
|
| } URI_TYPE(PathSegment); | | } URI_TYPE(PathSegment); /**< @copydoc UriPathSegmentStructA */ | |
| | | | |
| /** | | /** | |
| * Holds structured host information. | | * Holds structured host information. | |
| * This is either a IPv4, IPv6, plain | | * This is either a IPv4, IPv6, plain | |
| * text for IPvFuture or all zero for | | * text for IPvFuture or all zero for | |
| * a registered name. | | * a registered name. | |
| */ | | */ | |
| typedef struct URI_TYPE(HostDataStruct) { | | typedef struct URI_TYPE(HostDataStruct) { | |
| UriIp4 * ip4; /**< IPv4 address */ | | UriIp4 * ip4; /**< IPv4 address */ | |
| UriIp6 * ip6; /**< IPv6 address */ | | UriIp6 * ip6; /**< IPv6 address */ | |
| URI_TYPE(TextRange) ipFuture; /**< IPvFuture address */ | | URI_TYPE(TextRange) ipFuture; /**< IPvFuture address */ | |
|
| } URI_TYPE(HostData); | | } URI_TYPE(HostData); /**< @copydoc UriHostDataStructA */ | |
| | | | |
| /** | | /** | |
| * Represents an RFC 3986 %URI. | | * Represents an RFC 3986 %URI. | |
| * Missing components can be {NULL, NULL} ranges. | | * Missing components can be {NULL, NULL} ranges. | |
| */ | | */ | |
| typedef struct URI_TYPE(UriStruct) { | | typedef struct URI_TYPE(UriStruct) { | |
| URI_TYPE(TextRange) scheme; /**< Scheme (e.g. "http") */ | | URI_TYPE(TextRange) scheme; /**< Scheme (e.g. "http") */ | |
| URI_TYPE(TextRange) userInfo; /**< User info (e.g. "user:pass") */ | | URI_TYPE(TextRange) userInfo; /**< User info (e.g. "user:pass") */ | |
| URI_TYPE(TextRange) hostText; /**< Host text (set for all hosts, exc
luding square brackets) */ | | URI_TYPE(TextRange) hostText; /**< Host text (set for all hosts, exc
luding square brackets) */ | |
| URI_TYPE(HostData) hostData; /**< Structured host type specific data
*/ | | URI_TYPE(HostData) hostData; /**< Structured host type specific data
*/ | |
| URI_TYPE(TextRange) portText; /**< Port (e.g. "80") */ | | URI_TYPE(TextRange) portText; /**< Port (e.g. "80") */ | |
| URI_TYPE(PathSegment) * pathHead; /**< Head of a linked list of path
segments */ | | URI_TYPE(PathSegment) * pathHead; /**< Head of a linked list of path
segments */ | |
| URI_TYPE(PathSegment) * pathTail; /**< Tail of the list behind pathH
ead */ | | URI_TYPE(PathSegment) * pathTail; /**< Tail of the list behind pathH
ead */ | |
| URI_TYPE(TextRange) query; /**< Query without leading "?" */ | | URI_TYPE(TextRange) query; /**< Query without leading "?" */ | |
| URI_TYPE(TextRange) fragment; /**< Query without leading "#" */ | | URI_TYPE(TextRange) fragment; /**< Query without leading "#" */ | |
| UriBool absolutePath; /**< Absolute path flag, meaningless if %URI i
s absolute */ | | UriBool absolutePath; /**< Absolute path flag, meaningless if %URI i
s absolute */ | |
| UriBool owner; /**< Memory owner flag */ | | UriBool owner; /**< Memory owner flag */ | |
| | | | |
| void * reserved; /**< Reserved to the parser */ | | void * reserved; /**< Reserved to the parser */ | |
|
| } URI_TYPE(Uri); | | } URI_TYPE(Uri); /**< @copydoc UriUriStructA */ | |
| | | | |
| /** | | /** | |
| * Represents a state of the %URI parser. | | * Represents a state of the %URI parser. | |
| * Missing components can be NULL to reflect | | * Missing components can be NULL to reflect | |
| * a components absence. | | * a components absence. | |
| */ | | */ | |
| typedef struct URI_TYPE(ParserStateStruct) { | | typedef struct URI_TYPE(ParserStateStruct) { | |
| URI_TYPE(Uri) * uri; /**< Plug in the %URI structure to be filled wh
ile parsing here */ | | URI_TYPE(Uri) * uri; /**< Plug in the %URI structure to be filled wh
ile parsing here */ | |
| int errorCode; /**< Code identifying the occured error */ | | int errorCode; /**< Code identifying the occured error */ | |
| const URI_CHAR * errorPos; /**< Pointer to position in case of a syn
tax error */ | | const URI_CHAR * errorPos; /**< Pointer to position in case of a syn
tax error */ | |
| | | | |
| void * reserved; /**< Reserved to the parser */ | | void * reserved; /**< Reserved to the parser */ | |
|
| } URI_TYPE(ParserState); | | } URI_TYPE(ParserState); /**< @copydoc UriParserStateStructA */ | |
| | | | |
| /** | | /** | |
| * Parses a RFC 3986 URI. | | * Parses a RFC 3986 URI. | |
| * | | * | |
| * @param state Parser state with set output %URI, must not be NULL | | * @param state Parser state with set output %URI, must not be NULL | |
| * @param first Pointer to the first character to parse, must not be
NULL | | * @param first Pointer to the first character to parse, must not be
NULL | |
| * @param afterLast Pointer to the character after the last to parse, mus
t not be NULL | | * @param afterLast Pointer to the character after the last to parse, mus
t not be NULL | |
| * @return 0 on success, error code otherwise | | * @return 0 on success, error code otherwise | |
| */ | | */ | |
| int URI_FUNC(ParseUriEx)(URI_TYPE(ParserState) * state, | | int URI_FUNC(ParseUriEx)(URI_TYPE(ParserState) * state, | |
| | | | |
End of changes. 5 change blocks. |
| 5 lines changed or deleted | | 5 lines changed or added | |
|