MPD

- Main Page
- Data Structures
- Files

- File List
- Globals

# src/mapper.h

Go to the documentation of this file.

    00001 /*
    00002  * Copyright (C) 2003-2010 The Music Player Daemon Project
    00003  * http://www.musicpd.org
    00004  *
    00005  * This program is free software; you can redistribute it and/or modify
    00006  * it under the terms of the GNU General Public License as published by
    00007  * the Free Software Foundation; either version 2 of the License, or
    00008  * (at your option) any later version.
    00009  *
    00010  * This program is distributed in the hope that it will be useful,
    00011  * but WITHOUT ANY WARRANTY; without even the implied warranty of
    00012  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    00013  * GNU General Public License for more details.
    00014  *
    00015  * You should have received a copy of the GNU General Public License along
    00016  * with this program; if not, write to the Free Software Foundation, Inc.,
    00017  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
    00018  */
    00019
    00020 /*
    00021  * Maps directory and song objects to file system paths.
    00022  */
    00023
    00024 #ifndef MPD_MAPPER_H
    00025 #define MPD_MAPPER_H
    00026
    00027 #include <stdbool.h>
    00028
    00029 #define PLAYLIST_FILE_SUFFIX ".m3u"
    00030
    00031 struct directory;
    00032 struct song;
    00033
    00034 void mapper_init(const char *_music_dir, const char *_playlist_dir);
    00035
    00036 void mapper_finish(void);
    00037
    00041 bool
    00042 mapper_has_music_directory(void);
    00043
    00049 const char *
    00050 map_to_relative_path(const char *path_utf8);
    00051
    00057 char *
    00058 map_uri_fs(const char *uri);
    00059
    00066 char *
    00067 map_directory_fs(const struct directory *directory);
    00068
    00077 char *
    00078 map_directory_child_fs(const struct directory *directory, const char *name);
    00079
    00087 char *
    00088 map_song_fs(const struct song *song);
    00089
    00097 char *
    00098 map_fs_to_utf8(const char *path_fs);
    00099
    00103 const char *
    00104 map_spl_path(void);
    00105
    00113 char *
    00114 map_spl_utf8_to_fs(const char *name);
    00115
    00116 #endif