summaryrefslogtreecommitdiff
path: root/src/net.h
diff options
context:
space:
mode:
authorEdward Thomson <ethomson@edwardthomson.com>2019-12-01 10:06:11 +1100
committerEdward Thomson <ethomson@edwardthomson.com>2020-01-24 09:54:29 -0600
commit297c61e41f23caacb39d8c00957fd5ec050c9cbf (patch)
treedddef32bc863764eebb183da2319fe0a10678b73 /src/net.h
parenta194e17f9793eb960745243dde3eabfd60b65b56 (diff)
downloadlibgit2-297c61e41f23caacb39d8c00957fd5ec050c9cbf.tar.gz
net: add an isvalid function
(Also, mark all the declarations as extern.)
Diffstat (limited to 'src/net.h')
-rw-r--r--src/net.h11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/net.h b/src/net.h
index 6df129089..11dcf97da 100644
--- a/src/net.h
+++ b/src/net.h
@@ -22,15 +22,18 @@ typedef struct git_net_url {
#define GIT_NET_URL_INIT { NULL }
/** Parses a string containing a URL into a structure. */
-int git_net_url_parse(git_net_url *url, const char *str);
+extern int git_net_url_parse(git_net_url *url, const char *str);
+
+/** Ensures that a URL is minimally valid (contains a host, port and path) */
+extern bool git_net_url_valid(git_net_url *url);
/** Returns nonzero if the URL is on the default port. */
-int git_net_url_is_default_port(git_net_url *url);
+extern int git_net_url_is_default_port(git_net_url *url);
/** Swaps the contents of one URL for another. */
-void git_net_url_swap(git_net_url *a, git_net_url *b);
+extern void git_net_url_swap(git_net_url *a, git_net_url *b);
/** Disposes the contents of the structure. */
-void git_net_url_dispose(git_net_url *url);
+extern void git_net_url_dispose(git_net_url *url);
#endif