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