Skip to content

Commit

Permalink
API related update
Browse files Browse the repository at this point in the history
  • Loading branch information
AlwinEsch committed Dec 28, 2021
1 parent 6362331 commit bbad2d4
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
12 changes: 6 additions & 6 deletions src/SData.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down Expand Up @@ -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
{
Expand Down Expand Up @@ -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;

Expand Down
8 changes: 4 additions & 4 deletions src/SData.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,17 +26,17 @@
#include <thread>
#include <vector>

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();
~SData();

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;
}
Expand Down
2 changes: 1 addition & 1 deletion src/Utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit bbad2d4

Please sign in to comment.