Skip to content

Commit

Permalink
API related update
Browse files Browse the repository at this point in the history
  • Loading branch information
AlwinEsch committed Jan 1, 2022
1 parent 6f824a8 commit b43faa6
Show file tree
Hide file tree
Showing 8 changed files with 12 additions and 20 deletions.
11 changes: 1 addition & 10 deletions src/addon.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,21 +47,12 @@ ADDON_STATUS CPeripheralJoystick::Create()
return ADDON_STATUS_NEED_SETTINGS;
}

ADDON_STATUS CPeripheralJoystick::SetSetting(const std::string& settingName, const kodi::CSettingValue& settingValue)
ADDON_STATUS CPeripheralJoystick::SetSetting(const std::string& settingName, const kodi::addon::CSettingValue& settingValue)
{
CSettings::Get().SetSetting(settingName, settingValue);
return ADDON_STATUS_OK;
}


ADDON_STATUS CPeripheralJoystick::GetStatus()
{
if (!CSettings::Get().IsInitialized())
return ADDON_STATUS_NEED_SETTINGS;

return ADDON_STATUS_OK;
}

CPeripheralJoystick::~CPeripheralJoystick()
{
CStorageManager::Get().Deinitialize();
Expand Down
3 changes: 1 addition & 2 deletions src/addon.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,7 @@ class DLL_PRIVATE CPeripheralJoystick
virtual ~CPeripheralJoystick();

ADDON_STATUS Create() override;
ADDON_STATUS GetStatus() override;
ADDON_STATUS SetSetting(const std::string& settingName, const kodi::CSettingValue& settingValue) override;
ADDON_STATUS SetSetting(const std::string& settingName, const kodi::addon::CSettingValue& settingValue) override;

void GetCapabilities(kodi::addon::PeripheralCapabilities& capabilities) override;
PERIPHERAL_ERROR PerformDeviceScan(std::vector<std::shared_ptr<kodi::addon::Peripheral>>& scan_results) override;
Expand Down
4 changes: 3 additions & 1 deletion src/filesystem/DirectoryCache.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@

#pragma once

#include "utils/CommonMacros.h"

#include <kodi/Filesystem.h>

#include <chrono>
Expand All @@ -27,7 +29,7 @@ namespace JOYSTICK
virtual void OnRemove(const kodi::vfs::CDirEntry& item) = 0;
};

class CDirectoryCache
class DLL_PRIVATE CDirectoryCache
{
public:
void Initialize(IDirectoryCacheCallback* callbacks);
Expand Down
2 changes: 1 addition & 1 deletion src/log/LogAddon.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ CLogAddon::CLogAddon()

void CLogAddon::Log(SYS_LOG_LEVEL level, const char* logline)
{
AddonLog loglevel;
ADDON_LOG loglevel;

switch (level)
{
Expand Down
2 changes: 1 addition & 1 deletion src/settings/Settings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ CSettings& CSettings::Get(void)
return _instance;
}

void CSettings::SetSetting(const std::string& strName, const kodi::CSettingValue& value)
void CSettings::SetSetting(const std::string& strName, const kodi::addon::CSettingValue& value)
{
if (strName == SETTING_RETROARCH_CONFIG)
{
Expand Down
2 changes: 1 addition & 1 deletion src/settings/Settings.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ namespace JOYSTICK
/*!
* \brief Set the value of a setting. Called by the frontend.
*/
void SetSetting(const std::string& strName, const kodi::CSettingValue& value);
void SetSetting(const std::string& strName, const kodi::addon::CSettingValue& value);

/*!
* \brief Check if the settings have been initialized
Expand Down
6 changes: 3 additions & 3 deletions src/storage/JustABunchOfFiles.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ namespace JOYSTICK
/*!
* \brief Container class for device records and button maps
*/
class CResources
class DLL_PRIVATE CResources
{
public:
CResources(const CJustABunchOfFiles* database);
Expand Down Expand Up @@ -55,8 +55,8 @@ namespace JOYSTICK
ResourceMap m_resources;
};

class CJustABunchOfFiles : public IDatabase,
public IDirectoryCacheCallback
class DLL_PRIVATE CJustABunchOfFiles : public IDatabase,
public IDirectoryCacheCallback
{
public:
CJustABunchOfFiles(const std::string& strResourcePath,
Expand Down
2 changes: 1 addition & 1 deletion src/storage/xml/DatabaseXml.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ namespace JOYSTICK
{
class IControllerHelper;

class CDatabaseXml : public CJustABunchOfFiles
class DLL_PRIVATE CDatabaseXml : public CJustABunchOfFiles
{
public:
CDatabaseXml(const std::string& strBasePath, bool bReadWrite, IDatabaseCallbacks* callbacks, IControllerHelper *controllerHelper);
Expand Down

0 comments on commit b43faa6

Please sign in to comment.