summaryrefslogtreecommitdiff
path: root/pages
diff options
context:
space:
mode:
authorDieter Hametner <dh (plus) vdr (at) gekrumbel (dot) de>2007-01-03 18:22:47 +0000
committerDieter Hametner <dh (plus) vdr (at) gekrumbel (dot) de>2007-01-03 18:22:47 +0000
commitf290227150bb13c72c87012e20a9ff7959f31a5f (patch)
treeb327aa93f52d5b373702eebb5e2d7e1882f7923a /pages
parente086df75301b2d17a3f6caacfa735d4c705b878b (diff)
downloadvdr-plugin-live-f290227150bb13c72c87012e20a9ff7959f31a5f.tar.gz
vdr-plugin-live-f290227150bb13c72c87012e20a9ff7959f31a5f.tar.bz2
Moved *.ecpp to pages and *.css to css subdir, added images dir
Diffstat (limited to 'pages')
-rw-r--r--pages/Makefile51
-rw-r--r--pages/channels.ecpp29
-rw-r--r--pages/menu.ecpp7
-rw-r--r--pages/schedule.ecpp45
-rw-r--r--pages/whats_on_now.ecpp65
5 files changed, 197 insertions, 0 deletions
diff --git a/pages/Makefile b/pages/Makefile
new file mode 100644
index 0000000..3c77712
--- /dev/null
+++ b/pages/Makefile
@@ -0,0 +1,51 @@
+CXX ?= g++
+AR ?= ar
+ECPPC ?= ecppc
+
+CXXFLAGS ?= -O2 -Woverloaded-virtual -Wall -fPIC
+
+CXXFLAGS += `tntnet-config --cxxflags`
+LDFLAGS += `tntnet-config --libs`
+
+INCLUDES += -I..
+
+### The directory environment:
+VDRDIR ?= ../../../..
+
+### The object files (add further files here):
+
+OBJS = styles.o menu.o channels.o schedule.o whats_on_now.o
+
+### Default rules:
+
+.PHONY: all clean
+
+### Implicit rules:
+
+%.o: %.cpp
+ $(CXX) $(CXXFLAGS) -c $(DEFINES) $(INCLUDES) $<
+
+%.cpp: %.ecpp
+ $(ECPPC) $(ECPPFLAGS) $(ECPPFLAGS_CPP) $<
+
+%.cpp: %.gif
+ $(ECPPC) $(ECPPFLAGS) $(ECPPFLAGS_GIF) -b $<
+
+%.cpp: %.jpg
+ $(ECPPC) $(ECPPFLAGS) $(ECPPFLAGS_JPG) -b $<
+
+%.cpp: %.css
+ $(ECPPC) $(ECPPFLAGS) $(ECPPFLAGS_CSS) -b $<
+
+%.cpp: %.js
+ $(ECPPC) $(ECPPFLAGS) $(ECPPFLAGS_JS) -b $<
+
+### Targets:
+
+all: libpages.a
+
+libpages.a: $(OBJS)
+ $(AR) r $@ $^
+
+clean:
+ @rm -f *~ *.o core* libpages.a $(OBJS:%.o=%.cpp)
diff --git a/pages/channels.ecpp b/pages/channels.ecpp
new file mode 100644
index 0000000..aa48f03
--- /dev/null
+++ b/pages/channels.ecpp
@@ -0,0 +1,29 @@
+<%pre>
+#include <boost/lexical_cast.hpp>
+#include <vdr/plugin.h>
+#include <vdr/channels.h>
+</%pre>
+<html>
+ <head>
+ <title><$ tr("channels") $></title>
+ </head>
+ <body>
+
+ <div id="inhalt">
+<{
+
+ for (cChannel *channel = Channels.First(); channel; channel = Channels.Next(channel)) {
+ if (!channel->GroupSep() && *channel->Name()) {
+}>
+ <div class="channel">
+ <a href="schedule.html?channel=<$ channel->Number() $>"><$ channel->Name() $></a>
+ </div>
+<{
+ }
+ }
+
+
+}>
+ </div>
+ </body>
+</html>
diff --git a/pages/menu.ecpp b/pages/menu.ecpp
new file mode 100644
index 0000000..e461ad1
--- /dev/null
+++ b/pages/menu.ecpp
@@ -0,0 +1,7 @@
+<%pre>
+#include <vdr/plugin.h>
+#include <vdr/config.h>
+</%pre>
+ <div class="menu">
+ <a href="whats_on_now.html"><$ tr("What's on now?") $></a>
+ </div> \ No newline at end of file
diff --git a/pages/schedule.ecpp b/pages/schedule.ecpp
new file mode 100644
index 0000000..76659b4
--- /dev/null
+++ b/pages/schedule.ecpp
@@ -0,0 +1,45 @@
+<%pre>
+#include <vdr/plugin.h>
+#include <vdr/channels.h>
+#include <vdr/epg.h>
+#include <vdr/config.h>
+
+</%pre>
+<%args>
+int channel;
+</%args>
+<html>
+ <head>
+ <title>ecpp-application testproject</title>
+ </head>
+ <body>
+
+ Programm für Channel Nummer <$ channel $><br/>
+
+<{
+ cSchedulesLock schedulesLock;
+ const cSchedules* schedules = cSchedules::Schedules(schedulesLock);
+
+ cChannel* Channel = Channels.GetByNumber(channel);
+ if (Channel) {
+ const cSchedule *Schedule = schedules->GetSchedule(Channel);
+ if (Schedule) {
+ for (const cEvent *ev = Schedule->Events()->First(); ev; ev = Schedule->Events()->Next(ev)) {
+}>
+ <$ ev->Title() $><br/>
+
+<{
+ }
+ } else {
+}>
+ Kein Schedule für Channel <$ Channel->Number() $>
+<{
+ }
+ } else {
+}>
+ Kein Channel mit der Nummer <$ channel $>
+<{
+ }
+}>
+ </body>
+</html>
diff --git a/pages/whats_on_now.ecpp b/pages/whats_on_now.ecpp
new file mode 100644
index 0000000..3511105
--- /dev/null
+++ b/pages/whats_on_now.ecpp
@@ -0,0 +1,65 @@
+<%pre>
+#include <vdr/plugin.h>
+#include <vdr/channels.h>
+#include <vdr/epg.h>
+#include <vdr/config.h>
+#include <vdr/i18n.h>
+#include "tools.h"
+
+using namespace vdrlive;
+
+</%pre>
+<%args>
+</%args>
+<{
+
+cSchedulesLock schedulesLock;
+const cSchedules* Schedules = cSchedules::Schedules(schedulesLock);
+
+
+}>
+<html>
+ <head>
+ <title>VDR-Live - <$ tr("What's on now?") $></title>
+ <link rel="stylesheet" type="text/css" href="/styles.css" />
+ </head>
+ <body>
+ <div class="left_area">
+<& menu >
+ </div>
+ <div class="inhalt">
+ <div class="head_box">
+ <$ tr("What's running at") $> <$ FormatDateTime(tr("%I.%M %p"), time(0)) $>
+ </div>
+
+<{
+ for (cChannel *Channel = Channels.First(); Channel; Channel = Channels.Next(Channel)) {
+ if (!Channel->GroupSep()) {
+ const cSchedule *Schedule = Schedules->GetSchedule(Channel);
+ if (Schedule) {
+ const cEvent *Event = Schedule->GetPresentEvent();
+ if (Event) {
+ std::string title(Event->Title() ? Event->Title() : "");
+ std::string short_description(Event->ShortText() ? Event->ShortText() : "");
+ std::string description(Event->Description() ? Event->Description() : "");
+}>
+ <div class="event">
+ <div class="station"><$ Channel->Name() $></div>
+ <div class="tools">
+ &nbsp;
+ </div>
+ <div class="content">
+ <span class="title"><$ title $></span><br/>
+ <span class="short"><$ short_description $></span>
+ <div class="description"><$ description $></div>
+ </div>
+ </div>
+<{
+ }
+ }
+ }
+ }
+}>
+ </div>
+ </body>
+</html>