[vlc-commits] commit: Symbian Specific Directories (Pankaj Yadav )

git at videolan.org git at videolan.org
Tue Jan 11 00:11:29 CET 2011


vlc | branch: master | Pankaj Yadav <pk at videolan.org> | Tue Jan 11 04:27:15 2011 +0530| [09dcc5967f48908c75ed75f005a389feac71be8a] | committer: Jean-Baptiste Kempf 

Symbian Specific Directories

Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=09dcc5967f48908c75ed75f005a389feac71be8a
---

 src/Makefile.am    |    1 +
 src/symbian/dirs.c |   93 ++++++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 94 insertions(+), 0 deletions(-)

diff --git a/src/Makefile.am b/src/Makefile.am
index a445751..7e5ba02 100755
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -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
index 0000000..74ec1d2
--- /dev/null
+++ b/src/symbian/dirs.c
@@ -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();
+}
+



More information about the vlc-commits mailing list