]> git.sesse.net Git - vlc/commitdiff
Symbian Specific Directories
authorPankaj Yadav <pk@videolan.org>
Mon, 10 Jan 2011 22:39:15 +0000 (04:09 +0530)
committerJean-Baptiste Kempf <jb@videolan.org>
Mon, 10 Jan 2011 22:57:34 +0000 (23:57 +0100)
Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
src/Makefile.am
src/symbian/dirs.c [new file with mode: 0755]

index a445751047b9d90dea82f313ea3a0770f3baafde..7e5ba02d89f28b742a7e0923a92e008cdc9840d6 100755 (executable)
@@ -302,6 +302,7 @@ SOURCES_libvlc_win32 = \
 
 SOURCES_libvlc_symbian = \
        symbian/path.cpp \
+        symbian/dirs.c \
        $(NULL)
 
 SOURCES_libvlc_other = \
diff --git a/src/symbian/dirs.c b/src/symbian/dirs.c
new file mode 100755 (executable)
index 0000000..74ec1d2
--- /dev/null
@@ -0,0 +1,93 @@
+/*****************************************************************************
+ * dirs.cpp: Symbian Directory Structure
+ *****************************************************************************
+ * Copyright © 2010 Pankaj Yadav
+ *
+ * Authors: Pankaj Yadav
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation; either version 2.1 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
+ *****************************************************************************/
+
+#include "path.h"
+
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+#include <vlc_common.h>
+
+#include "../../../../src/libvlc.h"
+#include <vlc_charset.h>
+#include "config/configuration.h"
+
+#include <string.h>
+
+/**
+ * Determines the shared data directory
+ *
+ * @return a null-terminated string or NULL. Use free() to release it.
+ */
+char *config_GetDataDirDefault (void)
+{
+    return GetConstPrivatePath();
+}
+
+/**
+ * Determines the architecture-dependent data directory
+ *
+ * @return a string (always succeeds).
+ */
+const char *config_GetLibDir (void)
+{
+    return "C:\\Sys\\Bin";
+}
+
+/**
+ * Determines the system configuration directory.
+ *
+ * @return a string (always succeeds).
+ */
+const char *config_GetConfDir( void )
+{
+    return "C:\\Data\\Others";
+}
+
+char *config_GetUserDir (vlc_userdir_t type)
+{
+    switch (type)
+    {
+        case VLC_HOME_DIR:
+            break;
+        case VLC_CONFIG_DIR:
+            return GetConstPrivatePath();
+        case VLC_DATA_DIR:
+            return GetConstPrivatePath();
+        case VLC_CACHE_DIR:
+            return GetConstPrivatePath();
+        case VLC_DESKTOP_DIR:
+        case VLC_DOWNLOAD_DIR:
+        case VLC_TEMPLATES_DIR:
+        case VLC_PUBLICSHARE_DIR:
+        case VLC_DOCUMENTS_DIR:
+            return strdup("C:\\Data\\Others");
+        case VLC_MUSIC_DIR:
+            return strdup("C:\\Data\\Sounds");
+        case VLC_PICTURES_DIR:
+            return strdup("C:\\Data\\Images");
+        case VLC_VIDEOS_DIR:
+            return strdup("C:\\Data\\Videos");
+    }
+    return GetConstPrivatePath();
+}
+