summaryrefslogtreecommitdiff
path: root/lib/cosTime/src/CosTime.idl
blob: 2bf32681c1d01bea0a6c401403a3beb11b76328f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
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