diff options
author | Memphiz <memphis@machzwo.de> | 2016-08-16 21:40:27 +0200 |
---|---|---|
committer | Memphiz <memphis@machzwo.de> | 2016-08-16 21:40:27 +0200 |
commit | a4789285908a89bc459efb6ed21ebbc7dec8c742 (patch) | |
tree | 884f4d7cb913fcf6754c42f7542afa1cbae7546f | |
parent | c6e0bee4d3a733a5611db95b671b2e3fe8996533 (diff) |
[droid] - added PlatformAndroid override which sets the needed SSL_CERT_FILE env var (and remove that line from XBPython)
-rw-r--r-- | xbmc/interfaces/python/XBPython.cpp | 3 | ||||
-rw-r--r-- | xbmc/platform/overrides/android/PlatformAndroid.cpp | 43 | ||||
-rw-r--r-- | xbmc/platform/overrides/android/PlatformAndroid.h | 35 |
3 files changed, 78 insertions, 3 deletions
diff --git a/xbmc/interfaces/python/XBPython.cpp b/xbmc/interfaces/python/XBPython.cpp index d762bf4f8f..bc84af9411 100644 --- a/xbmc/interfaces/python/XBPython.cpp +++ b/xbmc/interfaces/python/XBPython.cpp @@ -593,9 +593,6 @@ bool XBPython::OnScriptInitialized(ILanguageInvoker *invoker) CEnvironment::putenv(buf); buf = "OS=win32"; CEnvironment::putenv(buf); - -#elif defined(TARGET_ANDROID) - setenv("SSL_CERT_FILE", CSpecialProtocol::TranslatePath("special://xbmc/system/certs/cacert.pem").c_str(), 1); #endif if (PyEval_ThreadsInitialized()) diff --git a/xbmc/platform/overrides/android/PlatformAndroid.cpp b/xbmc/platform/overrides/android/PlatformAndroid.cpp new file mode 100644 index 0000000000..2629f5a39c --- /dev/null +++ b/xbmc/platform/overrides/android/PlatformAndroid.cpp @@ -0,0 +1,43 @@ +/* + * Copyright (C) 2016 Team Kodi + * http://kodi.tv + * + * This Program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2, 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 General Public License + * along with Kodi; see the file COPYING. If not, see + * <http://www.gnu.org/licenses/>. + * + */ + +#include "PlatformAndroid.h" +#include <stdlib.h> +#include "filesystem/SpecialProtocol.h" + +CPlatform* CPlatform::CreateInstance() +{ + return new CPlatformAndroid(); +} + +CPlatformAndroid::CPlatformAndroid() +{ + +} + +CPlatformAndroid::~CPlatformAndroid() +{ + +} + +void CPlatformAndroid::Init() +{ + setenv("SSL_CERT_FILE", CSpecialProtocol::TranslatePath("special://xbmc/system/certs/cacert.pem").c_str(), 1); +} diff --git a/xbmc/platform/overrides/android/PlatformAndroid.h b/xbmc/platform/overrides/android/PlatformAndroid.h new file mode 100644 index 0000000000..611b7e15ef --- /dev/null +++ b/xbmc/platform/overrides/android/PlatformAndroid.h @@ -0,0 +1,35 @@ +#pragma once + +/* + * Copyright (C) 2016 Team Kodi + * http://kodi.tv + * + * This Program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2, 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 General Public License + * along with Kodi; see the file COPYING. If not, see + * <http://www.gnu.org/licenses/>. + * + */ + +#include "platform/Platform.h" + +class CPlatformAndroid : public CPlatform +{ + public: + /**\brief C'tor */ + CPlatformAndroid(); + + /**\brief D'tor */ + virtual ~CPlatformAndroid(); + + void Init() override; +}; |