Merge pull request #26244 from Hitcher/media_flag_border_fix
[xbmc.git] / xbmc / pvr / PVREventLogJob.h
bloba5f0be7fa20ca5e2f60e3a8e0fd30df6d3e7e9f3
1 /*
2 * Copyright (C) 2012-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 "events/EventLog.h"
12 #include "utils/Job.h"
14 #include <string>
15 #include <vector>
17 namespace PVR
19 class CPVREventLogJob : public CJob
21 public:
22 CPVREventLogJob() = default;
24 CPVREventLogJob(bool bNotifyUser,
25 EventLevel eLevel,
26 const std::string& label,
27 const std::string& msg,
28 const std::string& icon);
30 ~CPVREventLogJob() override = default;
31 const char* GetType() const override { return "pvr-eventlog-job"; }
33 void AddEvent(bool bNotifyUser,
34 EventLevel eLevel,
35 const std::string& label,
36 const std::string& msg,
37 const std::string& icon);
39 bool DoWork() override;
41 private:
42 struct Event
44 bool m_bNotifyUser;
45 EventLevel m_eLevel{EventLevel::Information};
46 std::string m_label;
47 std::string m_msg;
48 std::string m_icon;
50 Event(bool bNotifyUser,
51 EventLevel elevel,
52 const std::string& label,
53 const std::string& msg,
54 const std::string& icon)
55 : m_bNotifyUser(bNotifyUser), m_eLevel(elevel), m_label(label), m_msg(msg), m_icon(icon)
60 std::vector<Event> m_events;
62 } // namespace PVR