Pharos
0.7.23
Modern Web Framework & Web App Hosting Service.
Toggle main menu visibility
Loading...
Searching...
No Matches
native_dispatch_table.h
Go to the documentation of this file.
1
/**
2
* @file
3
* @brief Declares dispatch-table request path helpers.
4
*/
5
6
#ifndef PHAROS_NATIVE_DISPATCH_TABLE_H
7
#define PHAROS_NATIVE_DISPATCH_TABLE_H
8
9
/** @name Dispatch table helpers
10
* @{
11
*/
12
/**
13
* @brief Tests whether a request path matches one dispatch-table route pattern.
14
* @param pattern Dispatch-table route pattern.
15
* @param path Normalized request path to test.
16
* @return Non-zero when the path matches the pattern, otherwise 0.
17
*/
18
int
native_dispatch_route_pattern_matches
(
const
char
*pattern,
const
char
*path);
19
/**
20
* @brief Resolves the response artifact file for one request using the dispatch table.
21
* @param root Artifact root directory containing dispatch metadata.
22
* @param method HTTP method for the request.
23
* @param path Normalized request path.
24
* @return Newly allocated response file path, or NULL when no route matches.
25
*/
26
char
*
native_dispatch_response_file_for_request
(
const
char
*root,
const
char
*method,
const
char
*path);
27
28
29
/** @} */
30
#endif
native_dispatch_response_file_for_request
char * native_dispatch_response_file_for_request(const char *root, const char *method, const char *path)
Resolves the response artifact file for one request using the dispatch table.
Definition
native_dispatch_table.c:47
native_dispatch_route_pattern_matches
int native_dispatch_route_pattern_matches(const char *pattern, const char *path)
Tests whether a request path matches one dispatch-table route pattern.
Definition
native_dispatch_table.c:20
src
native_runtime
c
native_dispatch_table.h
Generated by
1.17.0