aboutsummaryrefslogtreecommitdiffstats
path: root/src/ConfigGlobal.hxx
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2013-10-17 21:59:35 +0200
committerMax Kellermann <max@duempel.org>2013-10-17 23:43:46 +0200
commitabfbd55305587306730d5419b8a3b09e6a43abcb (patch)
tree2a195220d79efe195f3beacb7dd3a226a3341ad6 /src/ConfigGlobal.hxx
parentb3611524f45c2a478f9decd6d22ecd1dbbbb64b9 (diff)
downloadmpd-abfbd55305587306730d5419b8a3b09e6a43abcb.tar.gz
mpd-abfbd55305587306730d5419b8a3b09e6a43abcb.tar.xz
mpd-abfbd55305587306730d5419b8a3b09e6a43abcb.zip
fs/Path: rename to AllocatedPath
The new class Path only holds a string pointer without being responsible for allocation/deallocation. The FileSystem.hxx library accepts Path arguments instead of AllocatedPath, to avoid forcing callers to allocate another string object.
Diffstat (limited to '')
-rw-r--r--src/ConfigGlobal.hxx13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/ConfigGlobal.hxx b/src/ConfigGlobal.hxx
index 2beb2cb5b..978db3145 100644
--- a/src/ConfigGlobal.hxx
+++ b/src/ConfigGlobal.hxx
@@ -25,6 +25,7 @@
class Error;
class Path;
+class AllocatedPath;
void config_global_init(void);
void config_global_finish(void);
@@ -36,7 +37,7 @@ void config_global_finish(void);
void config_global_check(void);
bool
-ReadConfigFile(const Path &path, Error &error);
+ReadConfigFile(Path path, Error &error);
/* don't free the returned value
set _last_ to nullptr to get first entry */
@@ -66,18 +67,18 @@ config_get_string(enum ConfigOption option, const char *default_value);
/**
* Returns an optional configuration variable which contains an
* absolute path. If there is a tilde prefix, it is expanded.
- * Returns Path::Null() if the value is not present. If the path
- * could not be parsed, returns Path::Null() and sets the error.
+ * Returns AllocatedPath::Null() if the value is not present. If the path
+ * could not be parsed, returns AllocatedPath::Null() and sets the error.
*/
-Path
+AllocatedPath
config_get_path(enum ConfigOption option, Error &error);
/**
* Parse a configuration parameter as a path.
* If there is a tilde prefix, it is expanded. If the path could
- * not be parsed, returns Path::Null() and sets the error.
+ * not be parsed, returns AllocatedPath::Null() and sets the error.
*/
-Path
+AllocatedPath
config_parse_path(const struct config_param *param, Error & error_r);
gcc_pure