aboutsummaryrefslogtreecommitdiffstats
path: root/src/mapper.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/mapper.h')
-rw-r--r--src/mapper.h27
1 files changed, 15 insertions, 12 deletions
diff --git a/src/mapper.h b/src/mapper.h
index d6184a175..b4e314569 100644
--- a/src/mapper.h
+++ b/src/mapper.h
@@ -24,8 +24,11 @@
#ifndef MPD_MAPPER_H
#define MPD_MAPPER_H
-#include <glib.h>
+#include "gcc.h"
+#include "gerror.h"
+
#include <stdbool.h>
+#include <stddef.h>
#define PLAYLIST_FILE_SUFFIX ".m3u"
@@ -39,7 +42,7 @@ void mapper_finish(void);
/**
* Return the absolute path of the music directory encoded in UTF-8.
*/
-G_GNUC_CONST
+gcc_const
const char *
mapper_get_music_directory_utf8(void);
@@ -47,14 +50,14 @@ mapper_get_music_directory_utf8(void);
* Return the absolute path of the music directory encoded in the
* filesystem character set.
*/
-G_GNUC_CONST
+gcc_const
const char *
mapper_get_music_directory_fs(void);
/**
* Returns true if a music directory was configured.
*/
-G_GNUC_CONST
+gcc_const
static inline bool
mapper_has_music_directory(void)
{
@@ -66,7 +69,7 @@ mapper_has_music_directory(void)
* this function converts it to a relative path. If not, it returns
* the unmodified string pointer.
*/
-G_GNUC_PURE
+gcc_pure
const char *
map_to_relative_path(const char *path_utf8);
@@ -75,7 +78,7 @@ map_to_relative_path(const char *path_utf8);
* is basically done by converting the URI to the file system charset
* and prepending the music directory.
*/
-G_GNUC_MALLOC
+gcc_malloc
char *
map_uri_fs(const char *uri);
@@ -85,7 +88,7 @@ map_uri_fs(const char *uri);
* @param directory the directory object
* @return the path in file system encoding, or NULL if mapping failed
*/
-G_GNUC_MALLOC
+gcc_malloc
char *
map_directory_fs(const struct directory *directory);
@@ -97,7 +100,7 @@ map_directory_fs(const struct directory *directory);
* @param name the child's name in UTF-8
* @return the path in file system encoding, or NULL if mapping failed
*/
-G_GNUC_MALLOC
+gcc_malloc
char *
map_directory_child_fs(const struct directory *directory, const char *name);
@@ -108,7 +111,7 @@ map_directory_child_fs(const struct directory *directory, const char *name);
* @param song the song object
* @return the path in file system encoding, or NULL if mapping failed
*/
-G_GNUC_MALLOC
+gcc_malloc
char *
map_song_fs(const struct song *song);
@@ -119,14 +122,14 @@ map_song_fs(const struct song *song);
* @param path_fs a path in file system encoding
* @return the relative path in UTF-8, or NULL if mapping failed
*/
-G_GNUC_MALLOC
+gcc_malloc
char *
map_fs_to_utf8(const char *path_fs);
/**
* Returns the playlist directory.
*/
-G_GNUC_CONST
+gcc_const
const char *
map_spl_path(void);
@@ -137,7 +140,7 @@ map_spl_path(void);
*
* @return the path in file system encoding, or NULL if mapping failed
*/
-G_GNUC_PURE
+gcc_pure
char *
map_spl_utf8_to_fs(const char *name);