From bbad2d4f2bf82e8c0441cea56148cb1abde484f0 Mon Sep 17 00:00:00 2001 From: Alwin Esch Date: Tue, 28 Dec 2021 14:32:41 +0100 Subject: [PATCH] API related update --- src/SData.cpp | 12 ++++++------ src/SData.h | 8 ++++---- src/Utils.cpp | 2 +- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/SData.cpp b/src/SData.cpp index 967882de..7807f64b 100644 --- a/src/SData.cpp +++ b/src/SData.cpp @@ -87,7 +87,7 @@ void SData::QueueErrorNotification(SError error) const } if (errorMsg > 0) - kodi::QueueNotification(QUEUE_ERROR, "", kodi::GetLocalizedString(errorMsg)); + kodi::QueueNotification(QUEUE_ERROR, "", kodi::addon::GetLocalizedString(errorMsg)); } bool SData::LoadCache() @@ -265,7 +265,7 @@ bool SData::ReloadSettings() m_sessionManager->SetStatusCallback([this](SError err) { if (err == SERROR_OK) { - kodi::QueueNotification(QUEUE_INFO, "", kodi::GetLocalizedString(MSG_RE_AUTHENTICATED)); + kodi::QueueNotification(QUEUE_INFO, "", kodi::addon::GetLocalizedString(MSG_RE_AUTHENTICATED)); } else { @@ -324,17 +324,17 @@ std::string ParseAsW3CDateString(time_t time) #define GET_SETTING_STR2(setting, name, portal, store, def) \ sprintf(setting, PORTAL_SUFFIX_FORMAT, name, portal); \ - store = kodi::GetSettingString(setting, def); + store = kodi::addon::GetSettingString(setting, def); #define GET_SETTING_INT2(setting, name, portal, store, def) \ sprintf(setting, PORTAL_SUFFIX_FORMAT, name, portal); \ - store = kodi::GetSettingInt(setting, def); + store = kodi::addon::GetSettingInt(setting, def); ADDON_STATUS SData::Create() { - settings.activePortal = kodi::GetSettingInt("active_portal", SC_SETTINGS_DEFAULT_ACTIVE_PORTAL); + settings.activePortal = kodi::addon::GetSettingInt("active_portal", SC_SETTINGS_DEFAULT_ACTIVE_PORTAL); settings.connectionTimeout = - kodi::GetSettingInt("connection_timeout", SC_SETTINGS_DEFAULT_CONNECTION_TIMEOUT); + kodi::addon::GetSettingInt("connection_timeout", SC_SETTINGS_DEFAULT_CONNECTION_TIMEOUT); // calc based on index (5 second steps) settings.connectionTimeout *= 5; diff --git a/src/SData.h b/src/SData.h index 7d79dc44..a0a7c441 100644 --- a/src/SData.h +++ b/src/SData.h @@ -26,9 +26,9 @@ #include #include -class ATTRIBUTE_HIDDEN SData : public kodi::addon::CAddonBase, - public kodi::addon::CInstancePVRClient, - private Base::Cache +class ATTR_DLL_LOCAL SData : public kodi::addon::CAddonBase, + public kodi::addon::CInstancePVRClient, + private Base::Cache { public: SData(); @@ -36,7 +36,7 @@ class ATTRIBUTE_HIDDEN SData : public kodi::addon::CAddonBase, ADDON_STATUS Create() override; ADDON_STATUS SetSetting(const std::string& settingName, - const kodi::CSettingValue& settingValue) override + const kodi::addon::CSettingValue& settingValue) override { return ADDON_STATUS_NEED_RESTART; } diff --git a/src/Utils.cpp b/src/Utils.cpp index 5711f3a5..100d31c7 100644 --- a/src/Utils.cpp +++ b/src/Utils.cpp @@ -15,7 +15,7 @@ std::string Utils::GetFilePath(const std::string& path, bool isUserPath) { - return (isUserPath ? kodi::GetBaseUserPath(path) : kodi::GetAddonPath(path)); + return (isUserPath ? kodi::addon::GetUserPath(path) : kodi::addon::GetAddonPath(path)); } // http://stackoverflow.com/a/17708801