summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2015-01-17 02:27:43 +0000
committerDan Goodliffe <dan@randomdan.homeip.net>2015-06-13 17:29:46 +0100
commit252094a184aedafb9098707c60a6d6049437d5b8 (patch)
treed8aeb1ebed5766449d01cf73caed789c216dbad4
parentRemove some no longer required UnbindColumns impls (diff)
downloadp2pvr-252094a184aedafb9098707c60a6d6049437d5b8.tar.bz2
p2pvr-252094a184aedafb9098707c60a6d6049437d5b8.tar.xz
p2pvr-252094a184aedafb9098707c60a6d6049437d5b8.zip
Add duration conversions
-rw-r--r--p2pvr/ice/converters.cpp12
-rw-r--r--p2pvr/ice/p2pvr.ice2
2 files changed, 14 insertions, 0 deletions
diff --git a/p2pvr/ice/converters.cpp b/p2pvr/ice/converters.cpp
index 23861f8..2a6b3c2 100644
--- a/p2pvr/ice/converters.cpp
+++ b/p2pvr/ice/converters.cpp
@@ -43,5 +43,17 @@ namespace Slicer {
{
return *c;
}
+
+ Common::Duration
+ timedurationToDuration(const boost::posix_time::time_duration & td)
+ {
+ return *td;
+ }
+
+ boost::posix_time::time_duration
+ durationToTimeDuration(const Common::Duration & td)
+ {
+ return *td;
+ }
}
diff --git a/p2pvr/ice/p2pvr.ice b/p2pvr/ice/p2pvr.ice
index f191ab8..ff9b859 100644
--- a/p2pvr/ice/p2pvr.ice
+++ b/p2pvr/ice/p2pvr.ice
@@ -36,7 +36,9 @@ module P2PVR {
optional(3) string Title;
optional(4) string Search;
int Priority = 0;
+ [ "slicer:conversion:boost.posix_time.time_duration:timedurationToDuration:durationToTimeDuration" ]
Common::Duration Early;
+ [ "slicer:conversion:boost.posix_time.time_duration:timedurationToDuration:durationToTimeDuration" ]
Common::Duration Late;
bool Repeats = false;
};