Debian Codegraph @

xbmc/pvr/channels/PVRChannelGroupFromUser.h

raw
1 /*
2 * Copyright (C) 2012-2023 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 "pvr/channels/PVRChannelGroup.h"
12
13 namespace PVR
14 {
15
16 class CPVRChannelGroupFromUser : public CPVRChannelGroup
17 {
18 public:
19 /*!
20 * @brief Create a new channel group instance.
21 * @param path The channel group path.
22 * @param allChannelsGroup The channel group containing all TV or radio channels.
23 */
24 CPVRChannelGroupFromUser(const CPVRChannelsPath& path,
25 const std::shared_ptr<const CPVRChannelGroup>& allChannelsGroup);
26
27 /*!
28 * @brief Check whether this group could be deleted by the user.
29 * @return True if the group could be deleted, false otherwise.
30 */
31 bool SupportsDelete() const override { return true; }
32
33 /*!
34 * @brief Check whether members could be added to this group by the user.
35 * @return True if members could be added, false otherwise.
36 */
37 bool SupportsMemberAdd() const override { return true; }
38
39 /*!
40 * @brief Check whether members could be removed from this group by the user.
41 * @return True if members could be removed, false otherwise.
42 */
43 bool SupportsMemberRemove() const override { return true; }
44
45 /*!
46 * @brief Check whether this group is owner of the channel instances it contains.
47 * @return True if owner, false otherwise.
48 */
49 bool IsChannelsOwner() const override { return false; }
50
51 /*!
52 * @brief Update data with channel group members from the given clients, sync with local data.
53 * @param clients The clients to fetch data from. Leave empty to fetch data from all created clients.
54 * @return True on success, false otherwise.
55 */
56 bool UpdateFromClients(const std::vector<std::shared_ptr<CPVRClient>>& clients) override;
57
58 private:
59 /*!
60 * @brief Return the type of this group.
61 */
62 int GroupType() const override { return PVR_GROUP_TYPE_LOCAL; }
63 };
64 } // namespace PVR