Index: settings.pro
===================================================================
RCS file: /var/lib/mythcvs/mythtv/settings.pro,v
retrieving revision 1.35
diff -u -r1.35 settings.pro
--- settings.pro 29 Aug 2003 07:52:27 -0000 1.35
+++ settings.pro 1 Sep 2003 19:00:18 -0000
@@ -32,6 +32,9 @@
# Native lirc support
#CONFIG += using_lirc
#EXTRA_LIBS += -llirc_client
+
+# Xbox Additions - Currently just support for changing the LED
+#CONFIG += xbox_additions
# XvMC support, modify as necessary. Do not enable this.
#CONFIG += using_xvmc
Index: libs/libmyth/libmyth.pro
===================================================================
RCS file: /var/lib/mythcvs/mythtv/libs/libmyth/libmyth.pro,v
retrieving revision 1.32
diff -u -r1.32 libmyth.pro
--- libs/libmyth/libmyth.pro 18 Aug 2003 21:28:22 -0000 1.32
+++ libs/libmyth/libmyth.pro 1 Sep 2003 19:00:19 -0000
@@ -38,4 +38,10 @@
SOURCES += lirc.cpp lircevent.cpp
}
+xbox_additions {
+ DEFINES += XBOX_ADDITIONS
+ HEADERS += xbox.h
+ SOURCES += xbox.cpp
+}
+
INSTALLS += inc
Index: libs/libmythtv/libmythtv.pro
===================================================================
RCS file: /var/lib/mythcvs/mythtv/libs/libmythtv/libmythtv.pro,v
retrieving revision 1.38
diff -u -r1.38 libmythtv.pro
--- libs/libmythtv/libmythtv.pro 29 Aug 2003 02:15:47 -0000 1.38
+++ libs/libmythtv/libmythtv.pro 1 Sep 2003 19:00:20 -0000
@@ -43,6 +43,12 @@
DEFINES += USING_XVMC
}
+xbox_additions {
+ SOURCES += xboxtv.cpp
+ HEADERS += xboxtv.h
+ DEFINES += XBOX_ADDITIONS
+}
+
using_viahwslice {
SOURCES += videoout_viaslice.cpp
SOURCES += videoout_viaslice.h
Index: libs/libmythtv/remoteutil.cpp
===================================================================
RCS file: /var/lib/mythcvs/mythtv/libs/libmythtv/remoteutil.cpp,v
retrieving revision 1.15
diff -u -r1.15 remoteutil.cpp
--- libs/libmythtv/remoteutil.cpp 11 Aug 2003 20:44:38 -0000 1.15
+++ libs/libmythtv/remoteutil.cpp 1 Sep 2003 19:00:20 -0000
@@ -211,3 +211,10 @@
pginfo->FromStringList(strlist, 0);
}
+int RemoteIsRecording(void)
+{
+ QStringList strlist = "QUERY_ISRECORDING";
+ gContext->SendReceiveStringList(strlist);
+ return strlist[0].toInt();
+}
+
Index: libs/libmythtv/remoteutil.h
===================================================================
RCS file: /var/lib/mythcvs/mythtv/libs/libmythtv/remoteutil.h,v
retrieving revision 1.12
diff -u -r1.12 remoteutil.h
--- libs/libmythtv/remoteutil.h 11 Aug 2003 20:44:38 -0000 1.12
+++ libs/libmythtv/remoteutil.h 1 Sep 2003 19:00:20 -0000
@@ -22,5 +22,6 @@
RemoteEncoder *RemoteGetExistingRecorder(int recordernum);
void RemoteGeneratePreviewPixmap(ProgramInfo *pginfo);
void RemoteFillProginfo(ProgramInfo *pginfo, const QString &playbackhostname);
+int RemoteIsRecording(void);
#endif
Index: programs/mythfrontend/globalsettings.cpp
===================================================================
RCS file: /var/lib/mythcvs/mythtv/programs/mythfrontend/globalsettings.cpp,v
retrieving revision 1.91
diff -u -r1.91 globalsettings.cpp
--- programs/mythfrontend/globalsettings.cpp 25 Aug 2003 01:52:04 -0000 1.91
+++ programs/mythfrontend/globalsettings.cpp 1 Sep 2003 19:00:26 -0000
@@ -1027,6 +1027,48 @@
};
};
+#ifdef XBOX_ADDITIONS
+class XboxLEDDefault: public ComboBoxSetting, public GlobalSetting {
+public:
+ XboxLEDDefault():
+ GlobalSetting("XboxLEDDDefault") {
+ setLabel("Default LED mode");
+ addSelection("Off", "nnnn");
+ addSelection("Green","gggg");
+ addSelection("Yellow","yyyy");
+ addSelection("Red","rrrr");
+ setHelpText("The sets the LED mode when there is nothing else "
+ "to display");
+ };
+};
+
+class XboxLEDRecording: public ComboBoxSetting, public GlobalSetting {
+public:
+ XboxLEDRecording():
+ GlobalSetting("XboxLEDRecording") {
+ setLabel("Recording LED mode");
+ addSelection("Off", "nnnn");
+ addSelection("Green","gggg");
+ addSelection("Yellow","yyyy");
+ addSelection("Red","rrrr");
+ setHelpText("The sets the LED mode when a backend is recording");
+ };
+};
+
+class XboxCheckRec: public SpinBoxSetting, public GlobalSetting {
+public:
+ XboxCheckRec():
+ SpinBoxSetting(1, 600, 2),
+ GlobalSetting("XboxCheckRec") {
+ setLabel("Recording Check Frequency");
+ setValue(5);
+ setHelpText("This specifies how often to check if a recording "
+ "is in progress and update the Xbox LED.");
+
+ };
+};
+#endif
+
class AudioSettings: public VerticalConfigurationGroup,
public TriggeredConfigurationGroup {
public:
@@ -1230,3 +1272,14 @@
addChild(qttheme);
}
+#ifdef XBOX_ADDITIONS
+XboxSettings::XboxSettings()
+{
+ VerticalConfigurationGroup* xboxset = new VerticalConfigurationGroup(false);
+ xboxset->setLabel("Xbox");
+ xboxset->addChild(new XboxLEDDefault());
+ xboxset->addChild(new XboxLEDRecording());
+ xboxset->addChild(new XboxCheckRec());
+ addChild(xboxset);
+}
+#endif
Index: programs/mythfrontend/globalsettings.h
===================================================================
RCS file: /var/lib/mythcvs/mythtv/programs/mythfrontend/globalsettings.h,v
retrieving revision 1.28
diff -u -r1.28 globalsettings.h
--- programs/mythfrontend/globalsettings.h 28 Jun 2003 23:09:20 -0000 1.28
+++ programs/mythfrontend/globalsettings.h 1 Sep 2003 19:00:26 -0000
@@ -78,4 +78,10 @@
GeneralRankingSettings();
};
+#ifdef XBOX_ADDITIONS
+class XboxSettings: virtual public ConfigurationWizard {
+public:
+ XboxSettings();
+};
+#endif
#endif
Index: programs/mythfrontend/main.cpp
===================================================================
RCS file: /var/lib/mythcvs/mythtv/programs/mythfrontend/main.cpp,v
retrieving revision 1.98
diff -u -r1.98 main.cpp
--- programs/mythfrontend/main.cpp 18 Aug 2003 21:28:22 -0000 1.98
+++ programs/mythfrontend/main.cpp 1 Sep 2003 19:00:26 -0000
@@ -28,6 +28,11 @@
#include "guidegrid.h"
#include "mythplugin.h"
+#ifdef XBOX_ADDITIONS
+#include "xbox.h"
+#include "xboxtv.h"
+#endif
+
#define QUIT 1
#define HALTWKUP 2
#define HALT 3
@@ -272,6 +277,13 @@
{
startChannelRankings();
}
+#ifdef XBOX_ADDITIONS
+ else if (sel == "settings xboxsettings")
+ {
+ XboxSettings settings;
+ settings.exec(QSqlDatabase::database());
+ }
+#endif
}
int handleExit(void)
@@ -459,6 +471,16 @@
if (lcd_host.length() > 0 && lcd_port > 1024 && gContext->GetLCDDevice())
gContext->GetLCDDevice()->connectToHost(lcd_host, lcd_port);
+
+#ifdef XBOX_ADDITIONS
+ XboxTV* XboxHardware = new XboxTV;
+// QTimer* XboxUpdate = new QTimer(XboxHardware);
+// connect(timer, SIGNAL(timeout()), XboxHardware, SLOT(CheckRec()));
+// XboxUpdate->start(1000);
+ XboxHardware->StartRecTimer();
+// Xbox::ChangeLED(gContext->GetSetting("XboxLEDDefault","gggg"));
+#endif
+
if (a.argc() == 2)
{
Index: programs/mythfrontend/main_settings.xml
===================================================================
RCS file: /var/lib/mythcvs/mythtv/programs/mythfrontend/main_settings.xml,v
retrieving revision 1.13
diff -u -r1.13 main_settings.xml
--- programs/mythfrontend/main_settings.xml 18 Jul 2003 23:51:33 -0000 1.13
+++ programs/mythfrontend/main_settings.xml 1 Sep 2003 19:00:26 -0000
@@ -26,6 +26,13 @@
+
+