MythTV master
lcddevice.cpp
Go to the documentation of this file.
1/*
2 lcddevice.cpp
3
4 a MythTV project object to control an
5 LCDproc server
6
7 (c) 2002, 2003 Thor Sigvaldason, Dan Morphis and Isaac Richards
8*/
9
10// C++ headers
11#include <cerrno>
12#include <chrono>
13#include <cmath>
14#include <cstdlib>
15#include <thread>
16
17// Qt headers
18#include <QApplication>
19#include <QTextStream>
20#include <QByteArray>
21#if QT_VERSION >= QT_VERSION_CHECK(6,0,0)
22#include <QStringConverter>
23#else
24#include <QTextCodec>
25#endif
26#include <QTcpSocket>
27#include <QTimer>
28
29// MythTV headers
30#include "lcddevice.h"
31#include "mythlogging.h"
32#include "compat.h"
33#include "mythdb.h"
34#include "mythdirs.h"
35#include "mythevent.h"
36#include "mythsocket.h"
37#include "mythsystemlegacy.h"
38#include "exitcodes.h"
39
40
41#define LOC QString("LCDdevice: ")
42
44 : m_retryTimer(new QTimer(this)), m_ledTimer(new QTimer(this))
45{
46 m_sendBuffer.clear(); m_lastCommand.clear();
47 m_lcdShowMusicItems.clear(); m_lcdKeyString.clear();
48
49 setObjectName("LCD");
50
51 // Constructor for LCD
52 //
53 // Note that this does *not* include opening the socket and initiating
54 // communications with the LDCd daemon.
55
56 LOG(VB_GENERAL, LOG_DEBUG, LOC +
57 "An LCD object now exists (LCD() was called)");
58
61 connect(this, &LCD::sendToServer, this, &LCD::sendToServerSlot, Qt::QueuedConnection);
62}
63
64bool LCD::m_enabled = false;
65bool LCD::m_serverUnavailable = false;
66LCD *LCD::m_lcd = nullptr;
67
69{
70 if (m_enabled && m_lcd == nullptr && !m_serverUnavailable)
71 m_lcd = new LCD;
72 return m_lcd;
73}
74
75void LCD::SetupLCD (void)
76{
77 QString lcd_host;
78
79 if (m_lcd)
80 {
81 delete m_lcd;
82 m_lcd = nullptr;
83 m_serverUnavailable = false;
84 }
85
86 lcd_host = GetMythDB()->GetSetting("LCDServerHost", "localhost");
87 int lcd_port = GetMythDB()->GetNumSetting("LCDServerPort", 6545);
88 m_enabled = GetMythDB()->GetBoolSetting("LCDEnable", false);
89
90 // workaround a problem with Ubuntu not resolving localhost properly
91 if (lcd_host == "localhost")
92 lcd_host = "127.0.0.1";
93
94 if (m_enabled && lcd_host.length() > 0 && lcd_port > 1024)
95 {
96 LCD *lcd = LCD::Get();
97 if (!lcd->connectToHost(lcd_host, lcd_port))
98 {
99 delete m_lcd;
100 m_lcd = nullptr;
101 m_serverUnavailable = false;
102 }
103 }
104}
105
106bool LCD::connectToHost(const QString &lhostname, unsigned int lport)
107{
108 QMutexLocker locker(&m_socketLock);
109
110 LOG(VB_NETWORK, LOG_DEBUG, LOC +
111 QString("connecting to host: %1 - port: %2")
112 .arg(lhostname).arg(lport));
113
114 // Open communications
115 // Store the hostname and port in case we need to reconnect.
116 m_hostname = lhostname;
117 m_port = lport;
118
119 // Don't even try to connect if we're currently disabled.
120 m_enabled = GetMythDB()->GetBoolSetting("LCDEnable", false);
121 if (!m_enabled)
122 {
123 m_connected = false;
124 m_serverUnavailable = true;
125 return m_connected;
126 }
127
128 // check if the 'mythlcdserver' is running
130 if (myth_system("ps ch -C mythlcdserver -o pid > /dev/null", flags) == 1)
131 {
132 // we need to start the mythlcdserver
133 LOG(VB_GENERAL, LOG_NOTICE, "Starting mythlcdserver");
134
135 if (!startLCDServer())
136 {
137 LOG(VB_GENERAL, LOG_ERR, "Failed start MythTV LCD Server");
138 return m_connected;
139 }
140
141 std::this_thread::sleep_for(500ms);
142 }
143
144 for (int count = 1; count <= 10 && !m_connected; count++)
145 {
146 LOG(VB_GENERAL, LOG_INFO, QString("Connecting to lcd server: "
147 "%1:%2 (try %3 of 10)").arg(m_hostname).arg(m_port)
148 .arg(count));
149
150 delete m_socket;
151 m_socket = new QTcpSocket();
152
153 QObject::connect(m_socket, &QIODevice::readyRead,
154 this, &LCD::ReadyRead);
155 QObject::connect(m_socket, &QAbstractSocket::disconnected,
156 this, &LCD::Disconnected);
157
158 m_socket->connectToHost(m_hostname, m_port);
159 if (m_socket->waitForConnected())
160 {
161 m_lcdReady = false;
162 m_connected = true;
163 QTextStream os(m_socket);
164 os << "HELLO\n";
165 os.flush();
166
167 break;
168 }
169 m_socket->close();
170
171 std::this_thread::sleep_for(500ms);
172 }
173
174 if (!m_connected)
175 m_serverUnavailable = true;
176
177 return m_connected;
178}
179
180void LCD::sendToServerSlot(const QString &someText)
181{
182 QMutexLocker locker(&m_socketLock);
183
184 if (!m_socket || !m_lcdReady)
185 return;
186
187 if (m_socket->thread() != QThread::currentThread())
188 {
189 LOG(VB_GENERAL, LOG_ERR,
190 "Sending to LCDServer from wrong thread.");
191 return;
192 }
193
194 // Check the socket, make sure the connection is still up
195 if (QAbstractSocket::ConnectedState != m_socket->state())
196 {
197 m_lcdReady = false;
198
199 // Ack, connection to server has been severed try to re-establish the
200 // connection
201 m_retryTimer->setSingleShot(false);
202 m_retryTimer->start(10s);
203 LOG(VB_GENERAL, LOG_ERR,
204 "Connection to LCDServer died unexpectedly. "
205 "Trying to reconnect every 10 seconds...");
206
207 m_connected = false;
208 return;
209 }
210
211 QTextStream os(m_socket);
212#if QT_VERSION < QT_VERSION_CHECK(6,0,0)
213 os.setCodec(QTextCodec::codecForName("ISO 8859-1"));
214#else
215 os.setEncoding(QStringConverter::Latin1);
216#endif
217
218 m_lastCommand = someText;
219
220 if (m_connected)
221 {
222 LOG(VB_NETWORK, LOG_DEBUG, LOC +
223 QString("Sending to Server: %1").arg(someText));
224
225 // Just stream the text out the socket
226 os << someText << "\n";
227 }
228 else
229 {
230 // Buffer this up in the hope that the connection will open soon
231
232 m_sendBuffer += someText;
233 m_sendBuffer += '\n';
234 }
235}
236
238{
239 // Reset the flag
240 m_lcdReady = false;
241 m_connected = false;
242 m_serverUnavailable = false;
243
244 // Retry to connect. . . Maybe the user restarted LCDd?
246}
247
249{
250 QMutexLocker locker(&m_socketLock);
251
252 if (!m_socket)
253 return;
254
255 QString lineFromServer;
256 QStringList aList;
257
258 // This gets activated automatically by the MythSocket class whenever
259 // there's something to read.
260 //
261 // We currently spend most of our time (except for the first line sent
262 // back) ignoring it.
263
264 int dataSize = static_cast<int>(m_socket->bytesAvailable() + 1);
265 QByteArray data(dataSize + 1, 0);
266
267 m_socket->read(data.data(), dataSize);
268
269 lineFromServer = data;
270 lineFromServer = lineFromServer.simplified();
271
272 // Make debugging be less noisy
273 if (lineFromServer != "OK")
274 LOG(VB_NETWORK, LOG_DEBUG, LOC + QString("Received from server: %1")
275 .arg(lineFromServer));
276
277 aList = lineFromServer.split(' ');
278 if (aList[0] == "CONNECTED")
279 {
280 // We got "CONNECTED", which is a response to "HELLO"
281 // get lcd width & height
282 if (aList.count() != 3)
283 {
284 LOG(VB_GENERAL, LOG_ERR, LOC + "received bad no. of arguments in "
285 "CONNECTED response from LCDServer");
286 }
287
288 bool bOK = false;
289 m_lcdWidth = aList[1].toInt(&bOK);
290 if (!bOK)
291 {
292 LOG(VB_GENERAL, LOG_ERR, LOC + "received bad int for width in "
293 "CONNECTED response from LCDServer");
294 }
295
296 m_lcdHeight = aList[2].toInt(&bOK);
297 if (!bOK)
298 {
299 LOG(VB_GENERAL, LOG_ERR, LOC + "received bad int for height in "
300 "CONNECTED response from LCDServer");
301 }
302
303 init();
304 }
305 else if (aList[0] == "HUH?")
306 {
307 LOG(VB_GENERAL, LOG_WARNING, LOC + "Something is getting passed to "
308 "LCDServer that it does not understand");
309 LOG(VB_GENERAL, LOG_WARNING, LOC +
310 QString("last command: %1").arg(m_lastCommand));
311 }
312 else if (aList[0] == "KEY")
313 {
314 handleKeyPress(aList.last().trimmed());
315 }
316}
317
318void LCD::handleKeyPress(const QString &keyPressed)
319{
320 int key = 0;
321
322 QChar mykey = keyPressed.at(0);
323 if (mykey == m_lcdKeyString.at(0))
324 key = Qt::Key_Up;
325 else if (mykey == m_lcdKeyString.at(1))
326 key = Qt::Key_Down;
327 else if (mykey == m_lcdKeyString.at(2))
328 key = Qt::Key_Left;
329 else if (mykey == m_lcdKeyString.at(3))
330 key = Qt::Key_Right;
331 else if (mykey == m_lcdKeyString.at(4))
332 key = Qt::Key_Space;
333 else if (mykey == m_lcdKeyString.at(5))
334 key = Qt::Key_Escape;
335
336 QCoreApplication::postEvent(
337 (QObject *)(QApplication::activeWindow()),
338 new ExternalKeycodeEvent(key));
339}
340
342{
343 // Stop the timer
344 m_retryTimer->stop();
345
346 // Get LCD settings
347 m_lcdShowMusic = (GetMythDB()->GetSetting("LCDShowMusic", "1") == "1");
348 m_lcdShowTime = (GetMythDB()->GetSetting("LCDShowTime", "1") == "1");
349 m_lcdShowChannel = (GetMythDB()->GetSetting("LCDShowChannel", "1") == "1");
350 m_lcdShowGeneric = (GetMythDB()->GetSetting("LCDShowGeneric", "1") == "1");
351 m_lcdShowVolume = (GetMythDB()->GetSetting("LCDShowVolume", "1") == "1");
352 m_lcdShowMenu = (GetMythDB()->GetSetting("LCDShowMenu", "1") == "1");
353 m_lcdShowRecStatus = (GetMythDB()->GetSetting("LCDShowRecStatus", "1") == "1");
354 m_lcdKeyString = GetMythDB()->GetSetting("LCDKeyString", "ABCDEF");
355
356 m_connected = true;
357 m_lcdReady = true;
358
359 // send buffer if there's anything in there
360 if (m_sendBuffer.length() > 0)
361 {
363 m_sendBuffer = "";
364 }
365}
366
368{
369 m_connected = false;
370}
371
373{
374 if (!m_lcdReady)
375 return;
376
377 LOG(VB_GENERAL, LOG_DEBUG, LOC + "stopAll");
378
379 emit sendToServer("STOP_ALL");
380}
381
382void LCD::setSpeakerLEDs(enum LCDSpeakerSet speaker, bool on)
383{
384 if (!m_lcdReady)
385 return;
386 m_lcdLedMask &= ~SPEAKER_MASK;
387 if (on)
388 m_lcdLedMask |= speaker;
389 emit sendToServer(QString("UPDATE_LEDS %1").arg(m_lcdLedMask));
390}
391
393{
394 if (!m_lcdReady)
395 return;
396
397 m_lcdLedMask &= ~AUDIO_MASK;
398 if (on)
399 m_lcdLedMask |= (acodec & AUDIO_MASK);
400
401 emit sendToServer(QString("UPDATE_LEDS %1").arg(m_lcdLedMask));
402}
403
405{
406 if (!m_lcdReady)
407 return;
408
409 m_lcdLedMask &= ~VIDEO_MASK;
410 if (on)
411 m_lcdLedMask |= (vcodec & VIDEO_MASK);
412
413 emit sendToServer(QString("UPDATE_LEDS %1").arg(m_lcdLedMask));
414}
415
417{
418 if (!m_lcdReady)
419 return;
420 m_lcdLedMask &= ~VSRC_MASK;
421 if (on)
422 m_lcdLedMask |= vsrc;
423 emit sendToServer(QString("UPDATE_LEDS %1").arg(m_lcdLedMask));
424}
425
426void LCD::setFunctionLEDs(enum LCDFunctionSet func, bool on)
427{
428 if (!m_lcdReady)
429 return;
430 m_lcdLedMask &= ~FUNC_MASK;
431 if (on)
432 m_lcdLedMask |= func;
433 emit sendToServer(QString("UPDATE_LEDS %1").arg(m_lcdLedMask));
434}
435
436void LCD::setVariousLEDs(enum LCDVariousFlags various, bool on)
437{
438 if (!m_lcdReady)
439 return;
440 if (on) {
441 m_lcdLedMask |= various;
442 if (various == VARIOUS_SPDIF)
444 } else {
445 m_lcdLedMask &= ~various;
446 if (various == VARIOUS_SPDIF)
447 m_lcdLedMask &= ~SPDIF_MASK;
448 }
449 emit sendToServer(QString("UPDATE_LEDS %1").arg(m_lcdLedMask));
450}
451
452void LCD::setTunerLEDs(enum LCDTunerSet tuner, bool on)
453{
454 if (!m_lcdReady)
455 return;
456 m_lcdLedMask &= ~TUNER_MASK;
457 if (on)
458 m_lcdLedMask |= tuner;
459 emit sendToServer(QString("UPDATE_LEDS %1").arg(m_lcdLedMask));
460}
461
462void LCD::setChannelProgress(const QString &time, float value)
463{
465 return;
466
467 value = std::clamp(value, 0.0F, 1.0F);
468 emit sendToServer(QString("SET_CHANNEL_PROGRESS %1 %2").arg(quotedString(time))
469 .arg(value));
470}
471
472void LCD::setGenericProgress(float value)
473{
475 return;
476
477 value = std::clamp(value, 0.0F, 1.0F);
478 emit sendToServer(QString("SET_GENERIC_PROGRESS 0 %1").arg(value));
479}
480
482{
484 return;
485
486 emit sendToServer("SET_GENERIC_PROGRESS 1 0.0");
487}
488
489void LCD::setMusicProgress(const QString &time, float value)
490{
491 if (!m_lcdReady || !m_lcdShowMusic)
492 return;
493
494 value = std::clamp(value, 0.0F, 1.0F);
495 emit sendToServer("SET_MUSIC_PROGRESS " + quotedString(time) + ' ' +
496 QString().setNum(value));
497}
498
499void LCD::setMusicShuffle(int shuffle)
500{
501 if (!m_lcdReady || !m_lcdShowMusic)
502 return;
503
504 emit sendToServer(QString("SET_MUSIC_PLAYER_PROP SHUFFLE %1").arg(shuffle));
505}
506
507void LCD::setMusicRepeat(int repeat)
508{
509 if (!m_lcdReady || !m_lcdShowMusic)
510 return;
511
512 emit sendToServer(QString("SET_MUSIC_PLAYER_PROP REPEAT %1").arg(repeat));
513}
514
515void LCD::setVolumeLevel(float value)
516{
518 return;
519
520 if (value < 0.0F)
521 value = 0.0F;
522 else if (value > 1.0F)
523 value = 1.0F;
524
525 // NOLINTNEXTLINE(readability-misleading-indentation)
526 emit sendToServer("SET_VOLUME_LEVEL " + QString().setNum(value));
527}
528
529void LCD::setupLEDs(int(*LedMaskFunc)(void))
530{
531 m_getLEDMask = LedMaskFunc;
532 // update LED status every 10 seconds
533 m_ledTimer->setSingleShot(false);
534 m_ledTimer->start(10s);
535}
536
538{
539 /* now implemented elsewhere for advanced icon control */
540#if 0
541 if (!lcd_ready)
542 return;
543
544 QString aString;
545 int mask = 0;
546 if (0 && m_getLEDMask)
547 mask = m_getLEDMask();
548 aString = "UPDATE_LEDS ";
549 aString += QString::number(mask);
550 emit sendToServer(aString);
551#endif
552}
553
555{
556 if (!m_lcdReady)
557 return;
558
559 LOG(VB_GENERAL, LOG_DEBUG, LOC + "switchToTime");
560
561 emit sendToServer("SWITCH_TO_TIME");
562}
563
564void LCD::switchToMusic(const QString &artist, const QString &album, const QString &track)
565{
566 if (!m_lcdReady || !m_lcdShowMusic)
567 return;
568
569 LOG(VB_GENERAL, LOG_DEBUG, LOC + "switchToMusic");
570
571 emit sendToServer("SWITCH_TO_MUSIC " + quotedString(artist) + ' '
572 + quotedString(album) + ' '
573 + quotedString(track));
574}
575
576void LCD::switchToChannel(const QString &channum, const QString &title,
577 const QString &subtitle)
578{
580 return;
581
582 LOG(VB_GENERAL, LOG_DEBUG, LOC + "switchToChannel");
583
584 emit sendToServer("SWITCH_TO_CHANNEL " + quotedString(channum) + ' '
585 + quotedString(title) + ' '
586 + quotedString(subtitle));
587}
588
589void LCD::switchToMenu(QList<LCDMenuItem> &menuItems, const QString &app_name,
590 bool popMenu)
591{
592 if (!m_lcdReady || !m_lcdShowMenu)
593 return;
594
595 LOG(VB_GENERAL, LOG_DEBUG, LOC + "switchToMenu");
596
597 if (menuItems.isEmpty())
598 return;
599
600 QString s = "SWITCH_TO_MENU ";
601
602 s += quotedString(app_name);
603 s += ' ' + QString(popMenu ? "TRUE" : "FALSE");
604
605
606 for (const auto& curItem : std::as_const(menuItems))
607 {
608 s += ' ' + quotedString(curItem.ItemName());
609
610 if (curItem.isChecked() == CHECKED)
611 s += " CHECKED";
612 else if (curItem.isChecked() == UNCHECKED)
613 s += " UNCHECKED";
614 else if (curItem.isChecked() == NOTCHECKABLE)
615 s += " NOTCHECKABLE";
616
617 s += ' ' + QString(curItem.isSelected() ? "TRUE" : "FALSE");
618 s += ' ' + QString(curItem.Scroll() ? "TRUE" : "FALSE");
619 QString sIndent;
620 sIndent.setNum(curItem.getIndent());
621 s += ' ' + sIndent;
622 }
623
624 emit sendToServer(s);
625}
626
627void LCD::switchToGeneric(QList<LCDTextItem> &textItems)
628{
630 return;
631
632 LOG(VB_GENERAL, LOG_DEBUG, LOC + "switchToGeneric");
633
634 if (textItems.isEmpty())
635 return;
636
637 QString s = "SWITCH_TO_GENERIC";
638
639 for (const auto& curItem : std::as_const(textItems))
640 {
641 QString sRow;
642 sRow.setNum(curItem.getRow());
643 s += ' ' + sRow;
644
645 if (curItem.getAlignment() == ALIGN_LEFT)
646 s += " ALIGN_LEFT";
647 else if (curItem.getAlignment() == ALIGN_RIGHT)
648 s += " ALIGN_RIGHT";
649 else if (curItem.getAlignment() == ALIGN_CENTERED)
650 s += " ALIGN_CENTERED";
651
652 s += ' ' + quotedString(curItem.getText());
653 s += ' ' + quotedString(curItem.getScreen());
654 s += ' ' + QString(curItem.getScroll() ? "TRUE" : "FALSE");
655 }
656
657 emit sendToServer(s);
658}
659
660void LCD::switchToVolume(const QString &app_name)
661{
663 return;
664
665 LOG(VB_GENERAL, LOG_DEBUG, LOC + "switchToVolume");
666
667 emit sendToServer("SWITCH_TO_VOLUME " + quotedString(app_name));
668}
669
671{
672 if (!m_lcdReady)
673 return;
674
675 LOG(VB_GENERAL, LOG_DEBUG, LOC + "switchToNothing");
676
677 emit sendToServer("SWITCH_TO_NOTHING");
678}
679
681{
682 QMutexLocker locker(&m_socketLock);
683
684 LOG(VB_GENERAL, LOG_DEBUG, LOC + "shutdown");
685
686 if (m_socket)
687 m_socket->close();
688
689 m_lcdReady = false;
690 m_connected = false;
691}
692
694{
695 QMutexLocker locker(&m_socketLock);
696
697 if (!m_lcdReady)
698 return;
699
700 LOG(VB_GENERAL, LOG_DEBUG, LOC + "RESET");
701
702 emit sendToServer("RESET");
703}
704
706{
707 m_lcd = nullptr;
708
709 LOG(VB_GENERAL, LOG_DEBUG, LOC + "An LCD device is being snuffed out of "
710 "existence (~LCD() was called)");
711
712 if (m_socket)
713 {
714 delete m_socket;
715 m_socket = nullptr;
716 m_lcdReady = false;
717 }
718}
719
720QString LCD::quotedString(const QString &string)
721{
722 QString sRes = string;
723 sRes.replace(QString("\""), QString("\"\""));
724 sRes = "\"" + sRes + "\"";
725
726 return(sRes);
727}
728
730{
731 QString command = GetAppBinDir() + "mythlcdserver";
732 command += logPropagateArgs;
735
736 uint retval = myth_system(command, flags);
737 return( retval == GENERIC_EXIT_RUNNING );
738}
Definition: lcddevice.h:170
LCD()
Definition: lcddevice.cpp:43
static LCD * Get(void)
Definition: lcddevice.cpp:68
bool m_lcdShowGeneric
Definition: lcddevice.h:337
void setAudioFormatLEDs(enum LCDAudioFormatSet acodec, bool on)
Definition: lcddevice.cpp:392
QTcpSocket * m_socket
Definition: lcddevice.h:318
void setVideoSrcLEDs(enum LCDVideoSourceSet vsrc, bool on)
Definition: lcddevice.cpp:416
QString m_sendBuffer
Definition: lcddevice.h:327
int m_lcdLedMask
Definition: lcddevice.h:348
void setVolumeLevel(float value)
Definition: lcddevice.cpp:515
~LCD() override
Definition: lcddevice.cpp:705
void init()
Definition: lcddevice.cpp:341
bool m_lcdShowChannel
Definition: lcddevice.h:339
QTimer * m_ledTimer
Definition: lcddevice.h:325
void setupLEDs(int(*LedMaskFunc)(void))
Definition: lcddevice.cpp:529
bool m_connected
Definition: lcddevice.h:322
void sendToServer(const QString &someText)
void setFunctionLEDs(enum LCDFunctionSet func, bool on)
Definition: lcddevice.cpp:426
bool m_lcdShowTime
Definition: lcddevice.h:335
static void SetupLCD(void)
Definition: lcddevice.cpp:75
QString m_lcdShowMusicItems
Definition: lcddevice.h:345
QTimer * m_retryTimer
Definition: lcddevice.h:324
bool m_lcdReady
Definition: lcddevice.h:333
bool connectToHost(const QString &hostname, unsigned int port)
Definition: lcddevice.cpp:106
void setGenericProgress(float value)
Update the generic progress bar.
Definition: lcddevice.cpp:472
static bool m_serverUnavailable
Definition: lcddevice.h:177
QRecursiveMutex m_socketLock
Definition: lcddevice.h:319
void setSpeakerLEDs(enum LCDSpeakerSet speaker, bool on)
Definition: lcddevice.cpp:382
void switchToTime()
Definition: lcddevice.cpp:554
void stopAll(void)
Definition: lcddevice.cpp:372
void setGenericBusy()
Update the generic screen to display a busy spinner.
Definition: lcddevice.cpp:481
static QString quotedString(const QString &string)
Definition: lcddevice.cpp:720
void setMusicRepeat(int repeat)
Set music player's repeat properties.
Definition: lcddevice.cpp:507
int(* m_getLEDMask)(void)
Definition: lcddevice.h:350
void resetServer(void)
Definition: lcddevice.cpp:693
QString m_hostname
Definition: lcddevice.h:320
void switchToMusic(const QString &artist, const QString &album, const QString &track)
Definition: lcddevice.cpp:564
void ReadyRead(void)
Definition: lcddevice.cpp:248
void setTunerLEDs(enum LCDTunerSet tuner, bool on)
Definition: lcddevice.cpp:452
void setMusicProgress(const QString &time, float value)
Definition: lcddevice.cpp:489
int m_lcdHeight
Definition: lcddevice.h:331
void setMusicShuffle(int shuffle)
Set music player's shuffle properties.
Definition: lcddevice.cpp:499
void setVariousLEDs(enum LCDVariousFlags various, bool on)
Definition: lcddevice.cpp:436
bool m_lcdShowRecStatus
Definition: lcddevice.h:341
void setVideoFormatLEDs(enum LCDVideoFormatSet vcodec, bool on)
Definition: lcddevice.cpp:404
void Disconnected(void)
Definition: lcddevice.cpp:367
void switchToMenu(QList< LCDMenuItem > &menuItems, const QString &app_name="", bool popMenu=true)
Definition: lcddevice.cpp:589
QString m_lastCommand
Definition: lcddevice.h:328
void switchToVolume(const QString &app_name)
Definition: lcddevice.cpp:660
bool m_lcdShowMusic
Definition: lcddevice.h:338
void switchToNothing()
Definition: lcddevice.cpp:670
void shutdown()
Definition: lcddevice.cpp:680
bool m_lcdShowVolume
Definition: lcddevice.h:340
bool m_lcdShowMenu
Definition: lcddevice.h:336
static bool startLCDServer(void)
Definition: lcddevice.cpp:729
static LCD * m_lcd
Definition: lcddevice.h:178
void outputLEDs()
Definition: lcddevice.cpp:537
void sendToServerSlot(const QString &someText)
Definition: lcddevice.cpp:180
static bool m_enabled
Definition: lcddevice.h:179
void switchToChannel(const QString &channum="", const QString &title="", const QString &subtitle="")
Definition: lcddevice.cpp:576
void switchToGeneric(QList< LCDTextItem > &textItems)
Definition: lcddevice.cpp:627
void handleKeyPress(const QString &keyPressed)
Definition: lcddevice.cpp:318
void setChannelProgress(const QString &time, float value)
Definition: lcddevice.cpp:462
void restartConnection()
Definition: lcddevice.cpp:237
QString m_lcdKeyString
Definition: lcddevice.h:346
uint m_port
Definition: lcddevice.h:321
int m_lcdWidth
Definition: lcddevice.h:330
unsigned int uint
Definition: compat.h:60
@ GENERIC_EXIT_RUNNING
Process is running.
Definition: exitcodes.h:28
#define LOC
Definition: lcddevice.cpp:41
LCDSpeakerSet
Definition: lcddevice.h:95
LCDVideoSourceSet
Definition: lcddevice.h:135
LCDTunerSet
Definition: lcddevice.h:127
LCDFunctionSet
Definition: lcddevice.h:157
@ ALIGN_CENTERED
Definition: lcddevice.h:57
@ ALIGN_LEFT
Definition: lcddevice.h:57
@ ALIGN_RIGHT
Definition: lcddevice.h:57
LCDAudioFormatSet
Definition: lcddevice.h:103
@ AUDIO_MASK
Definition: lcddevice.h:104
LCDVideoFormatSet
Definition: lcddevice.h:118
@ VIDEO_MASK
Definition: lcddevice.h:119
@ NOTCHECKABLE
Definition: lcddevice.h:17
@ CHECKED
Definition: lcddevice.h:17
@ UNCHECKED
Definition: lcddevice.h:17
LCDVariousFlags
Definition: lcddevice.h:142
@ SPDIF_MASK
Definition: lcddevice.h:152
@ VARIOUS_SPDIF
Definition: lcddevice.h:151
QString logPropagateArgs
Definition: logging.cpp:86
MythDB * GetMythDB(void)
Definition: mythdb.cpp:50
QString GetAppBinDir(void)
Definition: mythdirs.cpp:282
#define LOG(_MASK_, _LEVEL_, _QSTRING_)
Definition: mythlogging.h:39
@ kMSDontBlockInputDevs
avoid blocking LIRC & Joystick Menu
Definition: mythsystem.h:36
@ kMSRunShell
run process through shell
Definition: mythsystem.h:43
@ kMSRunBackground
run child in the background
Definition: mythsystem.h:38
@ kMSDontDisableDrawing
avoid disabling UI drawing
Definition: mythsystem.h:37
uint myth_system(const QString &command, uint flags, std::chrono::seconds timeout)
static eu8 clamp(eu8 value, eu8 low, eu8 high)
Definition: pxsup2dast.c:206