[video] fix selection after changing video or extra art
[xbmc.git] / xbmc / pvr / guilib / PVRGUIActionsParentalControl.h
blobb24b633226e3a322be1997b313b8d986685ebc55
1 /*
2 * Copyright (C) 2016-2018 Team Kodi
3 * This file is part of Kodi - https://kodi.tv
5 * SPDX-License-Identifier: GPL-2.0-or-later
6 * See LICENSES/README.md for more information.
7 */
9 #pragma once
11 #include "pvr/IPVRComponent.h"
12 #include "pvr/settings/PVRSettings.h"
14 #include <memory>
16 namespace PVR
18 enum class ParentalCheckResult
20 CANCELED,
21 FAILED,
22 SUCCESS
25 class CPVRChannel;
27 class CPVRGUIActionsParentalControl : public IPVRComponent
29 public:
30 CPVRGUIActionsParentalControl();
31 ~CPVRGUIActionsParentalControl() override = default;
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).
38 ParentalCheckResult CheckParentalLock(const std::shared_ptr<const CPVRChannel>& channel) const;
40 /*!
41 * @brief Open Numeric dialog to check for parental PIN.
42 * @return the result of the check (success, failed, or canceled by user).
44 ParentalCheckResult CheckParentalPIN() const;
46 private:
47 CPVRGUIActionsParentalControl(const CPVRGUIActionsParentalControl&) = delete;
48 CPVRGUIActionsParentalControl const& operator=(CPVRGUIActionsParentalControl const&) = delete;
50 CPVRSettings m_settings;
53 namespace GUI
55 // pretty scope and name
56 using Parental = CPVRGUIActionsParentalControl;
57 } // namespace GUI
59 } // namespace PVR