diff options
author | Arne Morten Kvarving <spiff@kodi.tv> | 2024-05-12 08:13:58 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-05-12 08:13:58 +0200 |
commit | b0d72e8792668d69089b48af0a2ef3eb52d42e02 (patch) | |
tree | d4b18bef07d4a984539e6f6c41c355c008c50162 | |
parent | a43c9b90b7f8a8b3be4221e33047bcdb653426bd (diff) | |
parent | 452432c5aa53f2a0cf830f25439edcaccab6624d (diff) | |
download | xbmc-b0d72e8792668d69089b48af0a2ef3eb52d42e02.tar.xz |
Merge pull request #25196 from notspiff/move_playlist_namespace_to_kodi
changed: rename PLAYLIST namespace to KODI::PLAYLIST
75 files changed, 344 insertions, 237 deletions
diff --git a/xbmc/FileItemListModification.cpp b/xbmc/FileItemListModification.cpp index 8496ee9136..c2ce636e9e 100644 --- a/xbmc/FileItemListModification.cpp +++ b/xbmc/FileItemListModification.cpp @@ -12,9 +12,11 @@ #include "playlists/SmartPlaylistFileItemListModifier.h" #include "video/windows/VideoFileItemListModifier.h" +using namespace KODI; + CFileItemListModification::CFileItemListModification() { - m_modifiers.insert(new CSmartPlaylistFileItemListModifier()); + m_modifiers.insert(new PLAYLIST::CSmartPlaylistFileItemListModifier()); m_modifiers.insert(new CMusicFileItemListModifier()); m_modifiers.insert(new CVideoFileItemListModifier()); } diff --git a/xbmc/GUIInfoManager.cpp b/xbmc/GUIInfoManager.cpp index 84fd09ff5b..4e2c1ec178 100644 --- a/xbmc/GUIInfoManager.cpp +++ b/xbmc/GUIInfoManager.cpp @@ -41,6 +41,7 @@ #include <memory> #include <mutex> +using namespace KODI; using namespace KODI::GUILIB; using namespace KODI::GUILIB::GUIINFO; using namespace INFO; diff --git a/xbmc/PartyModeManager.cpp b/xbmc/PartyModeManager.cpp index b651054cb2..50de8a3286 100644 --- a/xbmc/PartyModeManager.cpp +++ b/xbmc/PartyModeManager.cpp @@ -35,6 +35,7 @@ #include <algorithm> +using namespace KODI; using namespace KODI::MESSAGING; #define QUEUE_DEPTH 10 @@ -49,7 +50,7 @@ CPartyModeManager::CPartyModeManager(void) bool CPartyModeManager::Enable(PartyModeContext context /*= PARTYMODECONTEXT_MUSIC*/, const std::string& strXspPath /*= ""*/) { // Filter using our PartyMode xml file - CSmartPlaylist playlist; + PLAYLIST::CSmartPlaylist playlist; std::string partyModePath; bool playlistLoaded; diff --git a/xbmc/PartyModeManager.h b/xbmc/PartyModeManager.h index cb1a5b3a4c..1809aeb850 100644 --- a/xbmc/PartyModeManager.h +++ b/xbmc/PartyModeManager.h @@ -15,7 +15,7 @@ class CFileItem; typedef std::shared_ptr<CFileItem> CFileItemPtr; class CFileItemList; -namespace PLAYLIST +namespace KODI::PLAYLIST { enum class Id; class CPlayList; @@ -37,7 +37,7 @@ public: void Disable(); void Play(int iPos); void OnSongChange(bool bUpdatePlayed = false); - void AddUserSongs(PLAYLIST::CPlayList& tempList, bool bPlay = false); + void AddUserSongs(KODI::PLAYLIST::CPlayList& tempList, bool bPlay = false); void AddUserSongs(CFileItemList& tempList, bool bPlay = false); bool IsEnabled(PartyModeContext context=PARTYMODECONTEXT_UNKNOWN) const; int GetSongsPlayed(); @@ -59,7 +59,7 @@ private: void ClearState(); void UpdateStats(); void Announce(); - PLAYLIST::Id GetPlaylistId() const; + KODI::PLAYLIST::Id GetPlaylistId() const; // state bool m_bEnabled; diff --git a/xbmc/PlayListPlayer.cpp b/xbmc/PlayListPlayer.cpp index 60535f5dcc..346727ca55 100644 --- a/xbmc/PlayListPlayer.cpp +++ b/xbmc/PlayListPlayer.cpp @@ -41,11 +41,12 @@ #include "video/VideoDatabase.h" #include "video/VideoFileItemClassify.h" -using namespace PLAYLIST; -using namespace KODI; using namespace KODI::MESSAGING; using namespace KODI::VIDEO; +namespace KODI::PLAYLIST +{ + CPlayListPlayer::CPlayListPlayer(void) { m_PlaylistMusic = new CPlayList(Id::TYPE_MUSIC); @@ -1081,3 +1082,5 @@ void PLAYLIST::CPlayListPlayer::OnApplicationMessage(KODI::MESSAGING::ThreadMess break; } } + +} // namespace KODI::PLAYLIST diff --git a/xbmc/PlayListPlayer.h b/xbmc/PlayListPlayer.h index 30ee4666da..6dbb13a4b4 100644 --- a/xbmc/PlayListPlayer.h +++ b/xbmc/PlayListPlayer.h @@ -22,7 +22,7 @@ class CFileItemList; class CVariant; -namespace PLAYLIST +namespace KODI::PLAYLIST { class CPlayList; @@ -93,24 +93,24 @@ public: int GetNextItemIdx(int offset) const; /*! \brief Set the active playlist - \param id Values can be PLAYLIST::TYPE_NONE, PLAYLIST::TYPE_MUSIC or PLAYLIST::TYPE_VIDEO + \param id Id of playlist \sa GetCurrentPlaylist */ - void SetCurrentPlaylist(PLAYLIST::Id playlistId); + void SetCurrentPlaylist(Id playlistId); /*! \brief Get the currently active playlist - \return PLAYLIST::TYPE_NONE, PLAYLIST::TYPE_MUSIC or PLAYLIST::TYPE_VIDEO + \return Id of playlist \sa SetCurrentPlaylist, GetPlaylist */ - PLAYLIST::Id GetCurrentPlaylist() const; + Id GetCurrentPlaylist() const; /*! \brief Get a particular playlist object - \param id Values can be PLAYLIST::TYPE_MUSIC or PLAYLIST::TYPE_VIDEO + \param id Id of playlist \return A reference to the CPlayList object. \sa GetCurrentPlaylist */ - CPlayList& GetPlaylist(PLAYLIST::Id playlistId); - const CPlayList& GetPlaylist(PLAYLIST::Id playlistId) const; + CPlayList& GetPlaylist(Id playlistId); + const CPlayList& GetPlaylist(Id playlistId) const; /*! \brief Removes any item from all playlists located on a removable share \return Number of items removed from PLAYLIST::TYPE_MUSIC and PLAYLIST::TYPE_VIDEO @@ -122,7 +122,7 @@ public: */ void Reset(); - void ClearPlaylist(PLAYLIST::Id playlistId); + void ClearPlaylist(Id playlistId); void Clear(); /*! \brief Set shuffle state of a playlist. @@ -133,7 +133,7 @@ public: \param notify notify the user with a Toast notification (defaults to false) \sa IsShuffled */ - void SetShuffle(PLAYLIST::Id playlistId, bool shuffle, bool notify = false); + void SetShuffle(Id playlistId, bool shuffle, bool notify = false); /*! \brief Return whether a playlist is shuffled. If partymode is enabled, this always returns false. @@ -141,7 +141,7 @@ public: \return true if the given playlist is shuffled and party mode isn't enabled, false otherwise. \sa SetShuffle */ - bool IsShuffled(PLAYLIST::Id playlistId) const; + bool IsShuffled(Id playlistId) const; /*! \brief Return whether or not something has been played yet from the current playlist. \return true if something has been played, false otherwise. @@ -155,38 +155,39 @@ public: \param notify notify the user with a Toast notification \sa GetRepeat */ - void SetRepeat(PLAYLIST::Id playlistId, PLAYLIST::RepeatState state, bool notify = false); - PLAYLIST::RepeatState GetRepeat(PLAYLIST::Id playlistId) const; + void SetRepeat(Id playlistId, RepeatState state, bool notify = false); + RepeatState GetRepeat(Id playlistId) const; // add items via the playlist player - void Add(PLAYLIST::Id playlistId, const CPlayList& playlist); - void Add(PLAYLIST::Id playlistId, const CFileItemPtr& pItem); - void Add(PLAYLIST::Id playlistId, const CFileItemList& items); - void Insert(PLAYLIST::Id playlistId, const CPlayList& playlist, int iIndex); - void Insert(PLAYLIST::Id playlistId, const CFileItemPtr& pItem, int iIndex); - void Insert(PLAYLIST::Id playlistId, const CFileItemList& items, int iIndex); - void Remove(PLAYLIST::Id playlistId, int iPosition); - void Swap(PLAYLIST::Id playlistId, int indexItem1, int indexItem2); + void Add(Id playlistId, const CPlayList& playlist); + void Add(Id playlistId, const CFileItemPtr& pItem); + void Add(Id playlistId, const CFileItemList& items); + void Insert(Id playlistId, const CPlayList& playlist, int iIndex); + void Insert(Id playlistId, const CFileItemPtr& pItem, int iIndex); + void Insert(Id playlistId, const CFileItemList& items, int iIndex); + void Remove(Id playlistId, int iPosition); + void Swap(Id playlistId, int indexItem1, int indexItem2); bool IsSingleItemNonRepeatPlaylist() const; bool OnAction(const CAction &action); + protected: /*! \brief Returns true if the given is set to repeat all \param playlist Playlist to be query \return true if the given playlist is set to repeat all, false otherwise. */ - bool Repeated(PLAYLIST::Id playlistId) const; + bool Repeated(Id playlistId) const; /*! \brief Returns true if the given is set to repeat one \param playlist Playlist to be query \return true if the given playlist is set to repeat one, false otherwise. */ - bool RepeatedOne(PLAYLIST::Id playlistId) const; + bool RepeatedOne(Id playlistId) const; - void ReShuffle(PLAYLIST::Id playlistId, int iPosition); + void ReShuffle(Id playlistId, int iPosition); - void AnnouncePropertyChanged(PLAYLIST::Id playlistId, + void AnnouncePropertyChanged(Id playlistId, const std::string& strProperty, const CVariant& value); @@ -195,15 +196,15 @@ protected: int m_iFailedSongs; std::chrono::time_point<std::chrono::steady_clock> m_failedSongsStart; int m_iCurrentSong; - PLAYLIST::Id m_iCurrentPlayList{PLAYLIST::Id::TYPE_NONE}; + Id m_iCurrentPlayList{Id::TYPE_NONE}; CPlayList* m_PlaylistMusic; CPlayList* m_PlaylistVideo; CPlayList* m_PlaylistEmpty; - std::map<PLAYLIST::Id, PLAYLIST::RepeatState> m_repeatState{ - {PLAYLIST::Id::TYPE_MUSIC, PLAYLIST::RepeatState::NONE}, - {PLAYLIST::Id::TYPE_VIDEO, PLAYLIST::RepeatState::NONE}, - {PLAYLIST::Id::TYPE_PICTURE, PLAYLIST::RepeatState::NONE}, + std::map<Id, RepeatState> m_repeatState{ + {Id::TYPE_MUSIC, RepeatState::NONE}, + {Id::TYPE_VIDEO, RepeatState::NONE}, + {Id::TYPE_PICTURE, RepeatState::NONE}, }; }; -} +} // namespace KODI::PLAYLIST diff --git a/xbmc/ServiceBroker.h b/xbmc/ServiceBroker.h index 659b07d61d..d5f00b6e00 100644 --- a/xbmc/ServiceBroker.h +++ b/xbmc/ServiceBroker.h @@ -37,7 +37,7 @@ namespace PVR class CPVRManager; } -namespace PLAYLIST +namespace KODI::PLAYLIST { class CPlayListPlayer; } @@ -152,7 +152,7 @@ public: static CContextMenuManager& GetContextMenuManager(); static CDataCacheCore& GetDataCacheCore(); static CPlatform& GetPlatform(); - static PLAYLIST::CPlayListPlayer& GetPlaylistPlayer(); + static KODI::PLAYLIST::CPlayListPlayer& GetPlaylistPlayer(); static CSlideShowDelegator& GetSlideShowDelegator(); static KODI::GAME::CControllerManager& GetGameControllerManager(); static KODI::GAME::CGameServices& GetGameServices(); diff --git a/xbmc/ServiceManager.h b/xbmc/ServiceManager.h index 6dcc28cbd0..2896166c23 100644 --- a/xbmc/ServiceManager.h +++ b/xbmc/ServiceManager.h @@ -27,7 +27,7 @@ namespace PVR class CPVRManager; } -namespace PLAYLIST +namespace KODI::PLAYLIST { class CPlayListPlayer; } @@ -127,7 +127,7 @@ public: KODI::RETRO::CGUIGameRenderManager& GetGameRenderManager(); PERIPHERALS::CPeripherals& GetPeripherals(); - PLAYLIST::CPlayListPlayer& GetPlaylistPlayer(); + KODI::PLAYLIST::CPlayListPlayer& GetPlaylistPlayer(); CSlideShowDelegator& GetSlideShowDelegator(); int init_level = 0; @@ -167,7 +167,7 @@ protected: std::unique_ptr<CContextMenuManager> m_contextMenuManager; std::unique_ptr<CDataCacheCore> m_dataCacheCore; std::unique_ptr<CPlatform> m_Platform; - std::unique_ptr<PLAYLIST::CPlayListPlayer> m_playlistPlayer; + std::unique_ptr<KODI::PLAYLIST::CPlayListPlayer> m_playlistPlayer; std::unique_ptr<KODI::GAME::CControllerManager> m_gameControllerManager; std::unique_ptr<KODI::GAME::CGameServices> m_gameServices; std::unique_ptr<KODI::RETRO::CGUIGameRenderManager> m_gameRenderManager; diff --git a/xbmc/Util.cpp b/xbmc/Util.cpp index 82cc638bee..eb10ab14fc 100644 --- a/xbmc/Util.cpp +++ b/xbmc/Util.cpp @@ -92,7 +92,6 @@ using namespace MEDIA_DETECT; #endif using namespace XFILE; -using namespace PLAYLIST; using KODI::UTILITY::CDigest; using namespace KODI; diff --git a/xbmc/application/Application.cpp b/xbmc/application/Application.cpp index 3ef61f4571..12470ca7a7 100644 --- a/xbmc/application/Application.cpp +++ b/xbmc/application/Application.cpp @@ -2176,7 +2176,7 @@ bool CApplication::PlayMedia(CFileItem& item, const std::string& player, PLAYLIS CUtil::GetRecursiveListing(item.GetPath(), items, "", DIR_FLAG_NO_FILE_DIRS); if (items.Size()) { - CSmartPlaylist smartpl; + PLAYLIST::CSmartPlaylist smartpl; //get name and type of smartplaylist, this will always succeed as GetDirectory also did this. smartpl.OpenAndReadName(item.GetURL()); PLAYLIST::CPlayList playlist; diff --git a/xbmc/application/Application.h b/xbmc/application/Application.h index d31e591bcd..50b9fc4615 100644 --- a/xbmc/application/Application.h +++ b/xbmc/application/Application.h @@ -59,7 +59,7 @@ namespace MEDIA_DETECT class CAutorun; } -namespace PLAYLIST +namespace KODI::PLAYLIST { class CPlayList; } @@ -120,10 +120,10 @@ public: int GetMessageMask() override; void OnApplicationMessage(KODI::MESSAGING::ThreadMessage* pMsg) override; - bool PlayMedia(CFileItem& item, const std::string& player, PLAYLIST::Id playlistId); + bool PlayMedia(CFileItem& item, const std::string& player, KODI::PLAYLIST::Id playlistId); bool ProcessAndStartPlaylist(const std::string& strPlayList, - PLAYLIST::CPlayList& playlist, - PLAYLIST::Id playlistId, + KODI::PLAYLIST::CPlayList& playlist, + KODI::PLAYLIST::Id playlistId, int track = 0); bool PlayFile(CFileItem item, const std::string& player, diff --git a/xbmc/application/ApplicationPlayer.h b/xbmc/application/ApplicationPlayer.h index f0c04b1594..d695f66aef 100644 --- a/xbmc/application/ApplicationPlayer.h +++ b/xbmc/application/ApplicationPlayer.h @@ -95,7 +95,7 @@ public: int64_t GetChapterPos(int chapterIdx = -1) const; float GetPercentage() const; std::string GetPlayerState(); - PLAYLIST::Id GetPreferredPlaylist() const; + KODI::PLAYLIST::Id GetPreferredPlaylist() const; int GetSubtitleDelay() const; int GetSubtitle(); void GetSubtitleCapabilities(std::vector<int>& subCaps) const; diff --git a/xbmc/dialogs/GUIDialogMediaFilter.cpp b/xbmc/dialogs/GUIDialogMediaFilter.cpp index 55b1013967..df904cb354 100644 --- a/xbmc/dialogs/GUIDialogMediaFilter.cpp +++ b/xbmc/dialogs/GUIDialogMediaFilter.cpp @@ -31,6 +31,8 @@ #include "video/VideoDatabase.h" #include "video/VideoDbUrl.h" +using namespace KODI; + #define CONTROL_HEADING 2 #define CONTROL_OKAY_BUTTON 28 @@ -186,7 +188,8 @@ bool CGUIDialogMediaFilter::OnMessage(CGUIMessage& message) return CGUIDialogSettingsManualBase::OnMessage(message); } -void CGUIDialogMediaFilter::ShowAndEditMediaFilter(const std::string &path, CSmartPlaylist &filter) +void CGUIDialogMediaFilter::ShowAndEditMediaFilter(const std::string& path, + PLAYLIST::CSmartPlaylist& filter) { CGUIDialogMediaFilter *dialog = CServiceBroker::GetGUI()->GetWindowManager().GetWindow<CGUIDialogMediaFilter>(WINDOW_DIALOG_MEDIA_FILTER); if (dialog == NULL) @@ -411,7 +414,7 @@ void CGUIDialogMediaFilter::InitializeSettings() { if (rule->m_field == filter.field) { - filter.rule = static_cast<CSmartPlaylistRule*>(rule.get()); + filter.rule = static_cast<PLAYLIST::CSmartPlaylistRule*>(rule.get()); handledRules++; break; } @@ -644,7 +647,7 @@ int CGUIDialogMediaFilter::GetItems(const Filter &filter, std::vector<std::strin CFileItemList selectItems; // remove the rule for the field of the filter we want to retrieve items for - CSmartPlaylist tmpFilter = *m_filter; + PLAYLIST::CSmartPlaylist tmpFilter = *m_filter; for (CDatabaseQueryRules::iterator rule = tmpFilter.m_ruleCombination.m_rules.begin(); rule != tmpFilter.m_ruleCombination.m_rules.end(); ++rule) { @@ -730,14 +733,17 @@ int CGUIDialogMediaFilter::GetItems(const Filter &filter, std::vector<std::strin return items.size(); } -CSmartPlaylistRule* CGUIDialogMediaFilter::AddRule(Field field, CDatabaseQueryRule::SEARCH_OPERATOR ruleOperator /* = CDatabaseQueryRule::OPERATOR_CONTAINS */) +PLAYLIST::CSmartPlaylistRule* CGUIDialogMediaFilter::AddRule( + Field field, + CDatabaseQueryRule::SEARCH_OPERATOR ruleOperator /* = CDatabaseQueryRule::OPERATOR_CONTAINS */) { - CSmartPlaylistRule rule; + PLAYLIST::CSmartPlaylistRule rule; rule.m_field = field; rule.m_operator = ruleOperator; m_filter->m_ruleCombination.AddRule(rule); - return (CSmartPlaylistRule *)m_filter->m_ruleCombination.m_rules.back().get(); + return static_cast<PLAYLIST::CSmartPlaylistRule*>( + m_filter->m_ruleCombination.m_rules.back().get()); } void CGUIDialogMediaFilter::DeleteRule(Field field) diff --git a/xbmc/dialogs/GUIDialogMediaFilter.h b/xbmc/dialogs/GUIDialogMediaFilter.h index 893f1c20c3..8bf931bdd7 100644 --- a/xbmc/dialogs/GUIDialogMediaFilter.h +++ b/xbmc/dialogs/GUIDialogMediaFilter.h @@ -21,8 +21,11 @@ class CDbUrl; class CSetting; +namespace KODI::PLAYLIST +{ class CSmartPlaylist; class CSmartPlaylistRule; +} // namespace KODI::PLAYLIST struct StringSettingOption; class CGUIDialogMediaFilter : public CGUIDialogSettingsManualBase @@ -34,7 +37,8 @@ public: // specializations of CGUIControl bool OnMessage(CGUIMessage &message) override; - static void ShowAndEditMediaFilter(const std::string &path, CSmartPlaylist &filter); + static void ShowAndEditMediaFilter(const std::string& path, + KODI::PLAYLIST::CSmartPlaylist& filter); struct Filter { @@ -46,7 +50,7 @@ public: std::string controlFormat; CDatabaseQueryRule::SEARCH_OPERATOR ruleOperator; std::shared_ptr<CSetting> setting = nullptr; - CSmartPlaylistRule* rule = nullptr; + KODI::PLAYLIST::CSmartPlaylistRule* rule = nullptr; void* data = nullptr; }; @@ -77,7 +81,9 @@ protected: void GetRange(const Filter &filter, float &min, float &interval, float &max); bool GetMinMax(const std::string &table, const std::string &field, int &min, int &max, const CDatabase::Filter &filter = CDatabase::Filter()); - CSmartPlaylistRule* AddRule(Field field, CDatabaseQueryRule::SEARCH_OPERATOR ruleOperator = CDatabaseQueryRule::OPERATOR_CONTAINS); + KODI::PLAYLIST::CSmartPlaylistRule* AddRule( + Field field, + CDatabaseQueryRule::SEARCH_OPERATOR ruleOperator = CDatabaseQueryRule::OPERATOR_CONTAINS); void DeleteRule(Field field); static void GetStringListOptions(const std::shared_ptr<const CSetting>& setting, @@ -87,6 +93,6 @@ protected: CDbUrl* m_dbUrl; std::string m_mediaType; - CSmartPlaylist *m_filter; + KODI::PLAYLIST::CSmartPlaylist* m_filter; std::map<std::string, Filter> m_filters; }; diff --git a/xbmc/dialogs/GUIDialogSmartPlaylistEditor.cpp b/xbmc/dialogs/GUIDialogSmartPlaylistEditor.cpp index 24a0675c40..ddfd0d9d0a 100644 --- a/xbmc/dialogs/GUIDialogSmartPlaylistEditor.cpp +++ b/xbmc/dialogs/GUIDialogSmartPlaylistEditor.cpp @@ -31,6 +31,8 @@ #include <utility> +using namespace KODI; + #define CONTROL_HEADING 2 #define CONTROL_RULE_LIST 10 #define CONTROL_NAME 12 @@ -209,7 +211,8 @@ void CGUIDialogSmartPlaylistEditor::OnRuleList(int item) OnRuleAdd(); else { - CSmartPlaylistRule rule = *std::static_pointer_cast<CSmartPlaylistRule>(m_playlist.m_ruleCombination.m_rules[item]); + auto rule = *std::static_pointer_cast<PLAYLIST::CSmartPlaylistRule>( + m_playlist.m_ruleCombination.m_rules[item]); if (CGUIDialogSmartPlaylistRule::EditRule(rule, m_playlist.GetType())) *m_playlist.m_ruleCombination.m_rules[item] = rule; } @@ -268,10 +271,11 @@ void CGUIDialogSmartPlaylistEditor::OnCancel() void CGUIDialogSmartPlaylistEditor::OnMatch() { // toggle between AND and OR setting - if (m_playlist.m_ruleCombination.GetType() == CSmartPlaylistRuleCombination::CombinationOr) - m_playlist.m_ruleCombination.SetType(CSmartPlaylistRuleCombination::CombinationAnd); + if (m_playlist.m_ruleCombination.GetType() == + PLAYLIST::CSmartPlaylistRuleCombination::CombinationOr) + m_playlist.m_ruleCombination.SetType(PLAYLIST::CSmartPlaylistRuleCombination::CombinationAnd); else - m_playlist.m_ruleCombination.SetType(CSmartPlaylistRuleCombination::CombinationOr); + m_playlist.m_ruleCombination.SetType(PLAYLIST::CSmartPlaylistRuleCombination::CombinationOr); UpdateButtons(); } @@ -327,12 +331,12 @@ void CGUIDialogSmartPlaylistEditor::OnType() m_playlist.SetType(ConvertType(allowedTypes[newSelected])); // Remove any invalid grouping left over when changing the type - Field currentGroup = CSmartPlaylistRule::TranslateGroup(m_playlist.GetGroup().c_str()); + Field currentGroup = PLAYLIST::CSmartPlaylistRule::TranslateGroup(m_playlist.GetGroup().c_str()); if (currentGroup != FieldNone && currentGroup != FieldUnknown) { - std::vector<Field> groups = CSmartPlaylistRule::GetGroups(m_playlist.GetType()); + std::vector<Field> groups = PLAYLIST::CSmartPlaylistRule::GetGroups(m_playlist.GetType()); if (std::find(groups.begin(), groups.end(), currentGroup) == groups.end()) - m_playlist.SetGroup(CSmartPlaylistRule::TranslateGroup(FieldUnknown)); + m_playlist.SetGroup(PLAYLIST::CSmartPlaylistRule::TranslateGroup(FieldUnknown)); } UpdateButtons(); @@ -340,7 +344,7 @@ void CGUIDialogSmartPlaylistEditor::OnType() void CGUIDialogSmartPlaylistEditor::OnOrder() { - std::vector<SortBy> orders = CSmartPlaylistRule::GetOrders(m_playlist.GetType()); + std::vector<SortBy> orders = PLAYLIST::CSmartPlaylistRule::GetOrders(m_playlist.GetType()); CGUIDialogSelect* dialog = CServiceBroker::GetGUI()->GetWindowManager().GetWindow<CGUIDialogSelect>(WINDOW_DIALOG_SELECT); dialog->Reset(); for (auto order: orders) @@ -366,22 +370,22 @@ void CGUIDialogSmartPlaylistEditor::OnOrderDirection() void CGUIDialogSmartPlaylistEditor::OnGroupBy() { - std::vector<Field> groups = CSmartPlaylistRule::GetGroups(m_playlist.GetType()); - Field currentGroup = CSmartPlaylistRule::TranslateGroup(m_playlist.GetGroup().c_str()); + std::vector<Field> groups = PLAYLIST::CSmartPlaylistRule::GetGroups(m_playlist.GetType()); + Field currentGroup = PLAYLIST::CSmartPlaylistRule::TranslateGroup(m_playlist.GetGroup().c_str()); CGUIDialogSelect* dialog = CServiceBroker::GetGUI()->GetWindowManager().GetWindow<CGUIDialogSelect>(WINDOW_DIALOG_SELECT); dialog->Reset(); for (auto group : groups) - dialog->Add(CSmartPlaylistRule::GetLocalizedGroup(group)); + dialog->Add(PLAYLIST::CSmartPlaylistRule::GetLocalizedGroup(group)); dialog->SetHeading(CVariant{ 21458 }); - dialog->SetSelected(CSmartPlaylistRule::GetLocalizedGroup(currentGroup)); + dialog->SetSelected(PLAYLIST::CSmartPlaylistRule::GetLocalizedGroup(currentGroup)); dialog->Open(); int newSelected = dialog->GetSelectedItem(); // check if selection has changed if (!dialog->IsConfirmed() || newSelected < 0 || groups[newSelected] == currentGroup) return; - m_playlist.SetGroup(CSmartPlaylistRule::TranslateGroup(groups[newSelected])); + m_playlist.SetGroup(PLAYLIST::CSmartPlaylistRule::TranslateGroup(groups[newSelected])); - if (m_playlist.IsGroupMixed() && !CSmartPlaylistRule::CanGroupMix(currentGroup)) + if (m_playlist.IsGroupMixed() && !PLAYLIST::CSmartPlaylistRule::CanGroupMix(currentGroup)) m_playlist.SetGroupMixed(false); UpdateButtons(); @@ -407,7 +411,8 @@ void CGUIDialogSmartPlaylistEditor::UpdateButtons() UpdateRuleControlButtons(); - if (m_playlist.m_ruleCombination.GetType() == CSmartPlaylistRuleCombination::CombinationOr) + if (m_playlist.m_ruleCombination.GetType() == + PLAYLIST::CSmartPlaylistRuleCombination::CombinationOr) SET_CONTROL_LABEL2(CONTROL_MATCH, g_localizeStrings.Get(21426)); // one or more of the rules else SET_CONTROL_LABEL2(CONTROL_MATCH, g_localizeStrings.Get(21425)); // all of the rules @@ -424,7 +429,8 @@ void CGUIDialogSmartPlaylistEditor::UpdateButtons() for (const auto& rule: m_playlist.m_ruleCombination.m_rules) { CFileItemPtr item(new CFileItem("", false)); - item->SetLabel(std::static_pointer_cast<CSmartPlaylistRule>(rule)->GetLocalizedRule()); + item->SetLabel( + std::static_pointer_cast<PLAYLIST::CSmartPlaylistRule>(rule)->GetLocalizedRule()); m_ruleLabels->Add(item); } CFileItemPtr item(new CFileItem("", false)); @@ -447,9 +453,10 @@ void CGUIDialogSmartPlaylistEditor::UpdateButtons() SET_CONTROL_LABEL2(CONTROL_TYPE, GetLocalizedType(ConvertType(m_playlist.GetType()))); // setup groups - std::vector<Field> groups = CSmartPlaylistRule::GetGroups(m_playlist.GetType()); - Field currentGroup = CSmartPlaylistRule::TranslateGroup(m_playlist.GetGroup().c_str()); - SET_CONTROL_LABEL2(CONTROL_GROUP_BY, CSmartPlaylistRule::GetLocalizedGroup(currentGroup)); + std::vector<Field> groups = PLAYLIST::CSmartPlaylistRule::GetGroups(m_playlist.GetType()); + Field currentGroup = PLAYLIST::CSmartPlaylistRule::TranslateGroup(m_playlist.GetGroup().c_str()); + SET_CONTROL_LABEL2(CONTROL_GROUP_BY, + PLAYLIST::CSmartPlaylistRule::GetLocalizedGroup(currentGroup)); if (m_playlist.IsGroupMixed()) CONTROL_SELECT(CONTROL_GROUP_MIXED); else @@ -458,7 +465,7 @@ void CGUIDialogSmartPlaylistEditor::UpdateButtons() // disable the group controls if there's no group // or only one group which can't be mixed if (groups.empty() || - (groups.size() == 1 && !CSmartPlaylistRule::CanGroupMix(groups[0]))) + (groups.size() == 1 && !PLAYLIST::CSmartPlaylistRule::CanGroupMix(groups[0]))) { CONTROL_DISABLE(CONTROL_GROUP_BY); CONTROL_DISABLE(CONTROL_GROUP_MIXED); @@ -466,7 +473,8 @@ void CGUIDialogSmartPlaylistEditor::UpdateButtons() else { CONTROL_ENABLE(CONTROL_GROUP_BY); - CONTROL_ENABLE_ON_CONDITION(CONTROL_GROUP_MIXED, CSmartPlaylistRule::CanGroupMix(currentGroup)); + CONTROL_ENABLE_ON_CONDITION(CONTROL_GROUP_MIXED, + PLAYLIST::CSmartPlaylistRule::CanGroupMix(currentGroup)); } } @@ -601,7 +609,7 @@ void CGUIDialogSmartPlaylistEditor::OnRuleRemove(int item) void CGUIDialogSmartPlaylistEditor::OnRuleAdd() { - CSmartPlaylistRule rule; + PLAYLIST::CSmartPlaylistRule rule; if (CGUIDialogSmartPlaylistRule::EditRule(rule,m_playlist.GetType())) m_playlist.m_ruleCombination.AddRule(rule); UpdateButtons(); @@ -613,7 +621,7 @@ bool CGUIDialogSmartPlaylistEditor::NewPlaylist(const std::string &type) if (!editor) return false; editor->m_path = ""; - editor->m_playlist = CSmartPlaylist(); + editor->m_playlist = PLAYLIST::CSmartPlaylist(); editor->m_mode = type; editor->Initialize(); editor->Open(); @@ -631,7 +639,7 @@ bool CGUIDialogSmartPlaylistEditor::EditPlaylist(const std::string &path, const if (URIUtils::PathEquals(path, CServiceBroker::GetSettingsComponent()->GetProfileManager()->GetUserDataItem("PartyMode-Video.xsp"))) editor->m_mode = "partyvideo"; - CSmartPlaylist playlist; + PLAYLIST::CSmartPlaylist playlist; bool loaded(playlist.Load(path)); if (!loaded) { // failed to load diff --git a/xbmc/dialogs/GUIDialogSmartPlaylistEditor.h b/xbmc/dialogs/GUIDialogSmartPlaylistEditor.h index c754f91cc6..3c0c889dcb 100644 --- a/xbmc/dialogs/GUIDialogSmartPlaylistEditor.h +++ b/xbmc/dialogs/GUIDialogSmartPlaylistEditor.h @@ -53,7 +53,7 @@ protected: std::string ConvertType(PLAYLIST_TYPE type); std::string GetLocalizedType(PLAYLIST_TYPE type); - CSmartPlaylist m_playlist; + KODI::PLAYLIST::CSmartPlaylist m_playlist; // our list of rules for display purposes CFileItemList* m_ruleLabels; diff --git a/xbmc/dialogs/GUIDialogSmartPlaylistRule.cpp b/xbmc/dialogs/GUIDialogSmartPlaylistRule.cpp index 9040f48340..396bea02cf 100644 --- a/xbmc/dialogs/GUIDialogSmartPlaylistRule.cpp +++ b/xbmc/dialogs/GUIDialogSmartPlaylistRule.cpp @@ -30,6 +30,8 @@ #include <utility> +using namespace KODI; + #define CONTROL_FIELD 15 #define CONTROL_OPERATOR 16 #define CONTROL_VALUE 17 @@ -101,7 +103,7 @@ void CGUIDialogSmartPlaylistRule::OnBrowse() videodatabase.Open(); std::string basePath; - if (CSmartPlaylist::IsMusicType(m_type)) + if (PLAYLIST::CSmartPlaylist::IsMusicType(m_type)) basePath = "musicdb://"; else basePath = "videodb://"; @@ -177,7 +179,7 @@ void CGUIDialogSmartPlaylistRule::OnBrowse() } else if (m_rule.m_field == FieldArtist || m_rule.m_field == FieldAlbumArtist) { - if (CSmartPlaylist::IsMusicType(m_type)) + if (PLAYLIST::CSmartPlaylist::IsMusicType(m_type)) database.GetArtistsNav("musicdb://artists/", items, m_rule.m_field == FieldAlbumArtist, -1); if (m_type == "musicvideos" || m_type == "mixed") @@ -190,7 +192,7 @@ void CGUIDialogSmartPlaylistRule::OnBrowse() } else if (m_rule.m_field == FieldAlbum) { - if (CSmartPlaylist::IsMusicType(m_type)) + if (PLAYLIST::CSmartPlaylist::IsMusicType(m_type)) database.GetAlbumsNav("musicdb://albums/", items); if (m_type == "musicvideos" || m_type == "mixed") @@ -208,9 +210,9 @@ void CGUIDialogSmartPlaylistRule::OnBrowse() } else if (m_rule.m_field == FieldYear) { - if (CSmartPlaylist::IsMusicType(m_type)) + if (PLAYLIST::CSmartPlaylist::IsMusicType(m_type)) database.GetYearsNav("musicdb://years/", items); - if (CSmartPlaylist::IsVideoType(m_type)) + if (PLAYLIST::CSmartPlaylist::IsVideoType(m_type)) { CFileItemList items2; videodatabase.GetYearsNav(basePath + "years/", items2, type); @@ -278,9 +280,9 @@ void CGUIDialogSmartPlaylistRule::OnBrowse() // Note: This can cause infinite loops (playlist that refers to the same playlist) but I don't // think there's any decent way to deal with this, as the infinite loop may be an arbitrary // number of playlists deep, eg playlist1 -> playlist2 -> playlist3 ... -> playlistn -> playlist1 - if (CSmartPlaylist::IsVideoType(m_type)) + if (PLAYLIST::CSmartPlaylist::IsVideoType(m_type)) XFILE::CDirectory::GetDirectory("special://videoplaylists/", items, ".xsp", XFILE::DIR_FLAG_NO_FILE_DIRS); - if (CSmartPlaylist::IsMusicType(m_type)) + if (PLAYLIST::CSmartPlaylist::IsMusicType(m_type)) { CFileItemList items2; XFILE::CDirectory::GetDirectory("special://musicplaylists/", items2, ".xsp", XFILE::DIR_FLAG_NO_FILE_DIRS); @@ -290,13 +292,13 @@ void CGUIDialogSmartPlaylistRule::OnBrowse() for (int i = 0; i < items.Size(); i++) { CFileItemPtr item = items[i]; - CSmartPlaylist playlist; + PLAYLIST::CSmartPlaylist playlist; // don't list unloadable smartplaylists or any referenceable smartplaylists // which do not match the type of the current smartplaylist if (!playlist.Load(item->GetPath()) || - (m_rule.m_field == FieldPlaylist && - (!CSmartPlaylist::CheckTypeCompatibility(m_type, playlist.GetType()) || - (!playlist.GetGroup().empty() || playlist.IsGroupMixed())))) + (m_rule.m_field == FieldPlaylist && + (!PLAYLIST::CSmartPlaylist::CheckTypeCompatibility(m_type, playlist.GetType()) || + (!playlist.GetGroup().empty() || playlist.IsGroupMixed())))) { items.Remove(i); i -= 1; @@ -313,7 +315,7 @@ void CGUIDialogSmartPlaylistRule::OnBrowse() VECSOURCES sources; if (m_type == "songs" || m_type == "mixed") sources = *CMediaSourceSettings::GetInstance().GetSources("music"); - if (CSmartPlaylist::IsVideoType(m_type)) + if (PLAYLIST::CSmartPlaylist::IsVideoType(m_type)) { VECSOURCES sources2 = *CMediaSourceSettings::GetInstance().GetSources("video"); sources.insert(sources.end(),sources2.begin(),sources2.end()); @@ -382,10 +384,11 @@ void CGUIDialogSmartPlaylistRule::OnBrowse() std::pair<std::string, int> OperatorLabel(CDatabaseQueryRule::SEARCH_OPERATOR op) { - return std::make_pair(CSmartPlaylistRule::GetLocalizedOperator(op), op); + return std::make_pair(PLAYLIST::CSmartPlaylistRule::GetLocalizedOperator(op), op); } -std::vector<std::pair<std::string, int>> CGUIDialogSmartPlaylistRule::GetValidOperators(const CSmartPlaylistRule& rule) +std::vector<std::pair<std::string, int>> CGUIDialogSmartPlaylistRule::GetValidOperators( + const PLAYLIST::CSmartPlaylistRule& rule) { std::vector< std::pair<std::string, int> > labels; switch (rule.GetFieldType(rule.m_field)) @@ -446,14 +449,14 @@ void CGUIDialogSmartPlaylistRule::OnCancel() void CGUIDialogSmartPlaylistRule::OnField() { - const auto fields = CSmartPlaylistRule::GetFields(m_type); + const auto fields = PLAYLIST::CSmartPlaylistRule::GetFields(m_type); CGUIDialogSelect* dialog = CServiceBroker::GetGUI()->GetWindowManager().GetWindow<CGUIDialogSelect>(WINDOW_DIALOG_SELECT); dialog->Reset(); dialog->SetHeading(CVariant{20427}); int selected = -1; for (auto field = fields.begin(); field != fields.end(); field++) { - dialog->Add(CSmartPlaylistRule::GetLocalizedField(*field)); + dialog->Add(PLAYLIST::CSmartPlaylistRule::GetLocalizedField(*field)); if (*field == m_rule.m_field) selected = std::distance(fields.begin(), field); } @@ -487,7 +490,7 @@ void CGUIDialogSmartPlaylistRule::OnOperator() dialog->SetHeading(CVariant{ 16023 }); for (auto label : labels) dialog->Add(std::get<0>(label)); - dialog->SetSelected(CSmartPlaylistRule::GetLocalizedOperator(m_rule.m_operator)); + dialog->SetSelected(PLAYLIST::CSmartPlaylistRule::GetLocalizedOperator(m_rule.m_operator)); dialog->Open(); int newSelected = dialog->GetSelectedItem(); // check if selection has changed @@ -501,11 +504,11 @@ void CGUIDialogSmartPlaylistRule::OnOperator() void CGUIDialogSmartPlaylistRule::UpdateButtons() { if (m_rule.m_field == 0) - m_rule.m_field = CSmartPlaylistRule::GetFields(m_type)[0]; - SET_CONTROL_LABEL(CONTROL_FIELD, CSmartPlaylistRule::GetLocalizedField(m_rule.m_field)); + m_rule.m_field = PLAYLIST::CSmartPlaylistRule::GetFields(m_type)[0]; + SET_CONTROL_LABEL(CONTROL_FIELD, PLAYLIST::CSmartPlaylistRule::GetLocalizedField(m_rule.m_field)); CONTROL_ENABLE(CONTROL_VALUE); - if (CSmartPlaylistRule::IsFieldBrowseable(m_rule.m_field)) + if (PLAYLIST::CSmartPlaylistRule::IsFieldBrowseable(m_rule.m_field)) CONTROL_ENABLE(CONTROL_BROWSE); else CONTROL_DISABLE(CONTROL_BROWSE); @@ -549,7 +552,7 @@ void CGUIDialogSmartPlaylistRule::OnInitWindow() CGUIEditControl *editControl = dynamic_cast<CGUIEditControl*>(GetControl(CONTROL_VALUE)); if (editControl != NULL) - editControl->SetInputValidation(CSmartPlaylistRule::Validate, &m_rule); + editControl->SetInputValidation(PLAYLIST::CSmartPlaylistRule::Validate, &m_rule); } void CGUIDialogSmartPlaylistRule::OnDeinitWindow(int nextWindowID) @@ -562,7 +565,8 @@ void CGUIDialogSmartPlaylistRule::OnDeinitWindow(int nextWindowID) SendMessage(GUI_MSG_LABEL_RESET, CONTROL_OPERATOR); } -bool CGUIDialogSmartPlaylistRule::EditRule(CSmartPlaylistRule &rule, const std::string& type) +bool CGUIDialogSmartPlaylistRule::EditRule(PLAYLIST::CSmartPlaylistRule& rule, + const std::string& type) { CGUIDialogSmartPlaylistRule *editor = CServiceBroker::GetGUI()->GetWindowManager().GetWindow<CGUIDialogSmartPlaylistRule>(WINDOW_DIALOG_SMART_PLAYLIST_RULE); if (!editor) return false; diff --git a/xbmc/dialogs/GUIDialogSmartPlaylistRule.h b/xbmc/dialogs/GUIDialogSmartPlaylistRule.h index 23ca11d0af..75127d33fa 100644 --- a/xbmc/dialogs/GUIDialogSmartPlaylistRule.h +++ b/xbmc/dialogs/GUIDialogSmartPlaylistRule.h @@ -22,7 +22,7 @@ public: void OnInitWindow() override; void OnDeinitWindow(int nextWindowID) override; - static bool EditRule(CSmartPlaylistRule &rule, const std::string& type="songs"); + static bool EditRule(KODI::PLAYLIST::CSmartPlaylistRule& rule, const std::string& type = "songs"); protected: void OnField(); @@ -31,8 +31,9 @@ protected: void OnCancel(); void UpdateButtons(); void OnBrowse(); - std::vector< std::pair<std::string, int> > GetValidOperators(const CSmartPlaylistRule& rule); - CSmartPlaylistRule m_rule; + std::vector<std::pair<std::string, int>> GetValidOperators( + const KODI::PLAYLIST::CSmartPlaylistRule& rule); + KODI::PLAYLIST::CSmartPlaylistRule m_rule; bool m_cancelled; std::string m_type; }; diff --git a/xbmc/filesystem/LibraryDirectory.cpp b/xbmc/filesystem/LibraryDirectory.cpp index ec5a16bfc0..6bd3146a3c 100644 --- a/xbmc/filesystem/LibraryDirectory.cpp +++ b/xbmc/filesystem/LibraryDirectory.cpp @@ -24,6 +24,7 @@ #include "utils/XMLUtils.h" #include "utils/log.h" +using namespace KODI; using namespace XFILE; CLibraryDirectory::CLibraryDirectory(void) = default; @@ -44,7 +45,7 @@ bool CLibraryDirectory::GetDirectory(const CURL& url, CFileItemList &items) std::string type = XMLUtils::GetAttribute(node, "type"); if (type == "filter") { - CSmartPlaylist playlist; + PLAYLIST::CSmartPlaylist playlist; std::string type, label; XMLUtils::GetString(node, "content", type); if (type.empty()) diff --git a/xbmc/filesystem/PlaylistDirectory.cpp b/xbmc/filesystem/PlaylistDirectory.cpp index 2141dd699a..8d77552ca4 100644 --- a/xbmc/filesystem/PlaylistDirectory.cpp +++ b/xbmc/filesystem/PlaylistDirectory.cpp @@ -15,6 +15,7 @@ #include "URL.h" #include "playlists/PlayList.h" +using namespace KODI; using namespace XFILE; CPlaylistDirectory::CPlaylistDirectory() = default; diff --git a/xbmc/filesystem/PlaylistFileDirectory.cpp b/xbmc/filesystem/PlaylistFileDirectory.cpp index 108c9c9a65..d95989067f 100644 --- a/xbmc/filesystem/PlaylistFileDirectory.cpp +++ b/xbmc/filesystem/PlaylistFileDirectory.cpp @@ -15,7 +15,7 @@ #include "playlists/PlayList.h" #include "playlists/PlayListFactory.h" -using namespace PLAYLIST; +using namespace KODI; namespace XFILE { @@ -26,14 +26,14 @@ namespace XFILE bool CPlaylistFileDirectory::GetDirectory(const CURL& url, CFileItemList& items) { const std::string pathToUrl = url.Get(); - std::unique_ptr<CPlayList> pPlayList (CPlayListFactory::Create(pathToUrl)); + std::unique_ptr<PLAYLIST::CPlayList> pPlayList(PLAYLIST::CPlayListFactory::Create(pathToUrl)); if (nullptr != pPlayList) { // load it if (!pPlayList->Load(pathToUrl)) return false; //hmmm unable to load playlist? - CPlayList playlist = *pPlayList; + PLAYLIST::CPlayList playlist = *pPlayList; // convert playlist items to songs for (int i = 0; i < playlist.size(); ++i) { @@ -48,7 +48,7 @@ namespace XFILE bool CPlaylistFileDirectory::ContainsFiles(const CURL& url) { const std::string pathToUrl = url.Get(); - std::unique_ptr<CPlayList> pPlayList (CPlayListFactory::Create(pathToUrl)); + std::unique_ptr<PLAYLIST::CPlayList> pPlayList(PLAYLIST::CPlayListFactory::Create(pathToUrl)); if (nullptr != pPlayList) { // load it @@ -64,5 +64,4 @@ namespace XFILE { return XFILE::CFile::Delete(url); } -} - + } // namespace XFILE diff --git a/xbmc/filesystem/SmartPlaylistDirectory.cpp b/xbmc/filesystem/SmartPlaylistDirectory.cpp index 3d4cffffad..8acddd21b6 100644 --- a/xbmc/filesystem/SmartPlaylistDirectory.cpp +++ b/xbmc/filesystem/SmartPlaylistDirectory.cpp @@ -26,7 +26,6 @@ #include "video/VideoDatabase.h" #include "video/VideoDbUrl.h" -#include <math.h> #include <memory> #define PROPERTY_PATH_DB "path.db" @@ -35,6 +34,8 @@ #define PROPERTY_GROUP_BY "group.by" #define PROPERTY_GROUP_MIXED "group.mixed" +using namespace KODI; + namespace XFILE { CSmartPlaylistDirectory::CSmartPlaylistDirectory() = default; @@ -44,7 +45,7 @@ namespace XFILE bool CSmartPlaylistDirectory::GetDirectory(const CURL& url, CFileItemList& items) { // Load in the SmartPlaylist and get the WHERE query - CSmartPlaylist playlist; + PLAYLIST::CSmartPlaylist playlist; if (!playlist.Load(url)) return false; bool result = GetDirectory(playlist, items); @@ -54,7 +55,10 @@ namespace XFILE return result; } - bool CSmartPlaylistDirectory::GetDirectory(const CSmartPlaylist &playlist, CFileItemList& items, const std::string &strBaseDir /* = "" */, bool filter /* = false */) + bool CSmartPlaylistDirectory::GetDirectory(const PLAYLIST::CSmartPlaylist& playlist, + CFileItemList& items, + const std::string& strBaseDir /* = "" */, + bool filter /* = false */) { bool success = false, success2 = false; std::vector<std::string> virtualFolders; @@ -159,7 +163,7 @@ namespace XFILE CMusicDatabase db; if (db.Open()) { - CSmartPlaylist plist(playlist); + PLAYLIST::CSmartPlaylist plist(playlist); if (playlist.GetType() == "mixed" || playlist.GetType().empty()) plist.SetType("songs"); @@ -217,7 +221,7 @@ namespace XFILE CVideoDatabase db; if (db.Open()) { - CSmartPlaylist mvidPlaylist(playlist); + PLAYLIST::CSmartPlaylist mvidPlaylist(playlist); if (playlist.GetType() == "mixed") mvidPlaylist.SetType("musicvideos"); @@ -323,7 +327,7 @@ namespace XFILE { CFileItemList list; bool filesExist = false; - if (CSmartPlaylist::IsMusicType(playlistType)) + if (PLAYLIST::CSmartPlaylist::IsMusicType(playlistType)) filesExist = CDirectory::GetDirectory("special://musicplaylists/", list, ".xsp", DIR_FLAG_DEFAULTS); else // all others are video filesExist = CDirectory::GetDirectory("special://videoplaylists/", list, ".xsp", DIR_FLAG_DEFAULTS); @@ -332,7 +336,7 @@ namespace XFILE for (int i = 0; i < list.Size(); i++) { CFileItemPtr item = list[i]; - CSmartPlaylist playlist; + PLAYLIST::CSmartPlaylist playlist; if (playlist.OpenAndReadName(item->GetURL())) { if (StringUtils::EqualsNoCase(playlist.GetName(), name)) diff --git a/xbmc/filesystem/SmartPlaylistDirectory.h b/xbmc/filesystem/SmartPlaylistDirectory.h index 145c2620d8..7cca5c67d7 100644 --- a/xbmc/filesystem/SmartPlaylistDirectory.h +++ b/xbmc/filesystem/SmartPlaylistDirectory.h @@ -12,7 +12,10 @@ #include <string> +namespace KODI::PLAYLIST +{ class CSmartPlaylist; +} namespace XFILE { @@ -26,7 +29,10 @@ namespace XFILE bool ContainsFiles(const CURL& url) override; bool Remove(const CURL& url) override; - static bool GetDirectory(const CSmartPlaylist &playlist, CFileItemList& items, const std::string &strBaseDir = "", bool filter = false); + static bool GetDirectory(const KODI::PLAYLIST::CSmartPlaylist& playlist, + CFileItemList& items, + const std::string& strBaseDir = "", + bool filter = false); static std::string GetPlaylistByName(const std::string& name, const std::string& playlistType); }; diff --git a/xbmc/interfaces/AnnouncementManager.cpp b/xbmc/interfaces/AnnouncementManager.cpp index 85269bcef3..26836829f4 100644 --- a/xbmc/interfaces/AnnouncementManager.cpp +++ b/xbmc/interfaces/AnnouncementManager.cpp @@ -22,12 +22,11 @@ #include <memory> #include <mutex> -#include <stdio.h> #define LOOKUP_PROPERTY "database-lookup" using namespace ANNOUNCEMENT; -using namespace KODI::VIDEO; +using namespace KODI; const std::string CAnnouncementManager::ANNOUNCEMENT_SENDER = "xbmc"; @@ -299,7 +298,7 @@ void CAnnouncementManager::DoAnnounce(AnnouncementFlag flag, object["item"]["artist"] = item->GetMusicInfoTag()->GetArtist(); } } - else if (IsVideo(*item)) + else if (VIDEO::IsVideo(*item)) { // video item but has no video info tag. type = "movie"; diff --git a/xbmc/interfaces/builtins/AddonBuiltins.cpp b/xbmc/interfaces/builtins/AddonBuiltins.cpp index 593879558c..2c20cfd0df 100644 --- a/xbmc/interfaces/builtins/AddonBuiltins.cpp +++ b/xbmc/interfaces/builtins/AddonBuiltins.cpp @@ -43,7 +43,7 @@ #endif using namespace ADDON; -using namespace KODI::MESSAGING; +using namespace KODI; using KODI::MESSAGING::HELPERS::DialogResponse; /*! \brief Install an addon. @@ -75,7 +75,8 @@ static int EnableAddon(const std::vector<std::string>& params) if (!CServiceBroker::GetAddonMgr().GetAddon(addonid, addon, OnlyEnabled::CHOICE_NO)) return -1; - auto response = HELPERS::ShowYesNoDialogLines(CVariant{24076}, CVariant{24135}, CVariant{addon->Name()}, CVariant{24136}); + auto response = MESSAGING::HELPERS::ShowYesNoDialogLines( + CVariant{24076}, CVariant{24135}, CVariant{addon->Name()}, CVariant{24136}); if (response == DialogResponse::CHOICE_YES) CServiceBroker::GetAddonMgr().EnableAddon(addonid); diff --git a/xbmc/interfaces/json-rpc/JSONRPC.cpp b/xbmc/interfaces/json-rpc/JSONRPC.cpp index 9f44f3883e..96d3fb5aa7 100644 --- a/xbmc/interfaces/json-rpc/JSONRPC.cpp +++ b/xbmc/interfaces/json-rpc/JSONRPC.cpp @@ -65,31 +65,31 @@ void CJSONRPC::Initialize() CJSONServiceDescription::AddEnum("List.Filter.Operators", smartplaylistList); smartplaylistList.clear(); - CSmartPlaylist::GetAvailableFields("movies", smartplaylistList); + PLAYLIST::CSmartPlaylist::GetAvailableFields("movies", smartplaylistList); CJSONServiceDescription::AddEnum("List.Filter.Fields.Movies", smartplaylistList); smartplaylistList.clear(); - CSmartPlaylist::GetAvailableFields("tvshows", smartplaylistList); + PLAYLIST::CSmartPlaylist::GetAvailableFields("tvshows", smartplaylistList); CJSONServiceDescription::AddEnum("List.Filter.Fields.TVShows", smartplaylistList); smartplaylistList.clear(); - CSmartPlaylist::GetAvailableFields("episodes", smartplaylistList); + PLAYLIST::CSmartPlaylist::GetAvailableFields("episodes", smartplaylistList); CJSONServiceDescription::AddEnum("List.Filter.Fields.Episodes", smartplaylistList); smartplaylistList.clear(); - CSmartPlaylist::GetAvailableFields("musicvideos", smartplaylistList); + PLAYLIST::CSmartPlaylist::GetAvailableFields("musicvideos", smartplaylistList); CJSONServiceDescription::AddEnum("List.Filter.Fields.MusicVideos", smartplaylistList); smartplaylistList.clear(); - CSmartPlaylist::GetAvailableFields("artists", smartplaylistList); + PLAYLIST::CSmartPlaylist::GetAvailableFields("artists", smartplaylistList); CJSONServiceDescription::AddEnum("List.Filter.Fields.Artists", smartplaylistList); smartplaylistList.clear(); - CSmartPlaylist::GetAvailableFields("albums", smartplaylistList); + PLAYLIST::CSmartPlaylist::GetAvailableFields("albums", smartplaylistList); CJSONServiceDescription::AddEnum("List.Filter.Fields.Albums", smartplaylistList); smartplaylistList.clear(); - CSmartPlaylist::GetAvailableFields("songs", smartplaylistList); + PLAYLIST::CSmartPlaylist::GetAvailableFields("songs", smartplaylistList); CJSONServiceDescription::AddEnum("List.Filter.Fields.Songs", smartplaylistList); smartplaylistList.clear(); diff --git a/xbmc/interfaces/json-rpc/JSONUtils.h b/xbmc/interfaces/json-rpc/JSONUtils.h index 150e23b95d..f6643fd03e 100644 --- a/xbmc/interfaces/json-rpc/JSONUtils.h +++ b/xbmc/interfaces/json-rpc/JSONUtils.h @@ -483,7 +483,7 @@ namespace JSONRPC else xspObj["rules"] = filter; - CSmartPlaylist playlist; + KODI::PLAYLIST::CSmartPlaylist playlist; return playlist.Load(xspObj) && playlist.SaveAsJson(xsp, false); } }; diff --git a/xbmc/interfaces/json-rpc/PlayerOperations.h b/xbmc/interfaces/json-rpc/PlayerOperations.h index 20b42704ef..db422f40ce 100644 --- a/xbmc/interfaces/json-rpc/PlayerOperations.h +++ b/xbmc/interfaces/json-rpc/PlayerOperations.h @@ -21,7 +21,7 @@ class CPVRChannelGroup; class CPVREpgInfoTag; } -namespace PLAYLIST +namespace KODI::PLAYLIST { enum class Id; enum class RepeatState; @@ -88,12 +88,12 @@ namespace JSONRPC private: static int GetActivePlayers(); static PlayerType GetPlayer(const CVariant &player); - static PLAYLIST::Id GetPlaylist(PlayerType player); + static KODI::PLAYLIST::Id GetPlaylist(PlayerType player); static JSONRPC_STATUS StartSlideshow(const std::string& path, bool recursive, bool random, const std::string &firstPicturePath = ""); static void SendSlideshowAction(int actionID); static JSONRPC_STATUS GetPropertyValue(PlayerType player, const std::string &property, CVariant &result); - static PLAYLIST::RepeatState ParseRepeatState(const CVariant& repeat); + static KODI::PLAYLIST::RepeatState ParseRepeatState(const CVariant& repeat); static double ParseTimeInSeconds(const CVariant &time); static bool IsPVRChannel(); static std::shared_ptr<PVR::CPVREpgInfoTag> GetCurrentEpg(); diff --git a/xbmc/interfaces/json-rpc/PlaylistOperations.cpp b/xbmc/interfaces/json-rpc/PlaylistOperations.cpp index 8e1a8a3444..f98cf46c94 100644 --- a/xbmc/interfaces/json-rpc/PlaylistOperations.cpp +++ b/xbmc/interfaces/json-rpc/PlaylistOperations.cpp @@ -23,6 +23,7 @@ #include "utils/Variant.h" using namespace JSONRPC; +using namespace KODI; JSONRPC_STATUS CPlaylistOperations::GetPlaylists(const std::string &method, ITransportLayer *transport, IClient *client, const CVariant ¶meterObject, CVariant &result) { diff --git a/xbmc/interfaces/json-rpc/PlaylistOperations.h b/xbmc/interfaces/json-rpc/PlaylistOperations.h index e71c88bc98..881d5823b3 100644 --- a/xbmc/interfaces/json-rpc/PlaylistOperations.h +++ b/xbmc/interfaces/json-rpc/PlaylistOperations.h @@ -14,10 +14,10 @@ class CFileItemList; class CVariant; -namespace PLAYLIST +namespace KODI::PLAYLIST { enum class Id; -} // namespace PLAYLIST +} // namespace KODI::PLAYLIST namespace JSONRPC { @@ -34,12 +34,12 @@ namespace JSONRPC static JSONRPC_STATUS Clear(const std::string &method, ITransportLayer *transport, IClient *client, const CVariant ¶meterObject, CVariant &result); static JSONRPC_STATUS Swap(const std::string &method, ITransportLayer *transport, IClient *client, const CVariant ¶meterObject, CVariant &result); private: - static PLAYLIST::Id GetPlaylist(const CVariant& playlist); - static JSONRPC_STATUS GetPropertyValue(PLAYLIST::Id playlistId, + static KODI::PLAYLIST::Id GetPlaylist(const CVariant& playlist); + static JSONRPC_STATUS GetPropertyValue(KODI::PLAYLIST::Id playlistId, const std::string& property, CVariant& result); - static bool CheckMediaParameter(PLAYLIST::Id playlistId, const CVariant& itemObject); - static bool HandleItemsParameter(PLAYLIST::Id playlistId, + static bool CheckMediaParameter(KODI::PLAYLIST::Id playlistId, const CVariant& itemObject); + static bool HandleItemsParameter(KODI::PLAYLIST::Id playlistId, const CVariant& itemParam, CFileItemList& items); }; diff --git a/xbmc/interfaces/legacy/PlayList.cpp b/xbmc/interfaces/legacy/PlayList.cpp index 6b27f31e51..076e1928b1 100644 --- a/xbmc/interfaces/legacy/PlayList.cpp +++ b/xbmc/interfaces/legacy/PlayList.cpp @@ -14,6 +14,8 @@ #include "playlists/PlayListFactory.h" #include "utils/URIUtils.h" +using namespace KODI; + namespace XBMCAddon { namespace xbmc diff --git a/xbmc/interfaces/legacy/PlayList.h b/xbmc/interfaces/legacy/PlayList.h index 6162945d2b..38471c48ab 100644 --- a/xbmc/interfaces/legacy/PlayList.h +++ b/xbmc/interfaces/legacy/PlayList.h @@ -49,7 +49,7 @@ namespace XBMCAddon class PlayList : public AddonClass { int iPlayList; - PLAYLIST::CPlayList *pPlayList; + KODI::PLAYLIST::CPlayList* pPlayList; public: explicit PlayList(int playList); diff --git a/xbmc/interfaces/legacy/Player.cpp b/xbmc/interfaces/legacy/Player.cpp index 0836081e44..b6af4959ed 100644 --- a/xbmc/interfaces/legacy/Player.cpp +++ b/xbmc/interfaces/legacy/Player.cpp @@ -25,6 +25,8 @@ #include "messaging/ApplicationMessenger.h" #include "settings/MediaSettings.h" +using namespace KODI; + namespace { diff --git a/xbmc/music/GUIViewStateMusic.h b/xbmc/music/GUIViewStateMusic.h index 7f7311a8e7..59e21d4d84 100644 --- a/xbmc/music/GUIViewStateMusic.h +++ b/xbmc/music/GUIViewStateMusic.h @@ -16,7 +16,7 @@ public: explicit CGUIViewStateWindowMusic(const CFileItemList& items) : CGUIViewState(items) {} protected: VECSOURCES& GetSources() override; - PLAYLIST::Id GetPlaylist() const override; + KODI::PLAYLIST::Id GetPlaylist() const override; bool AutoPlayNextItem() override; std::string GetLockType() override; std::string GetExtensions() override; @@ -78,7 +78,7 @@ public: protected: void SaveViewState() override; - PLAYLIST::Id GetPlaylist() const override; + KODI::PLAYLIST::Id GetPlaylist() const override; bool AutoPlayNextItem() override; bool HideParentDirItems() override; VECSOURCES& GetSources() override; diff --git a/xbmc/music/MusicDatabase.cpp b/xbmc/music/MusicDatabase.cpp index a98db00388..f09351b5fb 100644 --- a/xbmc/music/MusicDatabase.cpp +++ b/xbmc/music/MusicDatabase.cpp @@ -64,6 +64,7 @@ #include <inttypes.h> +using namespace KODI; using namespace XFILE; using namespace MUSICDATABASEDIRECTORY; using namespace KODI::MESSAGING; @@ -13287,7 +13288,7 @@ bool CMusicDatabase::GetFilter(CDbUrl& musicUrl, Filter& filter, SortDescription auto option = options.find("xsp"); if (option != options.end()) { - CSmartPlaylist xsp; + PLAYLIST::CSmartPlaylist xsp; if (!xsp.LoadFromJson(option->second.asString())) return false; @@ -13870,7 +13871,7 @@ bool CMusicDatabase::GetFilter(CDbUrl& musicUrl, Filter& filter, SortDescription option = options.find("filter"); if (option != options.end()) { - CSmartPlaylist xspFilter; + PLAYLIST::CSmartPlaylist xspFilter; if (!xspFilter.LoadFromJson(option->second.asString())) return false; diff --git a/xbmc/music/MusicDbUrl.cpp b/xbmc/music/MusicDbUrl.cpp index 3b4893bc18..c11ac931fb 100644 --- a/xbmc/music/MusicDbUrl.cpp +++ b/xbmc/music/MusicDbUrl.cpp @@ -13,6 +13,7 @@ #include "utils/StringUtils.h" #include "utils/Variant.h" +using namespace KODI; using namespace XFILE; using namespace XFILE::MUSICDATABASEDIRECTORY; @@ -161,7 +162,7 @@ bool CMusicDbUrl::validateOption(const std::string &key, const CVariant &value) if (!value.isString()) return false; - CSmartPlaylist xspFilter; + PLAYLIST::CSmartPlaylist xspFilter; if (!xspFilter.LoadFromJson(value.asString())) return false; diff --git a/xbmc/music/windows/GUIWindowMusicNav.cpp b/xbmc/music/windows/GUIWindowMusicNav.cpp index 46e1fab725..b54eb59e93 100644 --- a/xbmc/music/windows/GUIWindowMusicNav.cpp +++ b/xbmc/music/windows/GUIWindowMusicNav.cpp @@ -54,7 +54,6 @@ #include "view/GUIViewState.h" using namespace XFILE; -using namespace PLAYLIST; using namespace MUSICDATABASEDIRECTORY; using namespace KODI; using namespace KODI::MESSAGING; @@ -864,7 +863,7 @@ bool CGUIWindowMusicNav::GetSongsFromPlayList(const std::string& strPlayList, CF items.SetPath(strPlayList); CLog::Log(LOGDEBUG, "CGUIWindowMusicNav, opening playlist [{}]", strPlayList); - std::unique_ptr<CPlayList> pPlayList (CPlayListFactory::Create(strPlayList)); + std::unique_ptr<PLAYLIST::CPlayList> pPlayList(PLAYLIST::CPlayListFactory::Create(strPlayList)); if (nullptr != pPlayList) { // load it @@ -873,7 +872,7 @@ bool CGUIWindowMusicNav::GetSongsFromPlayList(const std::string& strPlayList, CF HELPERS::ShowOKDialogText(CVariant{6}, CVariant{477}); return false; //hmmm unable to load playlist? } - CPlayList playlist = *pPlayList; + PLAYLIST::CPlayList playlist = *pPlayList; // convert playlist items to songs for (int i = 0; i < playlist.size(); ++i) { diff --git a/xbmc/music/windows/GUIWindowMusicPlaylistEditor.cpp b/xbmc/music/windows/GUIWindowMusicPlaylistEditor.cpp index 16ecdd0c3c..6d3d790898 100644 --- a/xbmc/music/windows/GUIWindowMusicPlaylistEditor.cpp +++ b/xbmc/music/windows/GUIWindowMusicPlaylistEditor.cpp @@ -13,6 +13,7 @@ #include "FileItemList.h" #include "GUIUserMessages.h" #include "ServiceBroker.h" +#include "URL.h" #include "Util.h" #include "dialogs/GUIDialogFileBrowser.h" #include "dialogs/GUIDialogKaiToast.h" @@ -39,6 +40,8 @@ #define CONTROL_PLAYLIST 100 #define CONTROL_LABEL_PLAYLIST 101 +using namespace KODI; + CGUIWindowMusicPlaylistEditor::CGUIWindowMusicPlaylistEditor(void) : CGUIWindowMusicBase(WINDOW_MUSIC_PLAYLIST_EDITOR, "MyMusicPlaylistEditor.xml") { diff --git a/xbmc/network/AirPlayServer.cpp b/xbmc/network/AirPlayServer.cpp index 9de4f0eb12..3924755197 100644 --- a/xbmc/network/AirPlayServer.cpp +++ b/xbmc/network/AirPlayServer.cpp @@ -45,6 +45,7 @@ #include <plist/plist.h> +using namespace KODI; using KODI::UTILITY::CDigest; using namespace std::chrono_literals; diff --git a/xbmc/network/upnp/UPnPRenderer.cpp b/xbmc/network/upnp/UPnPRenderer.cpp index 614d50f9a8..6cbba2c136 100644 --- a/xbmc/network/upnp/UPnPRenderer.cpp +++ b/xbmc/network/upnp/UPnPRenderer.cpp @@ -38,7 +38,7 @@ #include <Platinum/Source/Platinum/Platinum.h> -using namespace KODI::VIDEO; +using namespace KODI; NPT_SET_LOCAL_LOGGER("xbmc.upnp.renderer") @@ -632,7 +632,7 @@ NPT_Result CUPnPRenderer::OnSetNextAVTransportURI(PLT_ActionReference& action) { PLAYLIST::Id playlistId = PLAYLIST::Id::TYPE_MUSIC; - if (IsVideo(*item)) + if (VIDEO::IsVideo(*item)) playlistId = PLAYLIST::Id::TYPE_VIDEO; // note: auto-deleted when the message is consumed diff --git a/xbmc/pictures/GUIWindowPictures.cpp b/xbmc/pictures/GUIWindowPictures.cpp index b7345526fd..89d704bef8 100644 --- a/xbmc/pictures/GUIWindowPictures.cpp +++ b/xbmc/pictures/GUIWindowPictures.cpp @@ -49,7 +49,7 @@ using namespace XFILE; using namespace KODI::MESSAGING; -using namespace KODI::VIDEO; +using namespace KODI; using namespace std::chrono_literals; @@ -297,7 +297,7 @@ bool CGUIWindowPictures::GetDirectory(const std::string &strDirectory, CFileItem bool CGUIWindowPictures::OnPlayMedia(int iItem, const std::string &player) { - if (IsVideo(*m_vecItems->Get(iItem))) + if (VIDEO::IsVideo(*m_vecItems->Get(iItem))) return CGUIMediaWindow::OnPlayMedia(iItem); return ShowPicture(iItem, false); @@ -330,7 +330,7 @@ bool CGUIWindowPictures::ShowPicture(int iItem, bool startSlideShow) { if (!pItem->m_bIsFolder && !(URIUtils::IsRAR(pItem->GetPath()) || URIUtils::IsZIP(pItem->GetPath())) && - (pItem->IsPicture() || (bShowVideos && IsVideo(*pItem)))) + (pItem->IsPicture() || (bShowVideos && VIDEO::IsVideo(*pItem)))) { slideShow.Add(pItem.get()); } diff --git a/xbmc/playlists/PlayList.cpp b/xbmc/playlists/PlayList.cpp index 200871c6d0..f64d82b8ea 100644 --- a/xbmc/playlists/PlayList.cpp +++ b/xbmc/playlists/PlayList.cpp @@ -30,10 +30,11 @@ #include <utility> #include <vector> -using namespace KODI; using namespace MUSIC_INFO; using namespace XFILE; -using namespace PLAYLIST; + +namespace KODI::PLAYLIST +{ CPlayList::CPlayList(Id id /* = PLAYLIST::TYPE_NONE */) : m_id(id) { @@ -513,3 +514,5 @@ const std::string& CPlayList::ResolveURL(const std::shared_ptr<CFileItem>& item) else return item->GetDynPath(); } + +} // namespace KODI::PLAYLIST diff --git a/xbmc/playlists/PlayList.h b/xbmc/playlists/PlayList.h index 9facf70d68..6986f6b99e 100644 --- a/xbmc/playlists/PlayList.h +++ b/xbmc/playlists/PlayList.h @@ -17,13 +17,13 @@ class CFileItem; class CFileItemList; -namespace PLAYLIST +namespace KODI::PLAYLIST { class CPlayList { public: - explicit CPlayList(PLAYLIST::Id id = PLAYLIST::Id::TYPE_NONE); + explicit CPlayList(Id id = Id::TYPE_NONE); virtual ~CPlayList(void) = default; virtual bool Load(const std::string& strFileName); virtual bool LoadData(std::istream &stream); @@ -67,7 +67,7 @@ public: const std::string& ResolveURL(const std::shared_ptr<CFileItem>& item) const; protected: - PLAYLIST::Id m_id; + Id m_id; std::string m_strPlayListName; std::string m_strBasePath; int m_iPlayableItems; @@ -89,4 +89,5 @@ private: }; typedef std::shared_ptr<CPlayList> CPlayListPtr; -} + +} // namespace KODI::PLAYLIST diff --git a/xbmc/playlists/PlayListB4S.cpp b/xbmc/playlists/PlayListB4S.cpp index 693e62f81b..69baa857c6 100644 --- a/xbmc/playlists/PlayListB4S.cpp +++ b/xbmc/playlists/PlayListB4S.cpp @@ -22,7 +22,6 @@ #include <string> using namespace XFILE; -using namespace PLAYLIST; /* ------------------------ example b4s playlist file --------------------------------- <?xml version="1.0" encoding='UTF-8' standalone="yes"?> @@ -40,6 +39,10 @@ using namespace PLAYLIST; </playlist> </WinampXML> ------------------------ end of example b4s playlist file ---------------------------------*/ + +namespace KODI::PLAYLIST +{ + CPlayListB4S::CPlayListB4S(void) = default; CPlayListB4S::~CPlayListB4S(void) = default; @@ -131,3 +134,5 @@ void CPlayListB4S::Save(const std::string& strFileName) const file.Write(write.c_str(), write.size()); file.Close(); } + +} // namespace KODI::PLAYLIST diff --git a/xbmc/playlists/PlayListB4S.h b/xbmc/playlists/PlayListB4S.h index 6f688b51a8..f1296342cd 100644 --- a/xbmc/playlists/PlayListB4S.h +++ b/xbmc/playlists/PlayListB4S.h @@ -10,11 +10,10 @@ #include "PlayList.h" -namespace PLAYLIST +namespace KODI::PLAYLIST { -class CPlayListB4S : - public CPlayList +class CPlayListB4S : public CPlayList { public: CPlayListB4S(void); @@ -22,4 +21,4 @@ public: bool LoadData(std::istream& stream) override; void Save(const std::string& strFileName) const override; }; -} +} // namespace KODI::PLAYLIST diff --git a/xbmc/playlists/PlayListFactory.cpp b/xbmc/playlists/PlayListFactory.cpp index 4bae13dd27..0fb8ab7ebd 100644 --- a/xbmc/playlists/PlayListFactory.cpp +++ b/xbmc/playlists/PlayListFactory.cpp @@ -20,8 +20,8 @@ #include "utils/StringUtils.h" #include "utils/URIUtils.h" -using namespace KODI; -using namespace PLAYLIST; +namespace KODI::PLAYLIST +{ CPlayList* CPlayListFactory::Create(const std::string& filename) { @@ -146,3 +146,4 @@ bool CPlayListFactory::IsPlaylist(const std::string& filename) ".m3u|.m3u8|.b4s|.pls|.strm|.wpl|.asx|.ram|.url|.pxml|.xspf"); } +} // namespace KODI::PLAYLIST diff --git a/xbmc/playlists/PlayListFactory.h b/xbmc/playlists/PlayListFactory.h index 59a56f2f5f..5161150ea5 100644 --- a/xbmc/playlists/PlayListFactory.h +++ b/xbmc/playlists/PlayListFactory.h @@ -13,7 +13,7 @@ class CFileItem; class CURL; -namespace PLAYLIST +namespace KODI::PLAYLIST { class CPlayList; diff --git a/xbmc/playlists/PlayListM3U.cpp b/xbmc/playlists/PlayListM3U.cpp index e403c56117..572bdced77 100644 --- a/xbmc/playlists/PlayListM3U.cpp +++ b/xbmc/playlists/PlayListM3U.cpp @@ -22,10 +22,11 @@ #include <inttypes.h> -using namespace KODI; -using namespace PLAYLIST; using namespace XFILE; +namespace KODI::PLAYLIST +{ + const char* CPlayListM3U::StartMarker = "#EXTCPlayListM3U::M3U"; const char* CPlayListM3U::InfoMarker = "#EXTINF"; const char* CPlayListM3U::ArtistMarker = "#EXTART"; @@ -291,3 +292,4 @@ std::map< std::string, std::string > CPlayListM3U::ParseStreamLine(const std::st return params; } +} // namespace KODI::PLAYLIST diff --git a/xbmc/playlists/PlayListM3U.h b/xbmc/playlists/PlayListM3U.h index 467ed30db8..9955bb898d 100644 --- a/xbmc/playlists/PlayListM3U.h +++ b/xbmc/playlists/PlayListM3U.h @@ -9,12 +9,13 @@ #pragma once #include "PlayList.h" -#include "URL.h" -namespace PLAYLIST +#include <map> +#include <string> + +namespace KODI::PLAYLIST { -class CPlayListM3U : - public CPlayList +class CPlayListM3U : public CPlayList { public: static const char *StartMarker; diff --git a/xbmc/playlists/PlayListPLS.cpp b/xbmc/playlists/PlayListPLS.cpp index 29cd4eb1b7..4520c05d2e 100644 --- a/xbmc/playlists/PlayListPLS.cpp +++ b/xbmc/playlists/PlayListPLS.cpp @@ -28,13 +28,14 @@ #include <string> #include <vector> -using namespace KODI; using namespace XFILE; -using namespace PLAYLIST; #define START_PLAYLIST_MARKER "[playlist]" // may be case-insensitive (equivalent to .ini file on win32) #define PLAYLIST_NAME "PlaylistName" +namespace KODI::PLAYLIST +{ + /*---------------------------------------------------------------------- [playlist] PlaylistName=Playlist 001 @@ -427,3 +428,5 @@ bool CPlayListPLS::Resize(std::vector <int>::size_type newSize) } return true; } + +} // namespace KODI::PLAYLIST diff --git a/xbmc/playlists/PlayListPLS.h b/xbmc/playlists/PlayListPLS.h index 50d58e3916..2e400cbdd0 100644 --- a/xbmc/playlists/PlayListPLS.h +++ b/xbmc/playlists/PlayListPLS.h @@ -13,10 +13,9 @@ #include <string> #include <vector> -namespace PLAYLIST +namespace KODI::PLAYLIST { -class CPlayListPLS : - public CPlayList +class CPlayListPLS : public CPlayList { public: CPlayListPLS(void); @@ -39,6 +38,4 @@ class CPlayListRAM : public CPlayList public: bool LoadData(std::istream &stream) override; }; - - } diff --git a/xbmc/playlists/PlayListTypes.h b/xbmc/playlists/PlayListTypes.h index a8234004fa..cf8ad2efb6 100644 --- a/xbmc/playlists/PlayListTypes.h +++ b/xbmc/playlists/PlayListTypes.h @@ -8,7 +8,7 @@ #pragma once -namespace PLAYLIST +namespace KODI::PLAYLIST { enum class Id : int @@ -29,4 +29,4 @@ enum class RepeatState ALL }; -} // namespace PLAYLIST +} // namespace KODI::PLAYLIST diff --git a/xbmc/playlists/PlayListURL.cpp b/xbmc/playlists/PlayListURL.cpp index f2ec4e3f72..0cf689c4a3 100644 --- a/xbmc/playlists/PlayListURL.cpp +++ b/xbmc/playlists/PlayListURL.cpp @@ -13,7 +13,6 @@ #include "utils/StringUtils.h" #include "utils/URIUtils.h" -using namespace PLAYLIST; using namespace XFILE; // example url file @@ -22,6 +21,9 @@ using namespace XFILE; //[InternetShortcut] //URL=http://msdn2.microsoft.com/en-us/library/ms812698.aspx +namespace KODI::PLAYLIST +{ + CPlayListURL::CPlayListURL(void) = default; CPlayListURL::~CPlayListURL(void) = default; @@ -67,3 +69,4 @@ bool CPlayListURL::Load(const std::string& strFileName) return true; } +} // namespace KODI::PLAYLIST diff --git a/xbmc/playlists/PlayListURL.h b/xbmc/playlists/PlayListURL.h index d0baa0a452..f0259476f7 100644 --- a/xbmc/playlists/PlayListURL.h +++ b/xbmc/playlists/PlayListURL.h @@ -10,10 +10,9 @@ #include "PlayList.h" -namespace PLAYLIST +namespace KODI::PLAYLIST { -class CPlayListURL : - public CPlayList +class CPlayListURL : public CPlayList { public: CPlayListURL(void); diff --git a/xbmc/playlists/PlayListWPL.cpp b/xbmc/playlists/PlayListWPL.cpp index e7142ffc6e..fd9ff01867 100644 --- a/xbmc/playlists/PlayListWPL.cpp +++ b/xbmc/playlists/PlayListWPL.cpp @@ -21,7 +21,6 @@ #include <string> using namespace XFILE; -using namespace PLAYLIST; /* ------------------------ example wpl playlist file --------------------------------- <?wpl version="1.0"?> @@ -42,6 +41,9 @@ using namespace PLAYLIST; ------------------------ end of example wpl playlist file ---------------------------------*/ //Note: File is utf-8 encoded by default +namespace KODI::PLAYLIST +{ + CPlayListWPL::CPlayListWPL(void) = default; CPlayListWPL::~CPlayListWPL(void) = default; @@ -128,3 +130,5 @@ void CPlayListWPL::Save(const std::string& strFileName) const file.Write(write.c_str(), write.size()); file.Close(); } + +} // namespace KODI::PLAYLIST diff --git a/xbmc/playlists/PlayListWPL.h b/xbmc/playlists/PlayListWPL.h index e0bdf68e6f..1ee2f3716f 100644 --- a/xbmc/playlists/PlayListWPL.h +++ b/xbmc/playlists/PlayListWPL.h @@ -10,11 +10,10 @@ #include "PlayList.h" -namespace PLAYLIST +namespace KODI::PLAYLIST { -class CPlayListWPL : - public CPlayList +class CPlayListWPL : public CPlayList { public: CPlayListWPL(void); diff --git a/xbmc/playlists/PlayListXML.cpp b/xbmc/playlists/PlayListXML.cpp index 82af079044..043a36fa97 100644 --- a/xbmc/playlists/PlayListXML.cpp +++ b/xbmc/playlists/PlayListXML.cpp @@ -18,7 +18,6 @@ #include "utils/XMLUtils.h" #include "utils/log.h" -using namespace PLAYLIST; using namespace XFILE; /* @@ -53,6 +52,8 @@ using namespace XFILE; </streams> */ +namespace KODI::PLAYLIST +{ CPlayListXML::CPlayListXML(void) = default; @@ -195,3 +196,5 @@ void CPlayListXML::Save(const std::string& strFileName) const file.Write(write.c_str(), write.size()); file.Close(); } + +} // namespace KODI::PLAYLIST diff --git a/xbmc/playlists/PlayListXML.h b/xbmc/playlists/PlayListXML.h index d1e18bc9cf..784761dbd0 100644 --- a/xbmc/playlists/PlayListXML.h +++ b/xbmc/playlists/PlayListXML.h @@ -10,10 +10,9 @@ #include "PlayList.h" -namespace PLAYLIST +namespace KODI::PLAYLIST { -class CPlayListXML : - public CPlayList +class CPlayListXML : public CPlayList { public: CPlayListXML(void); diff --git a/xbmc/playlists/PlayListXSPF.cpp b/xbmc/playlists/PlayListXSPF.cpp index 6f665a790c..3b49eb64df 100644 --- a/xbmc/playlists/PlayListXSPF.cpp +++ b/xbmc/playlists/PlayListXSPF.cpp @@ -16,8 +16,6 @@ #include "utils/XBMCTinyXML.h" #include "utils/log.h" -using namespace PLAYLIST; - namespace { @@ -41,6 +39,9 @@ std::string GetXMLText(const TiXmlElement* pXmlElement) } +namespace KODI::PLAYLIST +{ + CPlayListXSPF::CPlayListXSPF(void) = default; CPlayListXSPF::~CPlayListXSPF(void) = default; @@ -130,3 +131,5 @@ bool CPlayListXSPF::Load(const std::string& strFileName) return true; } + +} // namespace KODI::PLAYLIST diff --git a/xbmc/playlists/PlayListXSPF.h b/xbmc/playlists/PlayListXSPF.h index 8960460f78..b16b809442 100644 --- a/xbmc/playlists/PlayListXSPF.h +++ b/xbmc/playlists/PlayListXSPF.h @@ -10,7 +10,7 @@ #include "PlayList.h" -namespace PLAYLIST +namespace KODI::PLAYLIST { class CPlayListXSPF : public CPlayList { diff --git a/xbmc/playlists/SmartPlayList.cpp b/xbmc/playlists/SmartPlayList.cpp index dc83a75145..4338bbec8c 100644 --- a/xbmc/playlists/SmartPlayList.cpp +++ b/xbmc/playlists/SmartPlayList.cpp @@ -35,6 +35,9 @@ using namespace XFILE; +namespace KODI::PLAYLIST +{ + typedef struct { char string[17]; @@ -1608,3 +1611,5 @@ CDatabaseQueryRuleCombination *CSmartPlaylist::CreateCombination() const { return new CSmartPlaylistRuleCombination(); } + +} // namespace KODI::PLAYLIST diff --git a/xbmc/playlists/SmartPlayList.h b/xbmc/playlists/SmartPlayList.h index 2a153c389a..1b027ce67a 100644 --- a/xbmc/playlists/SmartPlayList.h +++ b/xbmc/playlists/SmartPlayList.h @@ -12,14 +12,18 @@ #include "utils/SortUtils.h" #include "utils/XBMCTinyXML.h" -#include <memory> #include <set> #include <string> #include <vector> +class CGUIDialogSmartPlaylistEditor; +class CGUIDialogMediaFilter; class CURL; class CVariant; +namespace KODI::PLAYLIST +{ + class CSmartPlaylistRule : public CDatabaseQueryRule { public: @@ -66,7 +70,11 @@ protected: private: std::string GetVideoResolutionQuery(const std::string ¶meter) const; - static std::string FormatLinkQuery(const char *field, const char *table, const MediaType& mediaType, const std::string& mediaField, const std::string& parameter); + static std::string FormatLinkQuery(const char* field, + const char* table, + const MediaType& mediaType, + const std::string& mediaField, + const std::string& parameter); std::string FormatYearQuery(const std::string& field, const std::string& param, const std::string& parameter) const; @@ -114,8 +122,16 @@ public: bool IsVideoType() const; bool IsMusicType() const; - void SetMatchAllRules(bool matchAll) { m_ruleCombination.SetType(matchAll ? CSmartPlaylistRuleCombination::CombinationAnd : CSmartPlaylistRuleCombination::CombinationOr); } - bool GetMatchAllRules() const { return m_ruleCombination.GetType() == CSmartPlaylistRuleCombination::CombinationAnd; } + void SetMatchAllRules(bool matchAll) + { + m_ruleCombination.SetType(matchAll ? CSmartPlaylistRuleCombination::CombinationAnd + : CSmartPlaylistRuleCombination::CombinationOr); + } + + bool GetMatchAllRules() const + { + return m_ruleCombination.GetType() == CSmartPlaylistRuleCombination::CombinationAnd; + } void SetLimit(unsigned int limit) { m_limit = limit; } unsigned int GetLimit() const { return m_limit; } @@ -160,9 +176,10 @@ public: // rule creation CDatabaseQueryRule *CreateRule() const override; CDatabaseQueryRuleCombination *CreateCombination() const override; + private: - friend class CGUIDialogSmartPlaylistEditor; - friend class CGUIDialogMediaFilter; + friend class ::CGUIDialogSmartPlaylistEditor; + friend class ::CGUIDialogMediaFilter; const TiXmlNode* readName(const TiXmlNode *root); const TiXmlNode* readNameFromPath(const CURL &url); @@ -184,3 +201,4 @@ private: CXBMCTinyXML m_xmlDoc; }; +} // namespace KODI::PLAYLIST diff --git a/xbmc/playlists/SmartPlaylistFileItemListModifier.cpp b/xbmc/playlists/SmartPlaylistFileItemListModifier.cpp index 443dabcd4e..20beb18c62 100644 --- a/xbmc/playlists/SmartPlaylistFileItemListModifier.cpp +++ b/xbmc/playlists/SmartPlaylistFileItemListModifier.cpp @@ -20,6 +20,9 @@ #define PROPERTY_SORT_ORDER "sort.order" #define PROPERTY_SORT_ASCENDING "sort.ascending" +namespace KODI::PLAYLIST +{ + bool CSmartPlaylistFileItemListModifier::CanModify(const CFileItemList &items) const { return !GetUrlOption(items.GetPath(), URL_OPTION_XSP).empty(); @@ -53,3 +56,5 @@ std::string CSmartPlaylistFileItemListModifier::GetUrlOption(const std::string & CURL url(path); return url.GetOption(option); } + +} // namespace KODI::PLAYLIST diff --git a/xbmc/playlists/SmartPlaylistFileItemListModifier.h b/xbmc/playlists/SmartPlaylistFileItemListModifier.h index 5d640847b7..7b2bbce552 100644 --- a/xbmc/playlists/SmartPlaylistFileItemListModifier.h +++ b/xbmc/playlists/SmartPlaylistFileItemListModifier.h @@ -12,6 +12,9 @@ #include <string> +namespace KODI::PLAYLIST +{ + class CSmartPlaylistFileItemListModifier : public IFileItemListModifier { public: @@ -24,3 +27,5 @@ public: private: static std::string GetUrlOption(const std::string &path, const std::string &option); }; + +} // namespace KODI::PLAYLIST diff --git a/xbmc/playlists/test/TestPlayListB4S.cpp b/xbmc/playlists/test/TestPlayListB4S.cpp index 04a6632dc1..45d83194a3 100644 --- a/xbmc/playlists/test/TestPlayListB4S.cpp +++ b/xbmc/playlists/test/TestPlayListB4S.cpp @@ -16,13 +16,12 @@ #include <fstream> #include <gtest/gtest.h> -using namespace PLAYLIST; - +using namespace KODI; TEST(TestPlayListB4S, LoadData) { const std::string filename = XBMC_REF_FILE_PATH("/xbmc/playlists/test/test.b4s"); - CPlayListB4S playlist; + PLAYLIST::CPlayListB4S playlist; std::filebuf fb; if (!fb.open(filename, std::ios::in)) diff --git a/xbmc/playlists/test/TestPlayListFactory.cpp b/xbmc/playlists/test/TestPlayListFactory.cpp index 08b2b4b446..b201278d8f 100644 --- a/xbmc/playlists/test/TestPlayListFactory.cpp +++ b/xbmc/playlists/test/TestPlayListFactory.cpp @@ -15,24 +15,23 @@ #include <gtest/gtest.h> -using namespace PLAYLIST; - +using namespace KODI; TEST(TestPlayListFactory, XSPF) { std::string filename = XBMC_REF_FILE_PATH("/xbmc/playlists/test/newfile.xspf"); CURL url("http://example.com/playlists/playlist.xspf"); - CPlayList* playlist = nullptr; + PLAYLIST::CPlayList* playlist = nullptr; - EXPECT_TRUE(CPlayListFactory::IsPlaylist(url)); - EXPECT_TRUE(CPlayListFactory::IsPlaylist(filename)); + EXPECT_TRUE(PLAYLIST::CPlayListFactory::IsPlaylist(url)); + EXPECT_TRUE(PLAYLIST::CPlayListFactory::IsPlaylist(filename)); - playlist = CPlayListFactory::Create(filename); + playlist = PLAYLIST::CPlayListFactory::Create(filename); EXPECT_NE(playlist, nullptr); if (playlist) { - EXPECT_NE(dynamic_cast<CPlayListXSPF*>(playlist), nullptr); + EXPECT_NE(dynamic_cast<PLAYLIST::CPlayListXSPF*>(playlist), nullptr); delete playlist; } } diff --git a/xbmc/playlists/test/TestPlayListXSPF.cpp b/xbmc/playlists/test/TestPlayListXSPF.cpp index 574d05d120..b46895731e 100644 --- a/xbmc/playlists/test/TestPlayListXSPF.cpp +++ b/xbmc/playlists/test/TestPlayListXSPF.cpp @@ -15,13 +15,12 @@ #include <gtest/gtest.h> -using namespace PLAYLIST; - +using namespace KODI; TEST(TestPlayListXSPF, Load) { std::string filename = XBMC_REF_FILE_PATH("/xbmc/playlists/test/test.xspf"); - CPlayListXSPF playlist; + PLAYLIST::CPlayListXSPF playlist; std::vector<std::string> pathparts; std::vector<std::string>::reverse_iterator it; diff --git a/xbmc/profiles/ProfileManager.cpp b/xbmc/profiles/ProfileManager.cpp index 999e6c09ab..8b181dd9dd 100644 --- a/xbmc/profiles/ProfileManager.cpp +++ b/xbmc/profiles/ProfileManager.cpp @@ -77,6 +77,7 @@ #define XML_NEXTID "nextIdProfile" #define XML_PROFILE "profile" +using namespace KODI; using namespace XFILE; static CProfile EmptyProfile; diff --git a/xbmc/video/GUIViewStateVideo.cpp b/xbmc/video/GUIViewStateVideo.cpp index 336fb3da83..f9c4ca06e0 100644 --- a/xbmc/video/GUIViewStateVideo.cpp +++ b/xbmc/video/GUIViewStateVideo.cpp @@ -25,7 +25,7 @@ #include "video/VideoFileItemClassify.h" #include "view/ViewStateSettings.h" -using namespace KODI::VIDEO; +using namespace KODI; using namespace XFILE; using namespace VIDEODATABASEDIRECTORY; @@ -72,7 +72,7 @@ CGUIViewStateWindowVideoNav::CGUIViewStateWindowVideoNav(const CFileItemList& it SetSortOrder(SortOrderNone); } - else if (IsVideoDb(items)) + else if (VIDEO::IsVideoDb(items)) { NODE_TYPE NodeType=CVideoDatabaseDirectory::GetDirectoryChildType(items.GetPath()); CQueryParams params; @@ -340,7 +340,7 @@ CGUIViewStateWindowVideoNav::CGUIViewStateWindowVideoNav(const CFileItemList& it void CGUIViewStateWindowVideoNav::SaveViewState() { - if (IsVideoDb(m_items)) + if (VIDEO::IsVideoDb(m_items)) { NODE_TYPE NodeType = CVideoDatabaseDirectory::GetDirectoryChildType(m_items.GetPath()); CQueryParams params; diff --git a/xbmc/video/GUIViewStateVideo.h b/xbmc/video/GUIViewStateVideo.h index 4a7a8e65e0..5cf2cdcde2 100644 --- a/xbmc/video/GUIViewStateVideo.h +++ b/xbmc/video/GUIViewStateVideo.h @@ -18,7 +18,7 @@ public: protected: VECSOURCES& GetSources() override; std::string GetLockType() override; - PLAYLIST::Id GetPlaylist() const override; + KODI::PLAYLIST::Id GetPlaylist() const override; std::string GetExtensions() override; bool AutoPlayNextItem() override; }; diff --git a/xbmc/video/VideoDatabase.cpp b/xbmc/video/VideoDatabase.cpp index d23851bbc0..1e9cf8993f 100644 --- a/xbmc/video/VideoDatabase.cpp +++ b/xbmc/video/VideoDatabase.cpp @@ -11848,7 +11848,7 @@ bool CVideoDatabase::GetFilter(CDbUrl &videoUrl, Filter &filter, SortDescription auto option = options.find("xsp"); if (option != options.end()) { - CSmartPlaylist xsp; + PLAYLIST::CSmartPlaylist xsp; if (!xsp.LoadFromJson(option->second.asString())) return false; @@ -11876,7 +11876,7 @@ bool CVideoDatabase::GetFilter(CDbUrl &videoUrl, Filter &filter, SortDescription option = options.find("filter"); if (option != options.end()) { - CSmartPlaylist xspFilter; + PLAYLIST::CSmartPlaylist xspFilter; if (!xspFilter.LoadFromJson(option->second.asString())) return false; diff --git a/xbmc/video/VideoDbUrl.cpp b/xbmc/video/VideoDbUrl.cpp index 45b8634da0..99db0db0b9 100644 --- a/xbmc/video/VideoDbUrl.cpp +++ b/xbmc/video/VideoDbUrl.cpp @@ -13,6 +13,7 @@ #include "utils/StringUtils.h" #include "utils/Variant.h" +using namespace KODI; using namespace XFILE; CVideoDbUrl::CVideoDbUrl() @@ -204,7 +205,7 @@ bool CVideoDbUrl::validateOption(const std::string &key, const CVariant &value) if (!value.isString()) return false; - CSmartPlaylist xspFilter; + PLAYLIST::CSmartPlaylist xspFilter; if (!xspFilter.LoadFromJson(value.asString())) return false; diff --git a/xbmc/video/windows/GUIWindowVideoBase.h b/xbmc/video/windows/GUIWindowVideoBase.h index b126cebc9f..37e2b5c8c7 100644 --- a/xbmc/video/windows/GUIWindowVideoBase.h +++ b/xbmc/video/windows/GUIWindowVideoBase.h @@ -105,7 +105,7 @@ protected: bool OnPlayAndQueueMedia(const CFileItemPtr& item, const std::string& player = "") override; using CGUIMediaWindow::LoadPlayList; void LoadPlayList(const std::string& strPlayList, - PLAYLIST::Id playlistId = PLAYLIST::Id::TYPE_VIDEO); + KODI::PLAYLIST::Id playlistId = KODI::PLAYLIST::Id::TYPE_VIDEO); bool PlayItem(const std::shared_ptr<CFileItem>& item, const std::string& player); /*! diff --git a/xbmc/view/GUIViewState.h b/xbmc/view/GUIViewState.h index 2c8dd05a88..e995a3b8b8 100644 --- a/xbmc/view/GUIViewState.h +++ b/xbmc/view/GUIViewState.h @@ -17,10 +17,10 @@ class CViewState; // forward class CFileItemList; -namespace PLAYLIST +namespace KODI::PLAYLIST { enum class Id; -} // namespace PLAYLIST +} // namespace KODI::PLAYLIST class CGUIViewState { @@ -50,7 +50,7 @@ public: virtual bool HideParentDirItems(); virtual bool DisableAddSourceButtons(); - virtual PLAYLIST::Id GetPlaylist() const; + virtual KODI::PLAYLIST::Id GetPlaylist() const; const std::string& GetPlaylistDirectory(); void SetPlaylistDirectory(const std::string& strDirectory); bool IsCurrentPlaylistDirectory(const std::string& strDirectory); @@ -88,7 +88,7 @@ protected: const CFileItemList& m_items; int m_currentViewAsControl; - PLAYLIST::Id m_playlist; + KODI::PLAYLIST::Id m_playlist; std::vector<GUIViewSortDetails> m_sortMethods; int m_currentSortMethod; diff --git a/xbmc/windows/GUIMediaWindow.h b/xbmc/windows/GUIMediaWindow.h index 6de5e2b320..5364bbe586 100644 --- a/xbmc/windows/GUIMediaWindow.h +++ b/xbmc/windows/GUIMediaWindow.h @@ -208,7 +208,7 @@ protected: int m_iLastControl; std::string m_startDirectory; - CSmartPlaylist m_filter; + KODI::PLAYLIST::CSmartPlaylist m_filter; bool m_canFilterAdvanced; /*! \brief Contains the path used for filtering (including any active filter) |