Thread: [Commits] : Tuxbox-GIT: apps branch master updated. CVS-Final-259-g60b9400
Tuxbox Sources
Brought to you by:
dbt1
|
From: Thilo G. <tux...@ne...> - 2013-10-08 18:29:37
|
Project "Tuxbox-GIT: apps":
The branch, master has been updated
via 60b94000dd45add3c5500d695414e9c0088a1839 (commit)
via 4c00b3bb3e5e3843648a905114e454790a46cc22 (commit)
via 811be23c9c30430b4f83281ce1e4972dc7f348b1 (commit)
via 803552f7a379b4d434f1d28fb27b27d2aebdeee6 (commit)
via cc3e7a66fbe098e78d50afa1b9b372bfb6752133 (commit)
via 12ab0b7e20b05ddb3afe89356294d69e11e7093f (commit)
via a08e7fedbaf7eb76ab8302a9fd5c8b1a9ada5814 (commit)
via 1b5381ba119db406d542e2a88f705c4e96421989 (commit)
via b5685c0abf361202341745a2a57a7b63c0e38561 (commit)
via 358d43f095c2a123e4a45f8760872865b317da2a (commit)
via 406febf33d8bbac872cdb1adae8afdfd09a5cee2 (commit)
via 8fdfcc1e28e9f407f6858606e2fa105437e99377 (commit)
via 0a0e89f81e7fb03b165a693426ff782e0cd298d7 (commit)
via b2bf57b1861aafc5ffd3a23e97023436eb43d124 (commit)
via 16d3f5ec18c7a3a736179a631716c1603460b16b (commit)
via 775a5153d57c5ece8e42fd420c02097762b1028b (commit)
via abd52a350476743defc79e8319aeb81d4357074d (commit)
via dbaf75c798c74807f44491b4ec022c2661720d1f (commit)
via 3c09ec2c982938669836f3e139d3f3973e68deef (commit)
via 907effcb1b7b412e04ac6913a538bdf9dd75e9cb (commit)
from b0d16a5af89815a4de0478a20b356abb2c0f0534 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 60b94000dd45add3c5500d695414e9c0088a1839
Author: Christian Schuett <Gau...@ho...>
Date: Fri Oct 4 22:03:32 2013 +0200
Neutrino: consider event start time when finding current and selected ...
... event in alphabetically sorted event list
events can have the same id with different start times, so maybe the wrong
entries are marked
Signed-off-by: Christian Schuett <Gau...@ho...>
diff --git a/tuxbox/neutrino/src/gui/eventlist.cpp b/tuxbox/neutrino/src/gui/eventlist.cpp
index 759978d..93da0d2 100644
--- a/tuxbox/neutrino/src/gui/eventlist.cpp
+++ b/tuxbox/neutrino/src/gui/eventlist.cpp
@@ -354,7 +354,9 @@ int EventList::exec(const t_channel_id channel_id, const std::string& channelnam
continue;
event_id_t current_event_id = (current_event > -1) ? evtlist[current_event].eventID : 0;
+ time_t current_event_start_time = (current_event > -1) ? evtlist[current_event].startTime : 0;
event_id_t selected_id = evtlist[selected].eventID;
+ time_t selected_start_time = evtlist[selected].startTime;
if(sort_mode==0)
{
sort_mode++;
@@ -370,14 +372,16 @@ int EventList::exec(const t_channel_id channel_id, const std::string& channelnam
{
for (current_event = 0; current_event < (int)evtlist.size(); current_event++)
{
- if (evtlist[current_event].eventID == current_event_id)
+ if (evtlist[current_event].eventID == current_event_id &&
+ evtlist[current_event].startTime == current_event_start_time)
break;
}
}
// find selected
for ( selected=0 ; selected < evtlist.size(); selected++ )
{
- if ( evtlist[selected].eventID == selected_id )
+ if (evtlist[selected].eventID == selected_id &&
+ evtlist[selected].startTime == selected_start_time)
break;
}
oldselected=selected;
commit 4c00b3bb3e5e3843648a905114e454790a46cc22
Author: Christian Schuett <Gau...@ho...>
Date: Thu Oct 3 17:57:06 2013 +0200
Neutrino: fix current event marker in alphabetically sorted event list
Signed-off-by: Christian Schuett <Gau...@ho...>
diff --git a/tuxbox/neutrino/src/gui/eventlist.cpp b/tuxbox/neutrino/src/gui/eventlist.cpp
index dc9e2f7..759978d 100644
--- a/tuxbox/neutrino/src/gui/eventlist.cpp
+++ b/tuxbox/neutrino/src/gui/eventlist.cpp
@@ -353,7 +353,8 @@ int EventList::exec(const t_channel_id channel_id, const std::string& channelnam
if (showfollow)
continue;
- unsigned long long selected_id = evtlist[selected].eventID;
+ event_id_t current_event_id = (current_event > -1) ? evtlist[current_event].eventID : 0;
+ event_id_t selected_id = evtlist[selected].eventID;
if(sort_mode==0)
{
sort_mode++;
@@ -364,6 +365,15 @@ int EventList::exec(const t_channel_id channel_id, const std::string& channelnam
sort_mode=0;
sort(evtlist.begin(),evtlist.end(),sortByDateTime);
}
+ // find current
+ if (current_event > -1)
+ {
+ for (current_event = 0; current_event < (int)evtlist.size(); current_event++)
+ {
+ if (evtlist[current_event].eventID == current_event_id)
+ break;
+ }
+ }
// find selected
for ( selected=0 ; selected < evtlist.size(); selected++ )
{
commit 811be23c9c30430b4f83281ce1e4972dc7f348b1
Author: Christian Schuett <Gau...@ho...>
Date: Thu Oct 3 14:54:29 2013 +0200
Neutrino: make member 'text' of CMenuSeparator protected
Signed-off-by: Christian Schuett <Gau...@ho...>
diff --git a/tuxbox/neutrino/src/gui/widget/menue.cpp b/tuxbox/neutrino/src/gui/widget/menue.cpp
index 6dca5fb..13aaf64 100644
--- a/tuxbox/neutrino/src/gui/widget/menue.cpp
+++ b/tuxbox/neutrino/src/gui/widget/menue.cpp
@@ -1228,8 +1228,7 @@ int CMenuSeparator::paint(bool /*selected*/)
}
if ((type & STRING))
{
- const char * l_text;
- l_text = getString();
+ const char * l_text = getString();
if (text != NONEXISTANT_LOCALE || strlen(l_text) != 0)
{
diff --git a/tuxbox/neutrino/src/gui/widget/menue.h b/tuxbox/neutrino/src/gui/widget/menue.h
index af095e2..3ce475c 100644
--- a/tuxbox/neutrino/src/gui/widget/menue.h
+++ b/tuxbox/neutrino/src/gui/widget/menue.h
@@ -137,11 +137,10 @@ class CMenuSeparator : public CMenuItem
int type;
protected:
+ neutrino_locale_t text;
std::string separator_text;
public:
- neutrino_locale_t text;
-
enum
{
EMPTY = 0,
@@ -161,7 +160,7 @@ class CMenuSeparator : public CMenuItem
int getHeight(void) const;
virtual const char * getString(void);
- virtual void setString(const std::string& text);
+ virtual void setString(const std::string& s_text);
};
class CMenuForwarder : public CMenuItem
commit 803552f7a379b4d434f1d28fb27b27d2aebdeee6
Author: Christian Schuett <Gau...@ho...>
Date: Wed Oct 2 21:51:43 2013 +0200
Neutrino: simplify CKeyValue, also rename a member of CMenuForwarder
Signed-off-by: Christian Schuett <Gau...@ho...>
diff --git a/tuxbox/neutrino/src/gui/widget/keychooser.cpp b/tuxbox/neutrino/src/gui/widget/keychooser.cpp
index f45b291..7190d2a 100644
--- a/tuxbox/neutrino/src/gui/widget/keychooser.cpp
+++ b/tuxbox/neutrino/src/gui/widget/keychooser.cpp
@@ -45,7 +45,6 @@
class CKeyValue : public CMenuSeparator
{
- std::string the_text;
public:
int keyvalue;
@@ -55,10 +54,10 @@ public:
virtual const char * getString(void)
{
- the_text = g_Locale->getText(LOCALE_KEYCHOOSERMENU_CURRENTKEY);
- the_text += ": ";
- the_text += CRCInput::getKeyName(keyvalue);
- return the_text.c_str();
+ separator_text = g_Locale->getText(text);
+ separator_text += ": ";
+ separator_text += CRCInput::getKeyName(keyvalue);
+ return separator_text.c_str();
};
};
diff --git a/tuxbox/neutrino/src/gui/widget/menue.cpp b/tuxbox/neutrino/src/gui/widget/menue.cpp
index 672603c..6dca5fb 100644
--- a/tuxbox/neutrino/src/gui/widget/menue.cpp
+++ b/tuxbox/neutrino/src/gui/widget/menue.cpp
@@ -1068,7 +1068,7 @@ CMenuForwarder::CMenuForwarder(const char * const Text, const bool Active, const
option = Option;
option_string = NULL;
text = NONEXISTANT_LOCALE;
- the_text = Text;
+ forwarder_text = Text;
active = Active;
jumpTarget = Target;
actionKey = ActionKey ? ActionKey : "";
@@ -1081,7 +1081,7 @@ CMenuForwarder::CMenuForwarder(const char * const Text, const bool Active, const
option = NULL;
option_string = &Option;
text = NONEXISTANT_LOCALE;
- the_text = Text;
+ forwarder_text = Text;
active = Active;
jumpTarget = Target;
actionKey = ActionKey ? ActionKey : "";
@@ -1118,7 +1118,7 @@ void CMenuForwarder::setTextLocale(const neutrino_locale_t Text)
// Without this, the changeNotifiers would become machine-dependent.
void CMenuForwarder::setText(const char * const Text)
{
- the_text = Text;
+ forwarder_text = Text;
if (used && x != -1)
paint();
@@ -1151,7 +1151,7 @@ const char * CMenuForwarder::getName(void)
{
if (text != NONEXISTANT_LOCALE)
return g_Locale->getText(text);
- return the_text.c_str();
+ return forwarder_text.c_str();
}
int CMenuForwarder::paint(bool selected)
diff --git a/tuxbox/neutrino/src/gui/widget/menue.h b/tuxbox/neutrino/src/gui/widget/menue.h
index fbbe821..af095e2 100644
--- a/tuxbox/neutrino/src/gui/widget/menue.h
+++ b/tuxbox/neutrino/src/gui/widget/menue.h
@@ -135,6 +135,8 @@ class CMenuItem
class CMenuSeparator : public CMenuItem
{
int type;
+
+ protected:
std::string separator_text;
public:
@@ -171,7 +173,7 @@ class CMenuForwarder : public CMenuItem
protected:
neutrino_locale_t text;
- std::string the_text;
+ std::string forwarder_text;
virtual const char * getOption(void);
virtual const char * getName(void);
commit cc3e7a66fbe098e78d50afa1b9b372bfb6752133
Author: Christian Schuett <Gau...@ho...>
Date: Wed Oct 2 20:10:04 2013 +0200
Neutrino: fix current event marker in event list and EPG search
Signed-off-by: Christian Schuett <Gau...@ho...>
diff --git a/tuxbox/neutrino/src/gui/eventlist.cpp b/tuxbox/neutrino/src/gui/eventlist.cpp
index 4f7ab49..dc9e2f7 100644
--- a/tuxbox/neutrino/src/gui/eventlist.cpp
+++ b/tuxbox/neutrino/src/gui/eventlist.cpp
@@ -93,7 +93,7 @@ EventList::EventList()
{
frameBuffer = CFrameBuffer::getInstance();
selected = 0;
- current_event = 0;
+ current_event = -1;
m_search_list = SEARCH_LIST_NONE;
m_search_epg_item = SEARCH_LIST_NONE;
@@ -242,7 +242,7 @@ void EventList::readEvents(const t_channel_id channel_id)
sort(evtlist.begin(),evtlist.end(),sortByDateTime);
}
- current_event = (unsigned int)-1;
+ current_event = -1;
for ( e=evtlist.begin(); e!=evtlist.end(); ++e )
{
if ( e->startTime > azeit ) {
@@ -258,12 +258,19 @@ void EventList::readEvents(const t_channel_id channel_id)
evt.description = ZapitTools::UTF8_to_Latin1(g_Locale->getText(LOCALE_EPGLIST_NOEVENTS));
#warning FIXME: evtlist should be utf8-encoded
evt.eventID = 0;
+ evt.startTime = 0;
+ evt.duration = 0;
evtlist.push_back(evt);
}
- if (current_event == (unsigned int)-1)
- current_event = 0;
- selected= current_event;
+ if (current_event > -1)
+ {
+ selected = current_event;
+ if (evtlist[current_event].startTime + (long)evtlist[current_event].duration < azeit)
+ current_event = -1;
+ }
+ else
+ selected = 0;
return;
}
@@ -631,7 +638,7 @@ void EventList::paintItem(unsigned int pos)
bgcolor = COL_MENUCONTENTSELECTED_PLUS_0;
c_rad_mid = RADIUS_MID;
}
- else if (curpos == current_event)
+ else if ((int)curpos == current_event)
{
color = COL_MENUCONTENT + 1;
bgcolor = COL_MENUCONTENT_PLUS_1;
@@ -993,7 +1000,7 @@ int EventList::findEvents(void)
// remove duplicates
evtlist.resize(unique(evtlist.begin(), evtlist.end(), uniqueByIdAndDateTime) - evtlist.begin());
#endif
- current_event = (unsigned int)-1;
+ current_event = -1;
time_t azeit=time(NULL);
CChannelEventList::iterator e;
@@ -1008,12 +1015,20 @@ int EventList::findEvents(void)
{
CChannelEvent evt;
evt.description = ZapitTools::UTF8_to_Latin1(g_Locale->getText(LOCALE_EPGLIST_NOEVENTS));
+#warning FIXME: evtlist should be utf8-encoded
evt.eventID = 0;
+ evt.startTime = 0;
+ evt.duration = 0;
evtlist.push_back(evt);
}
- if (current_event == (unsigned int)-1)
- current_event = 0;
- selected= current_event;
+ if (current_event > -1)
+ {
+ selected = current_event;
+ if (evtlist[current_event].startTime + (long)evtlist[current_event].duration < azeit)
+ current_event = -1;
+ }
+ else
+ selected = 0;
name = (std::string)g_Locale->getText(LOCALE_EVENTFINDER_SEARCH) + ": '" + ZapitTools::Latin1_to_UTF8(m_search_keyword.c_str()) + "'";
}
diff --git a/tuxbox/neutrino/src/gui/eventlist.h b/tuxbox/neutrino/src/gui/eventlist.h
index c892eb8..2fb7417 100644
--- a/tuxbox/neutrino/src/gui/eventlist.h
+++ b/tuxbox/neutrino/src/gui/eventlist.h
@@ -90,10 +90,10 @@ class EventList
CChannelEventList evtlist;
void readEvents(const t_channel_id channel_id);
unsigned int selected;
- unsigned int current_event;
unsigned int liststart;
unsigned int listmaxshow;
unsigned int numwidth;
+ int current_event;
int fheight; // Fonthoehe Channellist-Inhalt
int fheight1,fheight2;
int fwidth1,fwidth2;
commit 12ab0b7e20b05ddb3afe89356294d69e11e7093f
Author: Christian Schuett <Gau...@ho...>
Date: Wed Oct 2 18:21:48 2013 +0200
nhttpd controlapi: add possibility to get timers in XML format
ported from Coolstream Git
Signed-off-by: Christian Schuett <Gau...@ho...>
diff --git a/tuxbox/neutrino/daemons/nhttpd/tuxboxapi/controlapi.cpp b/tuxbox/neutrino/daemons/nhttpd/tuxboxapi/controlapi.cpp
index 17e9f04..b667f54 100644
--- a/tuxbox/neutrino/daemons/nhttpd/tuxboxapi/controlapi.cpp
+++ b/tuxbox/neutrino/daemons/nhttpd/tuxboxapi/controlapi.cpp
@@ -169,7 +169,7 @@ const CControlAPI::TyCgiCall CControlAPI::yCgiCallList[]=
{"vcroutput", &CControlAPI::VCROutputCGI, "text/plain"},
{"scartmode", &CControlAPI::ScartModeCGI, "text/plain"},
// timer
- {"timer", &CControlAPI::TimerCGI, "text/plain"},
+ {"timer", &CControlAPI::TimerCGI, ""},
// bouquet editing
{"setbouquet", &CControlAPI::setBouquetCGI, "text/plain"},
{"savebouquet", &CControlAPI::saveBouquetCGI, "text/plain"},
@@ -251,6 +251,7 @@ void CControlAPI::TimerCGI(CyhookHandler *hh)
{
if (!hh->ParamList.empty() && hh->ParamList["format"].empty())
{
+ hh->SetHeader(HTTP_OK, "text/plain; charset=iso-8859-1");
if (hh->ParamList["action"] == "new")
doNewTimer(hh);
else if (hh->ParamList["action"] == "modify")
@@ -275,7 +276,12 @@ void CControlAPI::TimerCGI(CyhookHandler *hh)
}
else
- SendTimers(hh);
+ {
+ if (hh->ParamList["format"] == "xml")
+ SendTimersXML(hh);
+ else
+ SendTimers(hh);
+ }
}
else
hh->SendError();
@@ -1662,6 +1668,8 @@ void CControlAPI::SendTimers(CyhookHandler *hh)
NeutrinoAPI->Timerd->getTimerList(timerlist);
CTimerd::TimerList::iterator timer = timerlist.begin();
+ hh->SetHeader(HTTP_OK, "text/plain; charset=iso-8859-1");
+
for(; timer != timerlist.end();timer++)
{
// Add Data
@@ -1718,6 +1726,227 @@ void CControlAPI::SendTimers(CyhookHandler *hh)
}
//-----------------------------------------------------------------------------
+void CControlAPI::_SendTime(CyhookHandler *hh, struct tm *Time, int digits)
+{
+ char zTime[25] = {0};
+ char zDate[25] = {0};
+ strftime(zTime, 20, "%H:%M", Time);
+ strftime(zDate, 20, "%d.%m.%Y", Time);
+ hh->printf("\t\t\t\t\t<text>%s %s</text>\n", zDate, zTime);
+ hh->printf("\t\t\t\t\t<date>%s</date>\n", zDate);
+ hh->printf("\t\t\t\t\t<time>%s</time>\n", zTime);
+ hh->printf("\t\t\t\t\t<digits>%d</digits>\n", digits);
+ hh->printf("\t\t\t\t\t<day>%d</day>\n", Time->tm_mday);
+ hh->printf("\t\t\t\t\t<month>%d</month>\n", Time->tm_mon + 1);
+ hh->printf("\t\t\t\t\t<year>%d</year>\n", Time->tm_year + 1900);
+ hh->printf("\t\t\t\t\t<hour>%d</hour>\n", Time->tm_hour);
+ hh->printf("\t\t\t\t\t<min>%d</min>\n", Time->tm_min);
+}
+
+//-----------------------------------------------------------------------------
+void CControlAPI::SendTimersXML(CyhookHandler *hh)
+{
+ // Init local timer iterator
+ CTimerd::TimerList timerlist; // List of timers
+ NeutrinoAPI->Timerd->getTimerList(timerlist);
+ sort(timerlist.begin(), timerlist.end()); // sort timer
+ CTimerd::TimerList::iterator timer = timerlist.begin();
+
+// std::string xml_response = "";
+ hh->SetHeader(HTTP_OK, "text/xml; charset=iso-8859-1");
+ hh->WriteLn("<?xml version=\"1.0\" encoding=\"iso-8859-1\"?>");
+ hh->WriteLn("<timer>");
+
+ // general timer configuration
+ hh->WriteLn("\t<config>");
+
+ // Look for Recording Safety Timers too
+ int pre = 0, post = 0;
+ NeutrinoAPI->Timerd->getRecordingSafety(pre, post);
+// hh->printf("\t\t\t<recording_safety>%d</recording_safety>\n", (int)timer->recordingSafety);
+ hh->printf("\t\t\t<pre_delay>%d</pre_delay>\n", pre);
+ hh->printf("\t\t\t<post_delay>%d</post_delay>\n", post);
+ hh->WriteLn("\t</config>");
+
+ // start timer list
+ hh->WriteLn("\t<timer_list>");
+
+ for(; timer != timerlist.end(); ++timer)
+ {
+ hh->WriteLn("\t\t<timer>");
+ hh->printf("\t\t\t<type>%s</type>\n", (NeutrinoAPI->timerEventType2Str(timer->eventType)).c_str());
+ hh->printf("\t\t\t<id>%d</id>\n", timer->eventID);
+ hh->printf("\t\t\t<state>%d</state>\n", (int)timer->eventState);
+ hh->printf("\t\t\t<type_number>%d</type_number>\n", (int)timer->eventType);
+
+ // alarmtime
+ hh->WriteLn("\t\t\t<alarm>");
+
+ struct tm *alarmTime = localtime(&(timer->alarmTime));
+ hh->WriteLn("\t\t\t\t<normal>");
+ _SendTime(hh, alarmTime, (int)timer->alarmTime);
+ hh->WriteLn("\t\t\t\t</normal>");
+
+ time_t real_alarmTimeT = timer->alarmTime - pre;
+ struct tm *safetyAlarmTime = localtime(&real_alarmTimeT);
+ hh->WriteLn("\t\t\t\t<safety>");
+ _SendTime(hh, safetyAlarmTime, (int)real_alarmTimeT);
+ hh->WriteLn("\t\t\t\t</safety>");
+
+ hh->WriteLn("\t\t\t</alarm>");
+
+ // announcetime
+ hh->WriteLn("\t\t\t<announce>");
+ struct tm *announceTime = localtime(&(timer->announceTime));
+ hh->WriteLn("\t\t\t\t<normal>");
+ _SendTime(hh, announceTime, (int)timer->announceTime);
+ hh->WriteLn("\t\t\t\t</normal>");
+
+ time_t real_announceTimeT = timer->announceTime - pre;
+ struct tm *safetyAnnounceTime = localtime(&real_announceTimeT);
+ hh->WriteLn("\t\t\t\t<safety>");
+ _SendTime(hh, safetyAnnounceTime, (int)real_announceTimeT);
+ hh->WriteLn("\t\t\t\t</safety>");
+
+ hh->WriteLn("\t\t\t</announce>");
+
+ // stoptime
+ if (timer->stopTime > 0)
+ {
+ hh->WriteLn("\t\t\t<stop>");
+ struct tm *stopTime = localtime(&(timer->stopTime));
+ hh->WriteLn("\t\t\t\t<normal>");
+ _SendTime(hh, stopTime, (int)timer->stopTime);
+ hh->WriteLn("\t\t\t\t</normal>");
+
+ time_t real_stopTimeT = timer->stopTime - post;
+ struct tm *safetyStopTime = localtime(&real_stopTimeT);
+ hh->WriteLn("\t\t\t\t<safety>");
+ _SendTime(hh, safetyStopTime, (int)real_stopTimeT);
+ hh->WriteLn("\t\t\t\t</safety>");
+
+ hh->WriteLn("\t\t\t</stop>");
+ }
+
+ // repeat
+ std::string zRep = NeutrinoAPI->timerEventRepeat2Str(timer->eventRepeat);
+ std::string zRepCount;
+ if (timer->eventRepeat == CTimerd::TIMERREPEAT_ONCE)
+ zRepCount = "-";
+ else
+ zRepCount = (timer->repeatCount == 0) ? "∞" : string_printf("%dx",timer->repeatCount);
+ hh->WriteLn("\t\t\t<repeat>");
+ hh->printf("\t\t\t\t<count>%s</count>\n", zRepCount.c_str());
+ hh->printf("\t\t\t\t<number>%d</number>\n", (int)timer->eventRepeat);
+ hh->printf("\t\t\t\t<text>%s</text>\n", zRep.c_str());
+ char weekdays[8]= {0};
+ NeutrinoAPI->Timerd->setWeekdaysToStr(timer->eventRepeat, weekdays);
+ hh->printf("\t\t\t\t<weekdays>%s</weekdays>\n", weekdays);
+ hh->WriteLn("\t\t\t</repeat>");
+
+ // channel infos
+ std::string channel_name = ZapitTools::UTF8_to_Latin1(NeutrinoAPI->Zapit->getChannelName(timer->channel_id).c_str());
+ if (channel_name.empty())
+ channel_name = NeutrinoAPI->Zapit->isChannelTVChannel(timer->channel_id) ? "Unbekannter TV-Kanal" : "Unbekannter Radiokanal";
+
+ // epg title
+ std::string title = timer->epgTitle;
+ if (timer->epgID != 0)
+ {
+ CEPGData epgdata;
+ if (NeutrinoAPI->Sectionsd->getEPGid(timer->epgID, timer->epg_starttime, &epgdata))
+ title = epgdata.title;
+ }
+
+ // timer specific data
+ switch (timer->eventType)
+ {
+ case CTimerd::TIMER_NEXTPROGRAM :
+ {
+ hh->printf("\t\t\t<channel_id>" PRINTF_CHANNEL_ID_TYPE_NO_LEADING_ZEROS "</channel_id>\n", timer->channel_id);
+ hh->printf("\t\t\t<channel_name><![CDATA[%s]]></channel_name>\n", channel_name.c_str());
+ hh->printf("\t\t\t<title><![CDATA[%s]]></title>\n", title.c_str());
+ }
+ break;
+ case CTimerd::TIMER_ZAPTO :
+ {
+ hh->printf("\t\t\t<channel_id>" PRINTF_CHANNEL_ID_TYPE_NO_LEADING_ZEROS "</channel_id>\n", timer->channel_id);
+ hh->printf("\t\t\t<channel_name><![CDATA[%s]]></channel_name>\n", channel_name.c_str());
+ hh->printf("\t\t\t<title><![CDATA[%s]]></title>\n", title.c_str());
+ }
+ break;
+ case CTimerd::TIMER_RECORD :
+ {
+ hh->printf("\t\t\t<channel_id>" PRINTF_CHANNEL_ID_TYPE_NO_LEADING_ZEROS "</channel_id>\n", timer->channel_id);
+ hh->printf("\t\t\t<channel_name><![CDATA[%s]]></channel_name>\n", channel_name.c_str());
+ hh->printf("\t\t\t<title><![CDATA[%s]]></title>\n", title.c_str());
+
+ // audio
+ if (timer->apids != TIMERD_APIDS_CONF)
+ {
+ hh->WriteLn("\t\t\t<audio>");
+ hh->WriteLn("\t\t\t\t<apids_conf>false</apids_conf>");
+ if (timer->apids & TIMERD_APIDS_STD)
+ hh->WriteLn("\t\t\t\t<apids_std>true</apids_std>");
+ else
+ hh->WriteLn("\t\t\t\t<apids_std>false</apids_std>");
+ if (timer->apids & TIMERD_APIDS_ALT)
+ hh->WriteLn("\t\t\t\t<apids_alt>true</apids_alt>");
+ else
+ hh->WriteLn("\t\t\t\t<apids_alt>false</apids_alt>");
+ if (timer->apids & TIMERD_APIDS_AC3)
+ hh->WriteLn("\t\t\t\t<apids_ac3>true</apids_ac3>");
+ else
+ hh->WriteLn("\t\t\t\t<apids_ac3>false</apids_ac3>");
+ hh->WriteLn("\t\t\t</audio>");
+ }
+ else
+ {
+ hh->WriteLn("\t\t\t<audio>");
+ hh->WriteLn("\t\t\t\t<apids_conf>true</apids_conf>");
+ hh->WriteLn("\t\t\t\t<apids_std>false</apids_std>");
+ hh->WriteLn("\t\t\t\t<apids_alt>false</apids_alt>");
+ hh->WriteLn("\t\t\t\t<apids_ac3>false</apids_ac3>");
+ hh->WriteLn("\t\t\t</audio>");
+ }
+
+ hh->printf("\t\t\t<recording_dir>%s</recording_dir>\n", timer->recordingDir);
+ hh->printf("\t\t\t<epg_id>%d</epg_id>\n", (int)timer->epgID);
+ }
+ break;
+ case CTimerd::TIMER_STANDBY :
+ {
+ hh->printf("\t\t\t<status>%s</status>\n", (timer->standby_on)? "on" : "off");
+ }
+ break;
+ case CTimerd::TIMER_REMIND :
+ {
+ std::string _message;
+ _message = std::string(timer->message).substr(0, 20);
+ hh->printf("\t\t\t<message><![CDATA[%s]]></message>\n", _message.c_str());
+ }
+ break;
+ case CTimerd::TIMER_EXEC_PLUGIN :
+ {
+ hh->printf("\t\t\t<plugin>%s</plugin>\n", timer->pluginName);
+ }
+ break;
+ case CTimerd::TIMER_SLEEPTIMER :
+ {}
+ break;
+ case CTimerd::TIMER_IMMEDIATE_RECORD :
+ {}
+ break;
+ default:
+ {}
+ }
+ hh->WriteLn("\t\t</timer>");
+ }
+ hh->WriteLn("\t</timer_list>");
+ hh->WriteLn("</timer>");
+}
+
+//-----------------------------------------------------------------------------
// yweb : Extentions
//-----------------------------------------------------------------------------
diff --git a/tuxbox/neutrino/daemons/nhttpd/tuxboxapi/controlapi.h b/tuxbox/neutrino/daemons/nhttpd/tuxboxapi/controlapi.h
index 7657a73..ab51508 100644
--- a/tuxbox/neutrino/daemons/nhttpd/tuxboxapi/controlapi.h
+++ b/tuxbox/neutrino/daemons/nhttpd/tuxboxapi/controlapi.h
@@ -38,11 +38,13 @@ private:
void SendBouquet(CyhookHandler *hh,int BouquetNr);
void SendChannelList(CyhookHandler *hh);
void SendTimers(CyhookHandler *hh);
+ void SendTimersXML(CyhookHandler *hh);
// subs
friend class CNeutrinoWebserver; // for timer /fb/ compatibility
void doModifyTimer(CyhookHandler *hh);
void doNewTimer(CyhookHandler *hh);
+ void _SendTime(CyhookHandler *hh, struct tm *Time, int digits);
//yweb
void YWeb_SendVideoStreamingPids(CyhookHandler *hh, int apid_no);
@@ -110,7 +112,7 @@ public:
// virtual functions for HookHandler/Hook
virtual std::string getHookName(void) {return std::string("mod_ControlAPI");}
- virtual std::string getHookVersion(void) {return std::string("$Revision: 1.8 $");}
+ virtual std::string getHookVersion(void) {return std::string("$Revision: 1.9 $");}
virtual THandleStatus Hook_SendResponse(CyhookHandler *hh);
virtual THandleStatus Hook_PrepareResponse(CyhookHandler *hh);
};
diff --git a/tuxbox/neutrino/daemons/nhttpd/tuxboxapi/neutrinoapi.cpp b/tuxbox/neutrino/daemons/nhttpd/tuxboxapi/neutrinoapi.cpp
index 2ffdc1e..dcece93 100644
--- a/tuxbox/neutrino/daemons/nhttpd/tuxboxapi/neutrinoapi.cpp
+++ b/tuxbox/neutrino/daemons/nhttpd/tuxboxapi/neutrinoapi.cpp
@@ -334,7 +334,7 @@ std::string CNeutrinoAPI::timerEventType2Str(CTimerd::CTimerEventTypes type)
result = "Shutdown";
break;
case CTimerd::TIMER_NEXTPROGRAM:
- result = "Nächstes Programm";
+ result = "Nächstes Programm";
break;
case CTimerd::TIMER_ZAPTO:
result = "Umschalten";
@@ -349,7 +349,7 @@ std::string CNeutrinoAPI::timerEventType2Str(CTimerd::CTimerEventTypes type)
result = "Erinnerung";
break;
case CTimerd::TIMER_EXEC_PLUGIN:
- result = "Plugin ausführen";
+ result = "Plugin ausführen";
break;
case CTimerd::TIMER_SLEEPTIMER:
result = "Sleeptimer";
@@ -371,16 +371,16 @@ std::string CNeutrinoAPI::timerEventRepeat2Str(CTimerd::CTimerEventRepeat rep)
result = "einmal";
break;
case CTimerd::TIMERREPEAT_DAILY:
- result = "täglich";
+ result = "täglich";
break;
case CTimerd::TIMERREPEAT_WEEKLY:
- result = "wöchentlich";
+ result = "wöchentlich";
break;
case CTimerd::TIMERREPEAT_BIWEEKLY:
- result = "2-wöchentlich";
+ result = "2-wöchentlich";
break;
case CTimerd::TIMERREPEAT_FOURWEEKLY:
- result = "4-wöchentlich";
+ result = "4-wöchentlich";
break;
case CTimerd::TIMERREPEAT_MONTHLY:
result = "monatlich";
commit a08e7fedbaf7eb76ab8302a9fd5c8b1a9ada5814
Author: Christian Schuett <Gau...@ho...>
Date: Sun Sep 29 14:52:04 2013 +0200
Neutrino: use cancel button instead of back button in expert-functions
Signed-off-by: Christian Schuett <Gau...@ho...>
diff --git a/tuxbox/neutrino/src/gui/update.cpp b/tuxbox/neutrino/src/gui/update.cpp
index 5b2f934..08e57b1 100644
--- a/tuxbox/neutrino/src/gui/update.cpp
+++ b/tuxbox/neutrino/src/gui/update.cpp
@@ -680,7 +680,7 @@ int CFlashExpert::showMTDSelector(const std::string & actionkey)
{
//mtd-selector erzeugen
CMenuWidget* mtdselector = new CMenuWidget(LOCALE_FLASHUPDATE_EXPERTFUNCTIONS, NEUTRINO_ICON_UPDATE, width);
- mtdselector->addIntroItems(LOCALE_FLASHUPDATE_MTDSELECTOR);
+ mtdselector->addIntroItems(LOCALE_FLASHUPDATE_MTDSELECTOR, NONEXISTANT_LOCALE, CMenuWidget::BTN_TYPE_CANCEL);
CMTDInfo* mtdInfo =CMTDInfo::getInstance();
for (int i = 0; i < mtdInfo->getMTDCount(); i++)
{
@@ -696,7 +696,7 @@ int CFlashExpert::showMTDSelector(const std::string & actionkey)
int CFlashExpert::showFileSelector(const std::string & actionkey)
{
CMenuWidget* fileselector = new CMenuWidget(LOCALE_FLASHUPDATE_EXPERTFUNCTIONS, NEUTRINO_ICON_UPDATE, width);
- fileselector->addIntroItems(LOCALE_FLASHUPDATE_FILESELECTOR);
+ fileselector->addIntroItems(LOCALE_FLASHUPDATE_FILESELECTOR, NONEXISTANT_LOCALE, CMenuWidget::BTN_TYPE_CANCEL);
struct dirent **namelist;
int n = scandir("/tmp", &namelist, 0, alphasort);
if (n < 0)
commit 1b5381ba119db406d542e2a88f705c4e96421989
Author: Christian Schuett <Gau...@ho...>
Date: Sun Sep 29 14:44:18 2013 +0200
Neutrino moviebrowser: add rounded corners to selected item
Signed-off-by: Christian Schuett <Gau...@ho...>
diff --git a/tuxbox/neutrino/src/gui/widget/listframe.cpp b/tuxbox/neutrino/src/gui/widget/listframe.cpp
index f0f9b67..fa32990 100644
--- a/tuxbox/neutrino/src/gui/widget/listframe.cpp
+++ b/tuxbox/neutrino/src/gui/widget/listframe.cpp
@@ -570,7 +570,8 @@ void CListFrame::refreshList(void)
y,
m_cFrameListRel.iWidth,
m_nFontListHeight,
- LIST_BACKGROUND_COLOR_SELECTED);
+ LIST_BACKGROUND_COLOR_SELECTED,
+ RADIUS_SMALL);
}
int width;
int x = m_cFrameListRel.iX + TEXT_BORDER_WIDTH;
@@ -622,7 +623,8 @@ void CListFrame::refreshLine(int line)
y,
m_cFrameListRel.iWidth,
m_nFontListHeight,
- LIST_BACKGROUND_COLOR_SELECTED);
+ LIST_BACKGROUND_COLOR_SELECTED,
+ RADIUS_SMALL);
}
else
{
commit b5685c0abf361202341745a2a57a7b63c0e38561
Author: Christian Schuett <Gau...@ho...>
Date: Sat Sep 28 23:22:12 2013 +0200
Neutrino filebrowser: fix a signed/unsigned comparison compiler warning
Signed-off-by: Christian Schuett <Gau...@ho...>
diff --git a/tuxbox/neutrino/src/gui/filebrowser.cpp b/tuxbox/neutrino/src/gui/filebrowser.cpp
index 34ad9cf..115b491 100644
--- a/tuxbox/neutrino/src/gui/filebrowser.cpp
+++ b/tuxbox/neutrino/src/gui/filebrowser.cpp
@@ -1261,7 +1261,7 @@ void CFileBrowser::paintItem(unsigned int pos)
char f_name[256];
std::string FileName = FILESYSTEM_ENCODING_TO_UTF8_STRING(actual_file->getFileName());
- int i = FileName.length();
+ unsigned int i = FileName.length();
sprintf(f_name, "%s", FileName.c_str());
/* too long? cut it! */
commit 358d43f095c2a123e4a45f8760872865b317da2a
Author: Christian Schuett <Gau...@ho...>
Date: Sat Sep 28 23:16:36 2013 +0200
Neutrino: consolidate CMenuForwarderNonLocalized into CMenuForwarder
Signed-off-by: Christian Schuett <Gau...@ho...>
diff --git a/tuxbox/neutrino/src/gui/audio_select.cpp b/tuxbox/neutrino/src/gui/audio_select.cpp
index 3cf0ade..7fb16b6 100644
--- a/tuxbox/neutrino/src/gui/audio_select.cpp
+++ b/tuxbox/neutrino/src/gui/audio_select.cpp
@@ -128,7 +128,7 @@ int CAudioSelectMenuHandler::doMenu()
std::ostringstream actionKey;
actionKey << "AUD: " << i;
- CMenuForwarderNonLocalized* fw = new CMenuForwarderNonLocalized(
+ CMenuForwarder* fw = new CMenuForwarder(
g_RemoteControl->current_PIDs.APIDs[i].desc,
true, NULL, this, actionKey.str().c_str(),
CRCInput::convertDigitToKey(++digit));
@@ ...
[truncated message content] |