[vlc-commits] android: merge dirs.c and specific.c

Thomas Guillem git at videolan.org
Wed Jul 13 15:43:43 CEST 2016


vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Mon Jul 11 14:52:58 2016 +0200| [2db81c011ee62078120d66efbb42dbcc26bbe651] | committer: Thomas Guillem

android: merge dirs.c and specific.c

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

 src/Makefile.am        |    1 -
 src/android/dirs.c     |   57 ------------------------------------------------
 src/android/specific.c |   28 ++++++++++++++++++++++++
 3 files changed, 28 insertions(+), 58 deletions(-)

diff --git a/src/Makefile.am b/src/Makefile.am
index be84bdc..c0e2635 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -262,7 +262,6 @@ SOURCES_libvlc_darwin = \
 SOURCES_libvlc_android = \
 	linux/cpu.c \
 	linux/dirs.c \
-	android/dirs.c \
 	linux/thread.c \
 	android/thread.c \
 	android/error.c \
diff --git a/src/android/dirs.c b/src/android/dirs.c
deleted file mode 100644
index 9b65dc4..0000000
--- a/src/android/dirs.c
+++ /dev/null
@@ -1,57 +0,0 @@
-/*****************************************************************************
- * dirs.c: Android directories configuration
- *****************************************************************************
- * Copyright © 2012 Rafaël Carré
- *
- * Authors: Rafaël Carré <funman at videolanorg>
- *
- * 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 Lesser 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.
- *****************************************************************************/
-
-#ifdef HAVE_CONFIG_H
-# include "config.h"
-#endif
-
-#include <vlc_common.h>
-
-#include "config/configuration.h"
-
-#include <string.h>
-
-char *config_GetUserDir (vlc_userdir_t type)
-{
-    switch (type)
-    {
-        case VLC_DATA_DIR:
-            return strdup("/sdcard/Android/data/org.videolan.vlc");
-        case VLC_CACHE_DIR:
-            return strdup("/sdcard/Android/data/org.videolan.vlc/cache");
-
-        case VLC_HOME_DIR:
-        case VLC_CONFIG_DIR:
-            return NULL;
-
-        case VLC_DESKTOP_DIR:
-        case VLC_DOWNLOAD_DIR:
-        case VLC_TEMPLATES_DIR:
-        case VLC_PUBLICSHARE_DIR:
-        case VLC_DOCUMENTS_DIR:
-        case VLC_MUSIC_DIR:
-        case VLC_PICTURES_DIR:
-        case VLC_VIDEOS_DIR:
-            return NULL;
-    }
-    return NULL;
-}
diff --git a/src/android/specific.c b/src/android/specific.c
index bd4844e..8fe4cd5 100644
--- a/src/android/specific.c
+++ b/src/android/specific.c
@@ -26,7 +26,9 @@
 
 #include <vlc_common.h>
 #include "../libvlc.h"
+#include "config/configuration.h"
 
+#include <string.h>
 #include <jni.h>
 
 static JavaVM *s_jvm = NULL;
@@ -62,3 +64,29 @@ system_Configure(libvlc_int_t *p_libvlc, int i_argc, const char *const pp_argv[]
     var_Create(p_libvlc, "android-jvm", VLC_VAR_ADDRESS);
     var_SetAddress(p_libvlc, "android-jvm", s_jvm);
 }
+
+char *config_GetUserDir (vlc_userdir_t type)
+{
+    switch (type)
+    {
+        case VLC_DATA_DIR:
+            return strdup("/sdcard/Android/data/org.videolan.vlc");
+        case VLC_CACHE_DIR:
+            return strdup("/sdcard/Android/data/org.videolan.vlc/cache");
+
+        case VLC_HOME_DIR:
+        case VLC_CONFIG_DIR:
+            return NULL;
+
+        case VLC_DESKTOP_DIR:
+        case VLC_DOWNLOAD_DIR:
+        case VLC_TEMPLATES_DIR:
+        case VLC_PUBLICSHARE_DIR:
+        case VLC_DOCUMENTS_DIR:
+        case VLC_MUSIC_DIR:
+        case VLC_PICTURES_DIR:
+        case VLC_VIDEOS_DIR:
+            return NULL;
+    }
+    return NULL;
+}



More information about the vlc-commits mailing list