ITimetableEntry.h

00001 //           ///          //                                  C++ Cross Platform
00002 //          /////        ////
00003 //         /// XXX     XXX ///            ///////////   /////////     ///   ///
00004 //        ///    XXX XXX    ///         ///             ///    ///   ///  ///
00005 //       ///       XXX       ///         /////////     ///      //  //////
00006 //      ///      XXX XXX      ///               ///   ///    ///   ///  ///
00007 //     ////    XXX     XXX    ////    ////////////  //////////    ///   ///
00008 //    ////                     ////
00009 //   ////  M  O  B  O  T  I  X  ////////////////////////////////////////////////
00010 //  //// Security Vision Systems //////////////////////////////////////////////
00011 //
00012 //  $Author: khe_admin $
00013 //  $LastChangedBy: khe_admin $
00014 //  $LastChangedDate: 2007-05-29 15:10:15 +0200 (Tue, 29 May 2007) $
00015 //  $HeadURL: http://svn.mobotix.net/svn/mxsdk/src/shared/trunk/interfaces/ITimetableEntry.h $
00016 //
00018 
00019 
00020 
00021 #ifndef __MX_ITIMETABLEENTRY_H__
00022 #define __MX_ITIMETABLEENTRY_H__
00023 
00024 
00025 
00026 #define MX_ITIMETABLE_ID "ITimetableEntry"
00027 
00028 
00029 
00030 #include "IInterface.h"
00031 #include "ICustomDay.h"
00032 
00033 #include <mxm/core/mxmString.h>
00034 #include <mxm/core/mxm_smart.h>
00035 
00036 #include "../mx_types.h"
00037 #include "../mx_error_codes.h"
00038 
00039 namespace mx {
00040 
00042 
00045   class ITimetableEntry : virtual IInterface {
00046   public:
00047           enum EWeekdays {
00048                   eMon     = 1,
00049                   eTue     = 2,
00050                   eWed     = 4,
00051                   eThu     = 8,
00052                   eFri     = 16,
00053                   eSat     = 32,
00054                   eSun     = 64
00055           };
00056 
00057           /* set the name of the time table.
00058            * This name identifies the time table, therefore it
00059            * must be unique.
00060            */
00061           virtual void setName(const mxmString& name) = 0;
00062           /* retrieve the time table's name
00063            */
00064           virtual mxmString name() = 0;
00065           /* time tables ranges supports the concept of being active or inactive. The <tt>index</tt> is
00066            * the value that was returned by <tt>addRange</tt>.
00067            */
00068           virtual void setActive(int index, bool bActive) = 0;
00069           virtual bool active(int index) = 0;
00070 
00076           virtual EErrorCode addRange(u32 uWeekdays, int iHoursFrom, int iMinutesFrom,
00077                                                           int iHoursTo, int iMinutesTo, 
00078                                                                                                                                 int& index) = 0;
00079         
00084           virtual EErrorCode addRange(mxm::smart<ICustomDay> customDay, int iHoursFrom, int iMinutesFrom,
00085                                                                     int iHoursTo, int iMinutesTo, 
00086                                                                                                                                                          int& index) = 0;
00087 
00091           virtual bool usesCustomDay(int index) = 0;
00092 
00097           virtual bool range(u32& uWeekdays, int& iHoursFrom, int& iMinutesFrom,
00098                                                           int& iHoursTo, int& iMinutesTo, 
00099                                                                                                                                 int index) = 0;
00100 
00105           virtual bool range(mxm::smart<ICustomDay>& customDay, int& iHoursFrom, int& iMinutesFrom,
00106                                                                     int& iHoursTo, int& iMinutesTo, 
00107                                                                                                                                                          int index) = 0;
00108 
00111           virtual int countRanges() = 0;
00112   };
00113 };
00114 
00115 
00116 
00117 #endif   // __MX_ITIMETABLEENTRY_H__

Generated on Fri Jun 29 17:21:04 2007 for MxPEG SDK by  doxygen 1.4.6