Kodi Development 22.0
for Binary and Script based Add-Ons
 
Loading...
Searching...
No Matches
Monitor.h
1/*
2 * Copyright (C) 2005-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 "AddonCallback.h"
12#include "AddonString.h"
13
14namespace XBMCAddon
15{
16 namespace xbmc
17 {
18
29 class Monitor : public AddonCallback
30 {
31 String Id;
32 long invokerId;
33 CEvent abortEvent;
34 public:
35 Monitor();
36
37#ifndef SWIG
38 inline void OnSettingsChanged() { XBMC_TRACE; invokeCallback(new CallbackFunction<Monitor>(this,&Monitor::onSettingsChanged)); }
39 inline void OnScreensaverActivated() { XBMC_TRACE; invokeCallback(new CallbackFunction<Monitor>(this,&Monitor::onScreensaverActivated)); }
40 inline void OnScreensaverDeactivated() { XBMC_TRACE; invokeCallback(new CallbackFunction<Monitor>(this,&Monitor::onScreensaverDeactivated)); }
41 inline void OnDPMSActivated() { XBMC_TRACE; invokeCallback(new CallbackFunction<Monitor>(this,&Monitor::onDPMSActivated)); }
42 inline void OnDPMSDeactivated() { XBMC_TRACE; invokeCallback(new CallbackFunction<Monitor>(this,&Monitor::onDPMSDeactivated)); }
43 inline void OnScanStarted(const String &library)
44 {
45 XBMC_TRACE;
46 invokeCallback(
47 new CallbackFunction<Monitor, const String>(this, &Monitor::onScanStarted, library));
48 }
49 inline void OnScanFinished(const String &library)
50 {
51 XBMC_TRACE;
52 invokeCallback(
53 new CallbackFunction<Monitor, const String>(this, &Monitor::onScanFinished, library));
54 }
55 inline void OnCleanStarted(const String& library)
56 {
57 XBMC_TRACE;
58 invokeCallback(
59 new CallbackFunction<Monitor, const String>(this, &Monitor::onCleanStarted, library));
60 }
61 inline void OnCleanFinished(const String& library)
62 {
63 XBMC_TRACE;
64 invokeCallback(
65 new CallbackFunction<Monitor, const String>(this, &Monitor::onCleanFinished, library));
66 }
67 inline void OnNotification(const String& sender, const String& method, const String& data)
68 {
69 XBMC_TRACE;
70 invokeCallback(new CallbackFunction<Monitor, const String, const String, const String>(
71 this, &Monitor::onNotification, sender, method, data));
72 }
73
74 inline const String& GetId() { return Id; }
75 inline long GetInvokerId() { return invokerId; }
76
81#endif
82
83#ifdef DOXYGEN_SHOULD_USE_THIS
92#else
93 virtual void onSettingsChanged() { XBMC_TRACE; }
94#endif
95
96#ifdef DOXYGEN_SHOULD_USE_THIS
105#else
106 virtual void onScreensaverActivated() { XBMC_TRACE; }
107#endif
108
109#ifdef DOXYGEN_SHOULD_USE_THIS
118#else
119 virtual void onScreensaverDeactivated() { XBMC_TRACE; }
120#endif
121
122#ifdef DOXYGEN_SHOULD_USE_THIS
131#else
132 virtual void onDPMSActivated() { XBMC_TRACE; }
133#endif
134
135#ifdef DOXYGEN_SHOULD_USE_THIS
144#else
145 virtual void onDPMSDeactivated() { XBMC_TRACE; }
146#endif
147
148#ifdef DOXYGEN_SHOULD_USE_THIS
165#else
166 virtual void onScanStarted(const String library) { XBMC_TRACE; }
167#endif
168
169#ifdef DOXYGEN_SHOULD_USE_THIS
186#else
187 virtual void onScanFinished(const String library) { XBMC_TRACE; }
188#endif
189
190#ifdef DOXYGEN_SHOULD_USE_THIS
207#else
208 virtual void onCleanStarted(const String library) { XBMC_TRACE; }
209#endif
210
211#ifdef DOXYGEN_SHOULD_USE_THIS
228#else
229 virtual void onCleanFinished(const String library) { XBMC_TRACE; }
230#endif
231
232#ifdef DOXYGEN_SHOULD_USE_THIS
249#else
250 virtual void onNotification(const String sender, const String method, const String data)
251 {
252 XBMC_TRACE;
253 }
254#endif
255
256#ifdef DOXYGEN_SHOULD_USE_THIS
288#else
289 bool waitForAbort(double timeout = -1);
290#endif
291
292#ifdef DOXYGEN_SHOULD_USE_THIS
304#else
305 bool abortRequested();
306#endif
307 ~Monitor() override;
308 };
310 }
311};
Definition Monitor.h:30
onDPMSDeactivated()
<h4><code><span style="font-style: italic;">Function: </span><span style="font-style: bold;"><font co...
onScanFinished(...)
<h4><code><span style="font-style: italic;">Function: </span><span style="font-style: bold;"><font co...
onNotification(...)
<h4><code><span style="font-style: italic;">Function: </span><span style="font-style: bold;"><font co...
waitForAbort(...)
<h4><code><span style="font-style: italic;">Function: </span><span style="font-style: bold;"><font co...
onCleanFinished(...)
<h4><code><span style="font-style: italic;">Function: </span><span style="font-style: bold;"><font co...
onDPMSActivated()
<h4><code><span style="font-style: italic;">Function: </span><span style="font-style: bold;"><font co...
onScreensaverActivated()
<h4><code><span style="font-style: italic;">Function: </span><span style="font-style: bold;"><font co...
onScanStarted(...)
<h4><code><span style="font-style: italic;">Function: </span><span style="font-style: bold;"><font co...
onSettingsChanged()
<h4><code><span style="font-style: italic;">Function: </span><span style="font-style: bold;"><font co...
abortRequested()
<h4><code><span style="font-style: italic;">Function: </span><span style="font-style: bold;"><font co...
onCleanStarted(...)
<h4><code><span style="font-style: italic;">Function: </span><span style="font-style: bold;"><font co...
onScreensaverDeactivated()
<h4><code><span style="font-style: italic;">Function: </span><span style="font-style: bold;"><font co...