summaryrefslogtreecommitdiff
path: root/p2pvr/ice
diff options
context:
space:
mode:
Diffstat (limited to 'p2pvr/ice')
-rw-r--r--p2pvr/ice/Jamfile.jam5
-rw-r--r--p2pvr/ice/chrono.ice (renamed from p2pvr/ice/common.ice)6
-rw-r--r--p2pvr/ice/chronoHelpers.cpp (renamed from p2pvr/ice/commonHelpers.cpp)16
-rw-r--r--p2pvr/ice/chronoHelpers.h29
-rw-r--r--p2pvr/ice/commonHelpers.h29
-rw-r--r--p2pvr/ice/converters.cpp12
-rw-r--r--p2pvr/ice/dvbsi.ice6
-rw-r--r--p2pvr/ice/p2pvr.ice10
8 files changed, 55 insertions, 58 deletions
diff --git a/p2pvr/ice/Jamfile.jam b/p2pvr/ice/Jamfile.jam
index 2283438..e91dcf2 100644
--- a/p2pvr/ice/Jamfile.jam
+++ b/p2pvr/ice/Jamfile.jam
@@ -1,12 +1,10 @@
lib slicer : : : : <include>/usr/include/slicer ;
-lib Ice ;
-lib IceUtil ;
+lib Ice : : <name>Ice++11 ;
lib pthread ;
lib p2pvrice :
[ glob *.cpp *.ice ] :
<library>Ice
- <library>IceUtil
<library>pthread
<library>..//adhocutil
<library>slicer
@@ -14,7 +12,6 @@ lib p2pvrice :
: :
<include>.
<library>Ice
- <library>IceUtil
<library>pthread
;
diff --git a/p2pvr/ice/common.ice b/p2pvr/ice/chrono.ice
index 3dc309c..eddda7f 100644
--- a/p2pvr/ice/common.ice
+++ b/p2pvr/ice/chrono.ice
@@ -1,9 +1,9 @@
-#ifndef COMMON_ICE
-#define COMMON_ICE
+#ifndef CHRONO_ICE
+#define CHRONO_ICE
[["cpp:include:boost/date_time/posix_time/posix_time_types.hpp"]]
-module Common {
+module Chrono {
[ "slicer:conversion:boost.posix_time.ptime:ptimeToDateTime:dateTimeToPTime" ]
struct DateTime {
short Year;
diff --git a/p2pvr/ice/commonHelpers.cpp b/p2pvr/ice/chronoHelpers.cpp
index 95d4ad6..058a99f 100644
--- a/p2pvr/ice/commonHelpers.cpp
+++ b/p2pvr/ice/chronoHelpers.cpp
@@ -1,4 +1,4 @@
-#include "commonHelpers.h"
+#include "chronoHelpers.h"
#include <iomanip>
#include <boost/numeric/conversion/cast.hpp>
#include <compileTimeFormatter.h>
@@ -16,16 +16,16 @@ namespace AdHoc {
};
}
-namespace Common {
+namespace Chrono {
AdHocFormatter(DateTimeFormat, "%0p-%0p-%0pT%0p:%0p");
std::ostream &
- operator<<(std::ostream & o, const Common::DateTime & dt)
+ operator<<(std::ostream & o, const DateTime & dt)
{
return DateTimeFormat::write(o, dt.Year, dt.Month, dt.Day, dt.Hour, dt.Minute);
}
std::ostream &
- operator<<(std::ostream & o, const Common::Duration & d)
+ operator<<(std::ostream & o, const Duration & d)
{
if (d.Hours) {
o << d.Hours << "hrs ";
@@ -34,14 +34,14 @@ namespace Common {
return o;
}
- boost::posix_time::ptime operator*(const Common::DateTime & dt)
+ boost::posix_time::ptime operator*(const DateTime & dt)
{
return boost::posix_time::ptime(
boost::gregorian::date(dt.Year, dt.Month, dt.Day),
boost::posix_time::time_duration(dt.Hour, dt.Minute, 0));
}
- boost::posix_time::time_duration operator*(const Common::Duration & d)
+ boost::posix_time::time_duration operator*(const Duration & d)
{
return boost::posix_time::time_duration(d.Hours, d.Minutes, 0);
}
@@ -49,7 +49,7 @@ namespace Common {
namespace boost {
namespace posix_time {
- Common::DateTime operator*(const boost::posix_time::ptime & dt)
+ Chrono::DateTime operator*(const boost::posix_time::ptime & dt)
{
return {
boost::numeric_cast<short, int>(dt.date().year()),
@@ -59,7 +59,7 @@ namespace boost {
boost::numeric_cast<short>(dt.time_of_day().minutes()) };
}
- Common::Duration operator*(const boost::posix_time::time_duration & d)
+ Chrono::Duration operator*(const boost::posix_time::time_duration & d)
{
return {
boost::numeric_cast<short>(d.hours()),
diff --git a/p2pvr/ice/chronoHelpers.h b/p2pvr/ice/chronoHelpers.h
new file mode 100644
index 0000000..69d2b87
--- /dev/null
+++ b/p2pvr/ice/chronoHelpers.h
@@ -0,0 +1,29 @@
+#ifndef ICE_CHRONO_HELPERS_H
+#define ICE_CHRONO_HELPERS_H
+
+#include <chrono.h>
+#include <ostream>
+#include <boost/date_time/posix_time/posix_time_types.hpp>
+#include <visibility.h>
+
+namespace Chrono {
+ DLL_PUBLIC
+ std::ostream &
+ operator<<(std::ostream & o, const Chrono::DateTime & dt);
+
+ DLL_PUBLIC
+ std::ostream &
+ operator<<(std::ostream & o, const Chrono::Duration & d);
+
+ DLL_PUBLIC boost::posix_time::ptime operator*(const Chrono::DateTime &);
+ DLL_PUBLIC boost::posix_time::time_duration operator*(const Chrono::Duration &);
+}
+namespace boost {
+ namespace posix_time {
+ DLL_PUBLIC Chrono::DateTime operator*(const boost::posix_time::ptime &);
+ DLL_PUBLIC Chrono::Duration operator*(const boost::posix_time::time_duration &);
+ }
+}
+
+#endif
+
diff --git a/p2pvr/ice/commonHelpers.h b/p2pvr/ice/commonHelpers.h
deleted file mode 100644
index fb7826d..0000000
--- a/p2pvr/ice/commonHelpers.h
+++ /dev/null
@@ -1,29 +0,0 @@
-#ifndef ICE_COMMON_HELPERS_H
-#define ICE_COMMON_HELPERS_H
-
-#include <common.h>
-#include <ostream>
-#include <boost/date_time/posix_time/posix_time_types.hpp>
-#include <visibility.h>
-
-namespace Common {
- DLL_PUBLIC
- std::ostream &
- operator<<(std::ostream & o, const Common::DateTime & dt);
-
- DLL_PUBLIC
- std::ostream &
- operator<<(std::ostream & o, const Common::Duration & d);
-
- DLL_PUBLIC boost::posix_time::ptime operator*(const Common::DateTime &);
- DLL_PUBLIC boost::posix_time::time_duration operator*(const Common::Duration &);
-}
-namespace boost {
- namespace posix_time {
- DLL_PUBLIC Common::DateTime operator*(const boost::posix_time::ptime &);
- DLL_PUBLIC Common::Duration operator*(const boost::posix_time::time_duration &);
- }
-}
-
-#endif
-
diff --git a/p2pvr/ice/converters.cpp b/p2pvr/ice/converters.cpp
index c4e9332..59cf278 100644
--- a/p2pvr/ice/converters.cpp
+++ b/p2pvr/ice/converters.cpp
@@ -1,27 +1,27 @@
-#include <common.h>
-#include "commonHelpers.h"
+#include <chrono.h>
+#include "chronoHelpers.h"
namespace Slicer {
- Common::DateTime
+ Chrono::DateTime
DLL_PUBLIC ptimeToDateTime(boost::posix_time::ptime const & p)
{
return *p;
}
boost::posix_time::ptime
- DLL_PUBLIC dateTimeToPTime(Common::DateTime const & c)
+ DLL_PUBLIC dateTimeToPTime(Chrono::DateTime const & c)
{
return *c;
}
- Common::Duration
+ Chrono::Duration
DLL_PUBLIC timedurationToDuration(const boost::posix_time::time_duration & td)
{
return *td;
}
boost::posix_time::time_duration
- DLL_PUBLIC durationToTimeDuration(const Common::Duration & td)
+ DLL_PUBLIC durationToTimeDuration(const Chrono::Duration & td)
{
return *td;
}
diff --git a/p2pvr/ice/dvbsi.ice b/p2pvr/ice/dvbsi.ice
index 63123f2..75d44f0 100644
--- a/p2pvr/ice/dvbsi.ice
+++ b/p2pvr/ice/dvbsi.ice
@@ -1,7 +1,7 @@
#ifndef DVISI_ICE
#define DVISI_ICE
-#include "common.ice"
+#include "chrono.ice"
// This attempts to define an ICE representation of domain objects contained
// within the DVB SI (Digital Video Broadcasting specification for Service
@@ -149,8 +149,8 @@ module DVBSI {
optional(1) string Subtitle;
optional(2) string Description;
optional(3) string DescriptionLang;
- Common::DateTime StartTime;
- Common::DateTime StopTime;
+ Chrono::DateTime StartTime;
+ Chrono::DateTime StopTime;
optional(4) short Episode;
optional(5) short Episodes;
optional(6) short Year;
diff --git a/p2pvr/ice/p2pvr.ice b/p2pvr/ice/p2pvr.ice
index 566dd3c..e1263b4 100644
--- a/p2pvr/ice/p2pvr.ice
+++ b/p2pvr/ice/p2pvr.ice
@@ -1,7 +1,7 @@
#ifndef P2PVR_ICE
#define P2PVR_ICE
-#include "common.ice"
+#include "chrono.ice"
#include "dvb.ice"
#include "dvbsi.ice"
@@ -33,8 +33,8 @@ module P2PVR {
optional(3) string Title;
optional(4) string Search;
int Priority = 0;
- Common::Duration Early;
- Common::Duration Late;
+ Chrono::Duration Early;
+ Chrono::Duration Late;
bool Repeats = false;
};
sequence<Schedule> ScheduleList;
@@ -108,8 +108,8 @@ module P2PVR {
idempotent Events EventsOnNow();
idempotent Events EventsInSchedules();
idempotent Events EventsInSchedule(int scheduleId);
- idempotent Events EventsInRange(Common::DateTime from, Common::DateTime to);
- idempotent Events EventSearch(optional(1) string keywords, optional(2) int serviceId, optional(3) Common::DateTime from, optional(4) Common::DateTime to);
+ idempotent Events EventsInRange(Chrono::DateTime from, Chrono::DateTime to);
+ idempotent Events EventSearch(optional(1) string keywords, optional(2) int serviceId, optional(3) Chrono::DateTime from, optional(4) Chrono::DateTime to);
};
interface Recorder {