01: /*
02: * TimeZoneAdjustment.java
03: *
04: * Created on January 9, 2002, 11:20 AM
05: */
06:
07: package javax.sdp;
08:
09: import java.util.*;
10:
11: /** A TimeZoneAdjustment represents the z= fields contained within a TimeDescription.
12: * A TimeZoneAdjustment
13: * specifies timezone changes which take place during or in between sessions
14: * announced in a session description.
15: *
16: * From RFC 2327:
17: *
18: * To schedule a repeated session which spans a change from daylight- saving
19: * time to standard time or
20: * vice-versa, it is necessary to specify offsets from the base repeat times.
21: * This is required because different
22: * time zones change time at different times of day, different countries change
23: * to or from daylight time on
24: * different dates, and some countries do not have daylight saving time at all.
25: *
26: * Thus in order to schedule a session that is at the same time winter and
27: * summer, it must be possible to
28: * specify unambiguously by whose time zone a session is scheduled.
29: * To simplify this task for receivers, we
30: * allow the sender to specify the NTP time that a time zone adjustment
31: * happens and the offset from the time
32: * when the session was first scheduled. The "z" field allows the sender to
33: * specify a list of these adjustment
34: * times and offsets from the base time.
35: *
36: * Please refer to IETF RFC 2327 for a description of SDP.
37: *
38: * @author deruelle
39: * @version 1.0
40: */
41: public interface TimeZoneAdjustment extends Field {
42:
43: /** Returns a Hashtable of adjustment times, where:
44: * key = Date. This is the equivalent of the decimal NTP time value.
45: * value = Int Adjustment. This is a relative time value in seconds.
46: * @param create to set
47: * @throws SdpParseException
48: * @return create - when true, an empty Hashtable is created, if it is null.
49: */
50: public Hashtable getZoneAdjustments(boolean create)
51: throws SdpParseException;
52:
53: /** Sets the Hashtable of adjustment times, where:
54: * key = Date. This is the equivalent of the decimal NTP time value.
55: * value = Int Adjustment. This is a relative time value in seconds.
56: * @param map Hashtable to set
57: * @throws SdpException if the parameter is null
58: */
59: public void setZoneAdjustments(Hashtable map) throws SdpException;
60:
61: /** Sets whether the field will be output as a typed time or a integer value.
62: *
63: * Typed time is formatted as an integer followed by a unit character.
64: * The unit indicates an appropriate multiplier for
65: * the integer.
66: *
67: * The following unit types are allowed.
68: * d - days (86400 seconds)
69: * h - hours (3600 seconds)
70: * m - minutes (60 seconds)
71: * s - seconds ( 1 seconds)
72: * @param typedTime typedTime - if set true, the start and stop times will be
73: * output in an optimal typed time format; if false, the
74: * times will be output as integers.
75: */
76: public void setTypedTime(boolean typedTime);
77:
78: /** Returns whether the field will be output as a typed time or a integer value.
79: *
80: * Typed time is formatted as an integer followed by a unit character.
81: * The unit indicates an appropriate multiplier for
82: * the integer.
83: *
84: * The following unit types are allowed.
85: * d - days (86400 seconds)
86: * h - hours (3600 seconds)
87: * m - minutes (60 seconds)
88: * s - seconds ( 1 seconds)
89: * @return true, if the field will be output as a typed time; false, if as an integer value.
90: */
91: public boolean getTypedTime();
92:
93: }
|