aboutsummaryrefslogtreecommitdiffstats
path: root/src/util/UriUtil.hxx
diff options
context:
space:
mode:
Diffstat (limited to 'src/util/UriUtil.hxx')
-rw-r--r--src/util/UriUtil.hxx17
1 files changed, 16 insertions, 1 deletions
diff --git a/src/util/UriUtil.hxx b/src/util/UriUtil.hxx
index 1c6bce3ff..d478d5b92 100644
--- a/src/util/UriUtil.hxx
+++ b/src/util/UriUtil.hxx
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2003-2013 The Music Player Daemon Project
+ * Copyright (C) 2003-2014 The Music Player Daemon Project
* http://www.musicpd.org
*
* This program is free software; you can redistribute it and/or modify
@@ -31,6 +31,13 @@
gcc_pure
bool uri_has_scheme(const char *uri);
+/**
+ * Returns the scheme name of the specified URI, or an empty string.
+ */
+gcc_pure
+std::string
+uri_get_scheme(const char *uri);
+
gcc_pure
const char *
uri_get_suffix(const char *uri);
@@ -81,4 +88,12 @@ gcc_pure gcc_nonnull_all
bool
uri_is_child_or_same(const char *parent, const char *child);
+/**
+ * Translate the given URI in the context of #base. For example,
+ * uri_apply_base("foo", "http://bar/a/")=="http://bar/a/foo".
+ */
+gcc_pure
+std::string
+uri_apply_base(const std::string &uri, const std::string &base);
+
#endif