Debian Codegraph @

xbmc/pvr/guilib/PVRGUIActionsParentalControl.h

raw symbols SCIP
1 /*
2 * Copyright (C) 2016-2018 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/IPVRComponent.h"
12 #include "pvr/settings/PVRSettings.h"
13
14 #include <memory>
15
16 namespace PVR
17 {
18 enum class ParentalCheckResult
19 {
20 CANCELED,
21 FAILED,
22 SUCCESS
23 };
24
25 class CPVRChannel;
26
27 class CPVRGUIActionsParentalControl : public IPVRComponent
28 {
29 public:
30 CPVRGUIActionsParentalControl();
31 ~CPVRGUIActionsParentalControl() override = default;
32
33 /*!
34 * @brief Check if channel is parental locked. Ask for PIN if necessary.
35 * @param channel The channel to do the check for.
36 * @return the result of the check (success, failed, or canceled by user).
37 */
38 ParentalCheckResult CheckParentalLock(const std::shared_ptr<const CPVRChannel>& channel) const;
39
40 /*!
41 * @brief Open Numeric dialog to check for parental PIN.
42 * @return the result of the check (success, failed, or canceled by user).
43 */
44 ParentalCheckResult CheckParentalPIN() const;
45
46 private:
47 CPVRGUIActionsParentalControl(const CPVRGUIActionsParentalControl&) = delete;
48 CPVRGUIActionsParentalControl const& operator=(CPVRGUIActionsParentalControl const&) = delete;
49
50 CPVRSettings m_settings;
51 };
52
53 namespace GUI
54 {
55 // pretty scope and name
56 using Parental = CPVRGUIActionsParentalControl;
57 } // namespace GUI
58
59 } // namespace PVR