|
Asterisk - The Open Source Telephony Project GIT-master-9647a4f
|

Go to the source code of this file.
Functions | |
| struct ast_uri * | ast_uri_copy_replace (const struct ast_uri *uri, const char *scheme, const char *user_info, const char *host, const char *port, const char *path, const char *query) |
| Copy the given uri replacing any value in the new uri with any given. | |
| struct ast_uri * | ast_uri_create (const char *scheme, const char *user_info, const char *host, const char *port, const char *path, const char *query) |
| Create a uri with the given parameters. | |
| const char * | ast_uri_host (const struct ast_uri *uri) |
| Retrieve the uri host. | |
| int attribute_pure | ast_uri_is_secure (const struct ast_uri *uri) |
| Retrieve if the uri is of a secure type. | |
| char * | ast_uri_make_host_with_port (const struct ast_uri *uri) |
| Retrieve a string of the host and port. | |
| struct ast_uri * | ast_uri_parse (const char *uri) |
| Parse the given uri into a structure. | |
| struct ast_uri * | ast_uri_parse_http (const char *uri) |
| Parse the given http uri into a structure. | |
| struct ast_uri * | ast_uri_parse_websocket (const char *uri) |
| Parse the given websocket uri into a structure. | |
| const char * | ast_uri_path (const struct ast_uri *uri) |
| Retrieve the uri path. | |
| const char * | ast_uri_port (const struct ast_uri *uri) |
| Retrieve the uri port. | |
| const char * | ast_uri_query (const struct ast_uri *uri) |
| Retrieve the uri query parameters. | |
| const char * | ast_uri_scheme (const struct ast_uri *uri) |
| Retrieve the uri scheme. | |
| const char * | ast_uri_user_info (const struct ast_uri *uri) |
| Retrieve the uri user information. | |
| struct ast_uri * ast_uri_copy_replace | ( | const struct ast_uri * | uri, |
| const char * | scheme, | ||
| const char * | user_info, | ||
| const char * | host, | ||
| const char * | port, | ||
| const char * | path, | ||
| const char * | query | ||
| ) |
Copy the given uri replacing any value in the new uri with any given.
| uri | the uri object to copy |
| scheme | the uri scheme (ex: http) |
| user_info | user credentials (ex: <name>@<pass>) |
| host | host name or ip address |
| port | the port |
| path | the path |
| query | query parameters |
| NULL | on error |
Definition at line 101 of file uri.c.
References ast_uri_create(), ast_uri::host, ast_uri::path, ast_uri::port, ast_uri::query, ast_uri::scheme, ast_uri::uri, and ast_uri::user_info.
Referenced by uri_parse_and_default().
| struct ast_uri * ast_uri_create | ( | const char * | scheme, |
| const char * | user_info, | ||
| const char * | host, | ||
| const char * | port, | ||
| const char * | path, | ||
| const char * | query | ||
| ) |
Create a uri with the given parameters.
| scheme | the uri scheme (ex: http) |
| user_info | user credentials (ex: <name>@<pass>) |
| host | host name or ip address |
| port | the port |
| path | the path |
| query | query parameters |
| NULL | on error |
Definition at line 88 of file uri.c.
References ast_uri_create_(), ast_uri::host, ast_uri::path, ast_uri::port, ast_uri::query, ast_uri::scheme, and ast_uri::user_info.
Referenced by ast_uri_copy_replace().
| const char * ast_uri_host | ( | const struct ast_uri * | uri | ) |
Retrieve the uri host.
Definition at line 125 of file uri.c.
References ast_uri::uri.
Referenced by AST_TEST_DEFINE(), AST_TEST_DEFINE(), AST_TEST_DEFINE(), and ast_uri_make_host_with_port().
| int attribute_pure ast_uri_is_secure | ( | const struct ast_uri * | uri | ) |
Retrieve if the uri is of a secure type.
| True | if secure. |
| False | otherwise. |
Definition at line 145 of file uri.c.
References ast_strlen_zero(), and ast_uri::uri.
Referenced by AST_TEST_DEFINE(), AST_TEST_DEFINE(), and uri_parse_and_default().
| char * ast_uri_make_host_with_port | ( | const struct ast_uri * | uri | ) |
Retrieve a string of the host and port.
Combine the host and port (<host>:<port>) if the port is available, otherwise just return the host.
| uri | the uri object |
Definition at line 300 of file uri.c.
References ast_asprintf, ast_uri_host(), ast_uri_port(), NULL, and ast_uri::uri.
Referenced by websocket_client_parse_uri().
| struct ast_uri * ast_uri_parse | ( | const char * | uri | ) |
Parse the given uri into a structure.
<scheme>://[user:pass@]<host>[:port][/<path>]
| uri | a string uri to parse |
| NULL | on error |
Definition at line 195 of file uri.c.
References ast_uri_create_(), ast_uri::host, NULL, ast_uri::path, ast_uri::port, ast_uri::query, ast_uri::scheme, SET_VALUES, ast_uri::uri, and ast_uri::user_info.
Referenced by AST_TEST_DEFINE(), file_extension_from_url_path(), and uri_parse_and_default().
| struct ast_uri * ast_uri_parse_http | ( | const char * | uri | ) |
Parse the given http uri into a structure.
[http[s]://][user:pass@]<host>[:port][/<path>]
| uri | an http string uri to parse |
| NULL | on error |
Definition at line 290 of file uri.c.
References ast_uri::uri, and uri_parse_and_default().
Referenced by AST_TEST_DEFINE(), and AST_TEST_DEFINE().
| struct ast_uri * ast_uri_parse_websocket | ( | const char * | uri | ) |
Parse the given websocket uri into a structure.
| uri | a websocket string uri to parse |
| NULL | on error |
Definition at line 295 of file uri.c.
References ast_uri::uri, and uri_parse_and_default().
Referenced by websocket_client_parse_uri().
| const char * ast_uri_path | ( | const struct ast_uri * | uri | ) |
Retrieve the uri path.
Definition at line 135 of file uri.c.
References ast_uri::uri.
Referenced by AST_TEST_DEFINE(), file_extension_from_url_path(), and websocket_client_parse_uri().
| const char * ast_uri_port | ( | const struct ast_uri * | uri | ) |
Retrieve the uri port.
Definition at line 130 of file uri.c.
References ast_uri::uri.
Referenced by AST_TEST_DEFINE(), AST_TEST_DEFINE(), AST_TEST_DEFINE(), ast_uri_make_host_with_port(), and uri_parse_and_default().
| const char * ast_uri_query | ( | const struct ast_uri * | uri | ) |
Retrieve the uri query parameters.
Definition at line 140 of file uri.c.
References ast_uri::uri.
Referenced by AST_TEST_DEFINE(), and websocket_client_parse_uri().
| const char * ast_uri_scheme | ( | const struct ast_uri * | uri | ) |
Retrieve the uri scheme.
Definition at line 115 of file uri.c.
References ast_uri::scheme, and ast_uri::uri.
Referenced by AST_TEST_DEFINE(), AST_TEST_DEFINE(), and AST_TEST_DEFINE().
| const char * ast_uri_user_info | ( | const struct ast_uri * | uri | ) |
Retrieve the uri user information.
Definition at line 120 of file uri.c.
References ast_uri::uri.
Referenced by AST_TEST_DEFINE(), and websocket_client_parse_uri().