summaryrefslogtreecommitdiffstats
path: root/xbmc/addons/gui/GUIHelpers.h
blob: 63310aed5b6bb16228e62fcc17323be103187f74 (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
/*
 *  Copyright (C) 2005-2020 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 <memory>

namespace ADDON
{

class IAddon;

namespace GUI
{

class CHelpers
{
public:
  /*!
   * @brief This shows an Yes/No dialog with information about the add-on if it is
   * not in the normal status.
   *
   * This asks the user whether he really wants to use the add-on and informs with
   * text why the other status is.
   *
   * @note The dialog is currently displayed for @ref AddonLifecycleState::BROKEN
   * and @ref AddonLifecycleState::DEPRECATED.
   *
   * @param[in] addon Class of the add-on to be checked
   * @return True if user activation is desired, false if not
   */
  static bool DialogAddonLifecycleUseAsk(const std::shared_ptr<const IAddon>& addon);
};

} /* namespace GUI */
} /* namespace ADDON */