commit a5a30f304a64121a362088f45d838ac81a49ee37 from: Stefan Sperling date: Mon Sep 06 10:52:02 2021 UTC document functions declared in the public got_dial.h header file commit - baf8297852cb080b3eea4bd38672e358b8298b76 commit + a5a30f304a64121a362088f45d838ac81a49ee37 blob - 2a50bd2101d46a788ed418f19afeafc8958b08d1 blob + ded6fdb2e5545e8068c616f94ffabeaf7a52f800 --- include/got_dial.h +++ include/got_dial.h @@ -14,6 +14,20 @@ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ +/* + * Apply any unveil(2) operations required to support the given protocol. + * This function must be called during initialization of the main program + * if any got_dial funcionality will be used. + */ const struct got_error *got_dial_apply_unveil(const char *proto); + +/* + * Attempt to parse a URI into the following parts: + * A protocol scheme, hostname, port number (as a string), path on server, + * and a repository name. If the URI lacks some of this information return + * default values where applicable. + * The results of this function must be passed to other functions below. + * The caller should dispose of the returned values with free(3). + */ const struct got_error *got_dial_parse_uri(char **proto, char **host, char **port, char **server_path, char **repo_name, const char *uri);