00001 // -*- C++ -*- 00002 00003 //============================================================================= 00004 /** 00005 * @file TAO_Time_Service_Server.h 00006 * 00007 * TAO_Time_Service_Server.h,v 1.16 2006/03/14 06:14:35 jtc Exp 00008 * 00009 * This class implements the CosTime::TimeService IDL interface. 00010 * 00011 * 00012 * @author Vishal Kachroo <vishal@cs.wustl.edu> 00013 */ 00014 //============================================================================= 00015 00016 00017 #ifndef TAO_TIME_SERVICE_SERVER_H 00018 #define TAO_TIME_SERVICE_SERVER_H 00019 #include /**/ "ace/pre.h" 00020 00021 #include "orbsvcs/TimeServiceS.h" 00022 #include "orbsvcs/Time/time_export.h" 00023 00024 TAO_BEGIN_VERSIONED_NAMESPACE_DECL 00025 00026 /** 00027 * @class TAO_Time_Service_Server 00028 * 00029 * @brief TimeService Object Implementation. 00030 * 00031 * The Object implementation implements methods to retrieve 00032 * current time as well as secure current time. The times are 00033 * retrieved as UTOs. The object also allows creation of a TIO 00034 * for a given time interval. In general, the TimeService 00035 * manages the UTOs and the TIOs. The notion of time returned 00036 * here is the local time of the system. 00037 */ 00038 class TAO_Time_Export TAO_Time_Service_Server : public POA_CosTime::TimeService 00039 { 00040 00041 public: 00042 // = Initialization and termination methods. 00043 /// Constructor. 00044 TAO_Time_Service_Server (void); 00045 00046 /// Destructor. 00047 ~TAO_Time_Service_Server (void); 00048 00049 /// This operation returns the current system time and an estimate of 00050 /// inaccuracy in a UTO. 00051 virtual CosTime::UTO_ptr universal_time (ACE_ENV_SINGLE_ARG_DECL) 00052 ACE_THROW_SPEC ((CORBA::SystemException, 00053 CosTime::TimeUnavailable)); 00054 00055 /** 00056 * This operation returns the current time in a UTO only if the time 00057 * can be guaranteed to have been obtained securely. Currently this operation 00058 * is not implemented and throws a CORBA::NO_IMPLEMENT exception, if called. 00059 */ 00060 virtual CosTime::UTO_ptr secure_universal_time (ACE_ENV_SINGLE_ARG_DECL) 00061 ACE_THROW_SPEC ((CORBA::SystemException, 00062 CosTime::TimeUnavailable)); 00063 00064 /// This creates a new UTO based on the given parameters. 00065 virtual CosTime::UTO_ptr new_universal_time (TimeBase::TimeT time, 00066 TimeBase::InaccuracyT inaccuracy, 00067 TimeBase::TdfT tdf 00068 ACE_ENV_ARG_DECL) 00069 ACE_THROW_SPEC ((CORBA::SystemException)); 00070 00071 /// This creates a new UTO given a time in the UtcT form. 00072 virtual CosTime::UTO_ptr uto_from_utc (const TimeBase::UtcT &utc 00073 ACE_ENV_ARG_DECL) 00074 ACE_THROW_SPEC ((CORBA::SystemException)); 00075 00076 /// This creates a new TIO with the given parameters. 00077 virtual CosTime::TIO_ptr new_interval (TimeBase::TimeT lower, 00078 TimeBase::TimeT upper 00079 ACE_ENV_ARG_DECL) 00080 ACE_THROW_SPEC ((CORBA::SystemException)); 00081 00082 }; 00083 00084 TAO_END_VERSIONED_NAMESPACE_DECL 00085 00086 #include /**/ "ace/post.h" 00087 #endif /* TAO_TIME_SERVICE_SERVER_H */