diff options
author | Dan Goodliffe <randomdan@akira.random.lan> | 2014-12-09 16:50:31 +0000 |
---|---|---|
committer | Dan Goodliffe <randomdan@akira.random.lan> | 2014-12-09 16:50:31 +0000 |
commit | 1a35c1eb7ce39b07bc04fda09eb2b90cbf18c09b (patch) | |
tree | 1a444d58735e86eee4bf2609c6f64eb12caeb547 | |
parent | Add unit test that ensures p2 ice components compile and load (diff) | |
download | p2pvr-0.0.1.tar.bz2 p2pvr-0.0.1.tar.xz p2pvr-0.0.1.zip |
Tweaks for using slicerp2pvr-0.0.1
-rw-r--r-- | p2pvr/ice/Jamfile.jam | 3 | ||||
-rw-r--r-- | p2pvr/ice/converters.cpp | 14 | ||||
-rw-r--r-- | p2pvr/ice/dvbsi.ice | 4 |
3 files changed, 19 insertions, 2 deletions
diff --git a/p2pvr/ice/Jamfile.jam b/p2pvr/ice/Jamfile.jam index 494988f..5720bf1 100644 --- a/p2pvr/ice/Jamfile.jam +++ b/p2pvr/ice/Jamfile.jam @@ -1,7 +1,7 @@ +lib slicer : : : : <include>/usr/include/slicer ; lib Ice ; lib IceUtil ; lib pthread ; -lib slicer ; lib p2pvrice : [ glob *.cpp *.ice ] : @@ -13,7 +13,6 @@ lib p2pvrice : <library>..//p2ice <library>slicer <slicer>yes - <include>/usr/include/slicer/ : : <include>. <library>Ice diff --git a/p2pvr/ice/converters.cpp b/p2pvr/ice/converters.cpp index 94f2353..23861f8 100644 --- a/p2pvr/ice/converters.cpp +++ b/p2pvr/ice/converters.cpp @@ -30,4 +30,18 @@ IceConvert<Common::Duration>::FromVariable(const VariableType & d) { return *d.as<boost::posix_time::time_duration>(); } + +namespace Slicer { + Common::DateTime + ptimeToDateTime(boost::posix_time::ptime const & p) + { + return *p; + } + + boost::posix_time::ptime + dateTimeToPTime(Common::DateTime const & c) + { + return *c; + } +} diff --git a/p2pvr/ice/dvbsi.ice b/p2pvr/ice/dvbsi.ice index 7978d3f..29e5396 100644 --- a/p2pvr/ice/dvbsi.ice +++ b/p2pvr/ice/dvbsi.ice @@ -1,6 +1,8 @@ #ifndef DVISI_ICE #define DVISI_ICE +[["cpp:include:boost/date_time/posix_time/posix_time_types.hpp"]] + #include "common.ice" // This attempts to define an ICE representation of domain objects contained @@ -131,7 +133,9 @@ module DVBSI { optional(1) string Subtitle; optional(2) string Description; optional(3) string DescriptionLang; + [ "slicer:conversion:boost.posix_time.ptime:ptimeToDateTime:dateTimeToPTime" ] Common::DateTime StartTime; + [ "slicer:conversion:boost.posix_time.ptime:ptimeToDateTime:dateTimeToPTime" ] Common::DateTime StopTime; optional(4) short Episode; optional(5) short Episodes; |