]> git.sesse.net Git - vlc/blob - src/symbian/dirs.c
LGPL
[vlc] / src / symbian / dirs.c
1 /*****************************************************************************
2  * dirs.cpp: Symbian Directory Structure
3  *****************************************************************************
4  * Copyright © 2010 Pankaj Yadav
5  *
6  * Authors: Pankaj Yadav
7  *
8  * This program is free software; you can redistribute it and/or modify it
9  * under the terms of the GNU Lesser General Public License as published by
10  * the Free Software Foundation; either version 2.1 of the License, or
11  * (at your option) any later version.
12  *
13  * This program is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16  * GNU Lesser General Public License for more details.
17  *
18  * You should have received a copy of the GNU Lesser General Public License
19  * along with this program; if not, write to the Free Software Foundation,
20  * Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
21  *****************************************************************************/
22
23 #include "path.h"
24
25 #ifdef HAVE_CONFIG_H
26 # include "config.h"
27 #endif
28
29 #include <vlc_common.h>
30
31 #include "../libvlc.h"
32 #include <vlc_charset.h>
33 #include <vlc_configuration.h>
34 #include "config/configuration.h"
35
36 #include <string.h>
37
38 /**
39  * Determines the shared data directory
40  *
41  * @return a null-terminated string or NULL. Use free() to release it.
42  */
43 char *config_GetDataDirDefault (void)
44 {
45     return GetConstPrivatePath();
46 }
47
48 /**
49  * Determines the architecture-dependent data directory
50  *
51  * @return a string (always succeeds).
52  */
53 const char *config_GetLibDir (void)
54 {
55     return "C:\\Sys\\Bin";
56 }
57
58 /**
59  * Determines the system configuration directory.
60  *
61  * @return a string (always succeeds).
62  */
63 const char *config_GetConfDir( void )
64 {
65     return "C:\\Data\\Others";
66 }
67
68 char *config_GetUserDir (vlc_userdir_t type)
69 {
70     switch (type)
71     {
72         case VLC_HOME_DIR:
73             break;
74         case VLC_CONFIG_DIR:
75             return GetConstPrivatePath();
76         case VLC_DATA_DIR:
77             return GetConstPrivatePath();
78         case VLC_CACHE_DIR:
79             return GetConstPrivatePath();
80         case VLC_DESKTOP_DIR:
81         case VLC_DOWNLOAD_DIR:
82         case VLC_TEMPLATES_DIR:
83         case VLC_PUBLICSHARE_DIR:
84         case VLC_DOCUMENTS_DIR:
85             return strdup("C:\\Data\\Others");
86         case VLC_MUSIC_DIR:
87             return strdup("C:\\Data\\Sounds");
88         case VLC_PICTURES_DIR:
89             return strdup("C:\\Data\\Images");
90         case VLC_VIDEOS_DIR:
91             return strdup("C:\\Data\\Videos");
92     }
93     return GetConstPrivatePath();
94 }
95