summaryrefslogtreecommitdiff
path: root/p2pvr/p2/views/schedules.cpp
blob: 2c2d020cd3267c8810be10dff8e86fa4308c7787 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#include <pch.hpp>
#include <p2pvr.h>
#include <logger.h>
#include <rowSet.h>
#include <genLoader.h>
#include <objectRowState.h>
#include "../config.h"

class ScheduleList : public RowSet {
	public:
		ScheduleList(ScriptNodePtr p) :
			RowSet(p)
		{
		}

		void execute(const Glib::ustring &, const RowProcessorCallback & rp, ExecContext *) const
		{
			auto proxy = Config::GetProxy<P2PVR::SchedulesPrx>("Schedules");
			auto schedules = proxy->GetSchedules();
			ObjectRowState<P2PVR::SchedulePtr> rs;
			BOOST_FOREACH(const auto & s, schedules) {
				BindColumns(rs, s);
				rs.process(rp);
			}
		}
};

DECLARE_LOADER("schedulelist", ScheduleList);