| 1 |
/* |
| 2 |
* Copyright (C) 2015-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 "events/UniqueEvent.h" |
| 12 |
#include "media/MediaType.h" |
| 13 |
|
| 14 |
class CMediaLibraryEvent : public CUniqueEvent |
| 15 |
{ |
| 16 |
public: |
| 17 |
CMediaLibraryEvent(const MediaType& mediaType, const std::string& mediaPath, const CVariant& label, const CVariant& description, EventLevel level = EventLevel::Information); |
| 18 |
CMediaLibraryEvent(const MediaType& mediaType, const std::string& mediaPath, const CVariant& label, const CVariant& description, const std::string& icon, EventLevel level = EventLevel::Information); |
| 19 |
CMediaLibraryEvent(const MediaType& mediaType, const std::string& mediaPath, const CVariant& label, const CVariant& description, const std::string& icon, const CVariant& details, EventLevel level = EventLevel::Information); |
| 20 |
CMediaLibraryEvent(const MediaType& mediaType, const std::string& mediaPath, const CVariant& label, const CVariant& description, const std::string& icon, const CVariant& details, const CVariant& executionLabel, EventLevel level = EventLevel::Information); |
| 21 |
~CMediaLibraryEvent() override = default; |
| 22 |
|
| 23 |
const char* GetType() const override { return "MediaLibraryEvent"; } |
| 24 |
std::string GetExecutionLabel() const override; |
| 25 |
|
| 26 |
bool CanExecute() const override { return !m_mediaType.empty(); } |
| 27 |
bool Execute() const override; |
| 28 |
|
| 29 |
protected: |
| 30 |
MediaType m_mediaType; |
| 31 |
std::string m_mediaPath; |
| 32 |
}; |