diff options
Diffstat (limited to 'xbmc/events/IEvent.h')
-rw-r--r-- | xbmc/events/IEvent.h | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/xbmc/events/IEvent.h b/xbmc/events/IEvent.h new file mode 100644 index 0000000..4ff8c02 --- /dev/null +++ b/xbmc/events/IEvent.h @@ -0,0 +1,47 @@ +/* + * Copyright (C) 2015-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 "utils/ISortable.h" + +#include <memory> +#include <string> + +class CDateTime; + +enum class EventLevel +{ + Basic = 0, + Information = 1, + Warning = 2, + Error = 3, +}; + +class IEvent : public ISortable +{ +public: + virtual ~IEvent() = default; + + virtual const char* GetType() const = 0; + virtual std::string GetIdentifier() const = 0; + virtual EventLevel GetLevel() const = 0; + virtual std::string GetLabel() const = 0; + virtual std::string GetIcon() const = 0; + virtual std::string GetDescription() const = 0; + virtual std::string GetDetails() const = 0; + virtual std::string GetExecutionLabel() const = 0; + virtual CDateTime GetDateTime() const = 0; + + virtual bool CanExecute() const = 0; + virtual bool Execute() const = 0; + + void ToSortable(SortItem& sortable, Field field) const override = 0; +}; + +typedef std::shared_ptr<const IEvent> EventPtr; |