diff options
Diffstat (limited to 'p2pvr/ice')
-rw-r--r-- | p2pvr/ice/Jamfile.jam | 1 | ||||
-rw-r--r-- | p2pvr/ice/commonHelpers.h | 9 | ||||
-rw-r--r-- | p2pvr/ice/converters.cpp | 18 | ||||
-rw-r--r-- | p2pvr/ice/p2pvr.ice | 6 |
4 files changed, 20 insertions, 14 deletions
diff --git a/p2pvr/ice/Jamfile.jam b/p2pvr/ice/Jamfile.jam index ca27324..98d6018 100644 --- a/p2pvr/ice/Jamfile.jam +++ b/p2pvr/ice/Jamfile.jam @@ -12,6 +12,7 @@ lib p2pvrice : <library>..//adhocutil <library>..//p2ice <library>slicer + <cflags>-fvisibility=hidden <slicer>yes : : <include>. diff --git a/p2pvr/ice/commonHelpers.h b/p2pvr/ice/commonHelpers.h index 3f7e57d..67e861c 100644 --- a/p2pvr/ice/commonHelpers.h +++ b/p2pvr/ice/commonHelpers.h @@ -5,6 +5,7 @@ #include <ostream> #include <iomanip> #include <boost/date_time/posix_time/posix_time_types.hpp> +#include <visibility.h> namespace Common { template<typename C, typename T> @@ -30,13 +31,13 @@ namespace Common { return o; } - boost::posix_time::ptime operator*(const Common::DateTime &); - boost::posix_time::time_duration operator*(const Common::Duration &); + 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 { - Common::DateTime operator*(const boost::posix_time::ptime &); - Common::Duration operator*(const boost::posix_time::time_duration &); + DLL_PUBLIC Common::DateTime operator*(const boost::posix_time::ptime &); + DLL_PUBLIC Common::Duration operator*(const boost::posix_time::time_duration &); } } diff --git a/p2pvr/ice/converters.cpp b/p2pvr/ice/converters.cpp index 2a6b3c2..2b5f653 100644 --- a/p2pvr/ice/converters.cpp +++ b/p2pvr/ice/converters.cpp @@ -5,53 +5,53 @@ template<> VariableType -IceConvert<Common::DateTime>::ToVariable(const Common::DateTime & dt) +DLL_PUBLIC IceConvert<Common::DateTime>::ToVariable(const Common::DateTime & dt) { return *dt; } template<> VariableType -IceConvert<Common::Duration>::ToVariable(const Common::Duration & d) +DLL_PUBLIC IceConvert<Common::Duration>::ToVariable(const Common::Duration & d) { return *d; } template<> Common::DateTime -IceConvert<Common::DateTime>::FromVariable(const VariableType & dt) +DLL_PUBLIC IceConvert<Common::DateTime>::FromVariable(const VariableType & dt) { return *dt.as<boost::posix_time::ptime>(); } template<> Common::Duration -IceConvert<Common::Duration>::FromVariable(const VariableType & d) +DLL_PUBLIC 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) + DLL_PUBLIC ptimeToDateTime(boost::posix_time::ptime const & p) { return *p; } boost::posix_time::ptime - dateTimeToPTime(Common::DateTime const & c) + DLL_PUBLIC dateTimeToPTime(Common::DateTime const & c) { return *c; } Common::Duration - timedurationToDuration(const boost::posix_time::time_duration & td) + DLL_PUBLIC timedurationToDuration(const boost::posix_time::time_duration & td) { return *td; } boost::posix_time::time_duration - durationToTimeDuration(const Common::Duration & td) + DLL_PUBLIC durationToTimeDuration(const Common::Duration & td) { return *td; } diff --git a/p2pvr/ice/p2pvr.ice b/p2pvr/ice/p2pvr.ice index 8f746d1..0c9cce3 100644 --- a/p2pvr/ice/p2pvr.ice +++ b/p2pvr/ice/p2pvr.ice @@ -8,6 +8,7 @@ module P2PVR { ["project2:type"] class Event extends DVBSI::Event { + ["slicer:db:auto","slicer:db:pkey"] int EventUid; bool Current = true; }; @@ -19,6 +20,7 @@ module P2PVR { // Something that we have recorded. ["project2:type"] class Recording { + ["slicer:db:auto","slicer:db:pkey"] int RecordingId; string StorageAddress; string Guid; @@ -30,6 +32,7 @@ module P2PVR { // Something that defines what we would like to record. ["project2:type"] class Schedule { + ["slicer:db:auto","slicer:db:pkey"] int ScheduleId = 0; optional(1) int ServiceId; optional(2) int EventUid; @@ -96,7 +99,8 @@ module P2PVR { idempotent ScheduleList GetSchedules(); ["project2:rows"] idempotent ScheduledToRecordList GetScheduledToRecord(); - idempotent int UpdateSchedule(Schedule newSchedule); + idempotent int NewSchedule(Schedule newSchedule); + idempotent void UpdateSchedule(Schedule newSchedule); ["project2:task"] idempotent void DoReschedule(); }; |