summaryrefslogtreecommitdiffstats
path: root/xbmc/favourites/GUIWindowFavourites.h
diff options
context:
space:
mode:
Diffstat (limited to 'xbmc/favourites/GUIWindowFavourites.h')
-rw-r--r--xbmc/favourites/GUIWindowFavourites.h33
1 files changed, 33 insertions, 0 deletions
diff --git a/xbmc/favourites/GUIWindowFavourites.h b/xbmc/favourites/GUIWindowFavourites.h
new file mode 100644
index 0000000..ec4ea32
--- /dev/null
+++ b/xbmc/favourites/GUIWindowFavourites.h
@@ -0,0 +1,33 @@
+/*
+ * Copyright (C) 2022 Team Kodi
+ * This file is part of Kodi - https://kodi.tv
+ *
+ * SPDX-License-Identifier: GPL-2.0-or-later
+ * See LICENSES/README.md for more information.
+ */
+
+#pragma once
+
+#include "favourites/FavouritesService.h"
+#include "windows/GUIMediaWindow.h"
+
+class CGUIWindowFavourites : public CGUIMediaWindow
+{
+public:
+ CGUIWindowFavourites();
+ ~CGUIWindowFavourites() override;
+
+protected:
+ std::string GetRootPath() const override { return "favourites://"; }
+
+ bool OnSelect(int item) override;
+ bool OnAction(const CAction& action) override;
+ bool OnMessage(CGUIMessage& message) override;
+
+ bool Update(const std::string& strDirectory, bool updateFilterPath = true) override;
+
+private:
+ void OnFavouritesEvent(const CFavouritesService::FavouritesUpdated& event);
+ bool MoveItem(int item, int amount);
+ bool RemoveItem(int item);
+};