kodi
GUIWindowFavourites.h
1 /*
2  * Copyright (C) 2022 Team Kodi
3  * This file is part of Kodi - https://kodi.tv
4  *
5  * SPDX-License-Identifier: GPL-2.0-or-later
6  * See LICENSES/README.md for more information.
7  */
8 
9 #pragma once
10 
11 #include "favourites/FavouritesService.h"
12 #include "windows/GUIMediaWindow.h"
13 
15 {
16 public:
18  ~CGUIWindowFavourites() override;
19 
20 protected:
21  std::string GetRootPath() const override { return "favourites://"; }
22 
23  bool OnSelect(int item) override;
24  bool OnAction(const CAction& action) override;
25  bool OnMessage(CGUIMessage& message) override;
26 
27  bool Update(const std::string& strDirectory, bool updateFilterPath = true) override;
28 
29 private:
30  void OnFavouritesEvent(const CFavouritesService::FavouritesUpdated& event);
31  bool MoveItem(int item, int amount);
32  bool RemoveItem(int item);
33 };
Definition: GUIWindowFavourites.h:14
Class encapsulating information regarding a particular user action to be sent to windows and controls...
Definition: Action.h:21
Definition: FavouritesService.h:42
Definition: GUIMessage.h:365
bool Update(const std::string &strDirectory, bool updateFilterPath=true) override
Retrieves the items from the given path and updates the list.
Definition: GUIWindowFavourites.cpp:244
Definition: GUIMediaWindow.h:28