aboutsummaryrefslogtreecommitdiffstats
path: root/lib/cosTime/src/CosTime.idl
diff options
context:
space:
mode:
authorErlang/OTP <[email protected]>2009-11-20 14:54:40 +0000
committerErlang/OTP <[email protected]>2009-11-20 14:54:40 +0000
commit84adefa331c4159d432d22840663c38f155cd4c1 (patch)
treebff9a9c66adda4df2106dfd0e5c053ab182a12bd /lib/cosTime/src/CosTime.idl
downloadotp-84adefa331c4159d432d22840663c38f155cd4c1.tar.gz
otp-84adefa331c4159d432d22840663c38f155cd4c1.tar.bz2
otp-84adefa331c4159d432d22840663c38f155cd4c1.zip
The R13B03 release.OTP_R13B03
Diffstat (limited to 'lib/cosTime/src/CosTime.idl')
-rw-r--r--lib/cosTime/src/CosTime.idl59
1 files changed, 59 insertions, 0 deletions
diff --git a/lib/cosTime/src/CosTime.idl b/lib/cosTime/src/CosTime.idl
new file mode 100644
index 0000000000..2bf32681c1
--- /dev/null
+++ b/lib/cosTime/src/CosTime.idl
@@ -0,0 +1,59 @@
+#ifndef _COS_TIME_IDL_
+#define _COS_TIME_IDL_
+
+#pragma prefix "omg.org"
+
+#include<TimeBase.idl>
+
+module CosTime {
+ enum TimeComparison {
+ TCEqualTo,
+ TCLessThan,
+ TCGreaterThan,
+ TCIndeterminate
+ };
+ enum ComparisonType{
+ IntervalC,
+ MidC };
+ enum OverlapType {
+ OTContainer,
+ OTContained,
+ OTOverlap,
+ OTNoOverlap
+ };
+
+ exception TimeUnavailable {};
+ interface TIO; // forward declaration
+
+ interface UTO {
+ readonly attribute TimeBase::TimeT time;
+ readonly attribute TimeBase::InaccuracyT inaccuracy;
+ readonly attribute TimeBase::TdfT tdf;
+ readonly attribute TimeBase::UtcT utc_time;
+
+ UTO absolute_time();
+ TimeComparison compare_time( in ComparisonType comparison_type, in UTO uto );
+ TIO time_to_interval( in UTO uto );
+ TIO interval();
+ };
+
+ interface TIO {
+ readonly attribute TimeBase::IntervalT time_interval;
+
+ OverlapType spans ( in UTO time, out TIO overlap );
+ OverlapType overlaps ( in TIO interval, out TIO overlap );
+ UTO time ();
+ };
+
+ interface TimeService {
+ UTO universal_time()
+ raises(TimeUnavailable );
+ UTO secure_universal_time()
+ raises(TimeUnavailable );
+ UTO new_universal_time( in TimeBase::TimeT time, in TimeBase::InaccuracyT inaccuracy, in TimeBase::TdfT tdf );
+ UTO uto_from_utc( in TimeBase::UtcT utc );
+ TIO new_interval( in TimeBase::TimeT lower, in TimeBase::TimeT upper );
+ };
+};
+
+#endif