/** * @file XTPCalendarRecurrencePattern.h * * @copyright * (c) 1998-2025 Codejock Software, All Rights Reserved. * * This source file is the property of Codejock Software and must not be * redistributed by any means without the explicit written permission of * Codejock Software. * * The use of this source code is governed by the terms and conditions specified * in the Toolkit Pro license agreement. Codejock Software grants you, as a * single software developer, the limited right to use this software on one * computer only. * * Contact Information: * support@codejock.com * http://www.codejock.com * */ #if !defined(_XTPCALENDARRECURRENCEPATTERN_H__) # define _XTPCALENDARRECURRENCEPATTERN_H__ # if _MSC_VER > 1000 # pragma once # endif // _MSC_VER > 1000 # include "Common/Base/Diagnostic/XTPDisableNoisyWarnings.h" //////////////////////////////////////////////////////////////////////////// class CXTPCalendarData; class CXTPCalendarEvent; class CXTPCalendarEvents; class CXTPPropExchange; class CXTPCalendarCustomProperties; XTP_DEFINE_SMART_PTR_INTERNAL(CXTPCalendarEvent) XTP_DEFINE_SMART_PTR_INTERNAL(CXTPCalendarEvents) XTP_DEFINE_SMART_PTR_INTERNAL(CXTPCalendarRecurrencePattern) /** * @brief * This structure describes a reminder for an occurrence of a * recurrence event. */ class _XTP_EXT_CLASS CXTPCalendarReminderForOccurrence { public: /** * @brief * Default object constructor. * * @see ~CXTPCalendarReminderForOccurrence() */ CXTPCalendarReminderForOccurrence(); /** * @brief * Default class destructor. * * @details * Handles member items deallocation. */ virtual ~CXTPCalendarReminderForOccurrence(); DATE m_dtOccurrenceStartTime; /**< Start time of the described occurrence.*/ DATE m_dtOccurrenceEndTime; /**< End time of the described occurrence. */ int m_nbIsReminder; /**< XTPEnumCalendarReminderForOccurrenceParameters */ DATE m_dtNextReminderTime_Snoozed; /**< Date/time of the next reminder event. */ /** * @brief * Copy operator. * * @param rSrc Pointer to a source data object. * * @return A Constant reference to updated object * * @see CXTPCalendarReminderForOccurrence */ const CXTPCalendarReminderForOccurrence& operator=(const CXTPCalendarReminderForOccurrence& rSrc); }; /** * @brief * This class implements a collection of CXTPCalendarReminderForOccurrence * objects as well as some common operations on it. */ class _XTP_EXT_CLASS CXTPCalendarReminderForOccurrenceArray : public CArray { public: /** * @brief * Default collection constructor. * * @see ~CXTPCalendarReminderForOccurrenceArray() */ CXTPCalendarReminderForOccurrenceArray(); /** * @brief * Default collection destructorparameteparam * * @details * Handles member item deallocation. Decreases reference of all * stored CXTPCalendarReminderForOccurrence objects. * * @see RemoveAll() */ virtual ~CXTPCalendarReminderForOccurrenceArray(); /** * @brief * Finds an index of the occurrence event. * * @param pOccEvent Pointer to the occurrence event object. * * @return An index of the occurrence event object in the array if found; * or -1 if not found. * * @see Find() */ int Find(CXTPCalendarEvent* pOccEvent) const; /** * @brief * Finds an index of the occurrence event by its start and end time. * * @param dtOccStartTime Occurrence start time. * @param dtOccEndTime Occurrence end time. * * @return An index of the occurrence event object in the array if found; * or -1 if not found. * * @see Find() */ int Find(DATE dtOccStartTime, DATE dtOccEndTime) const; /** * @brief * Updates occurrence custom properties with the values from the * array if the necessary one is found there. * * @param pOccEvent Pointer to the occurrence event object. * @param pPattern Pointer to the parent Recurrence Pattern object for * those occurrences. * * @return Nonzero if updated successfully; zero if update failed. * * @see UpdateOccIfNeedEx */ int UpdateOccIfNeed(CXTPCalendarEvent* pOccEvent, CXTPCalendarRecurrencePattern* pPattern); /** * @brief * Updates occurrence custom properties with the values from the * provided CXTPCalendarReminderForOccurrence structure. * * @param pOccEvent Pointer to the occurrence event object. * @param pOccRmdData Pointer to the Reminder data for the occurrence. * @param pPattern Pointer to the parent Recurrence Pattern object for * those occurrences. * * @return Nonzero if updated successfully; zero if update failed. * * @see CXTPCalendarReminderForOccurrence overview * @see UpdateOccIfNeed */ static int AFX_CDECL UpdateOccIfNeedEx(CXTPCalendarEvent* pOccEvent, const CXTPCalendarReminderForOccurrence* pOccRmdData, CXTPCalendarRecurrencePattern* pPattern); /** * @brief * Loads an array of occurrences information from the Calendar * Custom Properties object. * * @param pProps Pointer to a source CXTPCalendarCustomProperties object. * * @return TRUE when loaded successfully; FALSE otherwise. * * @see Save() */ BOOL Load(CXTPCalendarCustomProperties* pProps); /** * @brief * Saves an array of occurrences information to the Calendar * Custom Properties object. * * @param pProps Pointer to a destination CXTPCalendarCustomProperties * object. * @param pPattern Pointer to the parent Recurrence Pattern object for * those occurrences. * * @return * TRUE when saved successfully; FALSE otherwise. * * @see Load() */ BOOL Save(CXTPCalendarCustomProperties* pProps, CXTPCalendarRecurrencePattern* pPattern); /** * @brief * An utility method which clears all occurrences custom properties * which was previously set by Save method. * * @param pProps Pointer to CXTPCalendarCustomProperties object to be * cleared. * * @return void. * @see Save() * @see Load() */ static void AFX_CDECL ClearProperties(CXTPCalendarCustomProperties* pProps); private: static void AFX_CDECL _PropName(LPCTSTR pcszProp, int nIndex, CString& rstrPropNameI); }; /** * @brief * This structure defines a set of Recurrence Pattern options and is used * by a CXTPRecurrencePattern to easily manage and transfer recurrence * pattern data. * * @see XTPCalendarEventRecurrenceType * @see XTPCalendarWeekDay * @see XTPCalendarWeekDay_Masks * @see XTPCalendarWeekDay * @see XTPCalendarWeek * @see CXTPRecurrencePattern */ struct XTP_CALENDAR_RECURRENCE_OPTIONS { public: /** * @brief * Defines a group of parameters to describe the Daily pattern. */ struct PATTERN_DAILY { BOOL bEveryWeekDayOnly; /**< Flag determines if the event occurs every week day.*/ int nIntervalDays; /**< Event occurs every nIntervalDays days beginning from a start date.*/ }; /** * @brief * Defines a group of parameters to describe the Weekly pattern. */ struct PATTERN_WEEKLY { int nIntervalWeeks; /**< Event occurs every nIntervalWeeks with the first week beginning from a start date.*/ int nDayOfWeekMask; /**< Determines the days of the week when an event occurs. * @see XTPCalendarWeekDay, XTPCalendarWeekDay_Masks.*/ }; /** * @brief * Defines a group of parameters to describe the Month pattern. */ struct PATTERN_MONTHLY { int nIntervalMonths; /**< Event occurs every nIntervalMonths with the first month beginning from the start date.*/ int nDayOfMonth; /**< Determines the day of the month when an event occurs. * @see XTPCalendarWeek.*/ }; /** * @brief * Defines a group of parameters to describe the Month pattern. */ struct PATTERN_MONTHNTH { int nIntervalMonths; /**< Event occurs every nIntervalMonths month beginning from start date.*/ int nWhichDay; /**< Determines the day of the month or nth order of day.*/ int nWhichDayMask; /**< Weekday code.*/ }; /** * @brief * Defines a group of parameters to describe the Year pattern. */ struct PATTERN_YEARLY { int nMonthOfYear; /**< The month of every year that the event occurs on.*/ int nDayOfMonth; /**< The day of month that the event occurs on.*/ }; /** * @brief * Defines a group of parameters to describe the Year pattern. */ struct PATTERN_YEARNTH { int nWhichDay; /**< Determines the day of the month or the nth order of the day.*/ int nWhichDayMask; /**< Weekday code.*/ int nMonthOfYear; /**< Month of the year.*/ }; public: /** * @brief * Default class constructor. */ XTP_CALENDAR_RECURRENCE_OPTIONS() { memset(this, 0, sizeof(*this)); }; /** * @brief * Copy operator. * * @param rSrc The source object reference; * * @return This object reference. */ const XTP_CALENDAR_RECURRENCE_OPTIONS& operator=(const XTP_CALENDAR_RECURRENCE_OPTIONS& rSrc) { memcpy(this, &rSrc, sizeof(*this)); return *this; } public: XTPCalendarEventRecurrenceType m_nRecurrenceType; /**< Recurrence type, See Also: XTPCalendarEventRecurrenceType.*/ // union stores active set of pattern parameters. union { PATTERN_DAILY m_Daily; /**< Options for Daily Recurrence type. */ PATTERN_WEEKLY m_Weekly; /**< Options for Weekly Recurrence type. */ PATTERN_MONTHLY m_Monthly; /**< Options for Monthly Recurrence type. */ PATTERN_MONTHNTH m_MonthNth; /**< Options for MonthNth Recurrence type.*/ PATTERN_YEARLY m_Yearly; /**< Options for Yearly Recurrence type. */ PATTERN_YEARNTH m_YearNth; /**< Options for YearNth Recurrence type. */ }; /** * @brief * Saves this object data as 4 long values. * * @param rnData1 [out] Reference to data variable number 1 * @param rnData2 [out] Reference to data variable number 2 * @param rnData3 [out] Reference to data variable number 3 * @param rnData4 [out] Reference to data variable number 4 * * @details * Useful to save data in data storage; * * @see SetData() */ void GetData(long& rnData1, long& rnData2, long& rnData3, long& rnData4) const { rnData1 = m_nRecurrenceType; rnData2 = m_YearNth.nWhichDay; rnData3 = m_YearNth.nWhichDayMask; rnData4 = m_YearNth.nMonthOfYear; } /** * @brief * Restore this object data from 4 long values previously retrieved * using GetData() member function. * * @param nData1 [in] data value number 1 * @param nData2 [in] data value number 2 * @param nData3 [in] data value number 3 * @param nData4 [in] data value number 4 * * @details * Useful to load data from data storage; * * @see GetData() */ void SetData(long nData1, long nData2, long nData3, long nData4) { _ASSERTE(nData1 >= 0 && nData1 <= 6); /**< just to check.*/ m_nRecurrenceType = (XTPCalendarEventRecurrenceType)nData1; m_YearNth.nWhichDay = nData2; m_YearNth.nWhichDayMask = nData3; m_YearNth.nMonthOfYear = nData4; } }; /** * @brief * This class represents a recurrence pattern and stores data to build * a schedule for recurrence events. * * @see CXTPCalendarEvent overview. */ class _XTP_EXT_CLASS CXTPCalendarRecurrencePattern : public CXTPCmdTarget { /** @cond */ friend class CXTPCalendarData; friend class CXTPCalendarEvent; DECLARE_DYNAMIC(CXTPCalendarRecurrencePattern) /** @endcond */ protected: /** * @brief * Protected pattern constructor. * * @param pDataProvider Pointer to a CXTPCalendarData object. * * @see ~CXTPCalendarEvent() */ CXTPCalendarRecurrencePattern(CXTPCalendarData* pDataProvider); public: /** * @brief * Default class destructor. * * @details * Handles member items deallocation. Decreases reference of * stored objects: CXTPCalendarEventLabels and * CXTPCalendarRecurrencePattern. */ virtual ~CXTPCalendarRecurrencePattern(); /** * @brief * Returns a unique pattern ID. * * @return A DWORD containing a unique pattern ID. * * @see CXTPCalendarRecurrencePattern() */ virtual DWORD GetPatternID() const; /** * @brief * Call this member function to get start date-time. * * @return COleDateTime object containing start date-time. * * @see SetStartTime(COleDateTime dtStart) */ virtual COleDateTime GetStartTime() const; /** * @brief * This member function is used to set the new start date and time. * * @param dtStart A COleDateTime object that contains the new start date value. * * @see GetStartTime() */ virtual void SetStartTime(COleDateTime dtStart); /** * @brief * Call this member function to get a duration in minutes. * * @return Integer value of a duration in minutes. * * @see SetDurationMinutes(int nMinutes) * @see GetDuration() */ virtual int GetDurationMinutes() const; /** * @brief * This member function is used to set the new duration value. * * @param nMinutes An int that contains the new duration value in minutes. * * @see GetDurationMinutes() */ virtual void SetDurationMinutes(int nMinutes); /** * @brief * Call this member function to get the duration as * a COleDateTimeSpan object. * * @return A COleDateTimeSpan object with a duration interval. * * @see SetDuration(COleDateTimeSpan spDuration, BOOL bKeepStart = TRUE) */ virtual COleDateTimeSpan GetDuration() const; /** * @brief * Call this member function to get the occurrence start date-time. * * @param dtOccurrenceStartDate COleDateTime representing the start date. * * @return A COleDateTime object that contains the parent's start date-time. * * @see SetStartOccurrenceTime(COleDateTime dtStart) */ virtual COleDateTime GetStartOccurrenceTime(COleDateTime dtOccurrenceStartDate) const; /** * @brief * Call this member function to get the occurrence end date-time * by its start time. * * @param dtOccurrenceStartDate A COleDateTime object that contains * the date-time occurrence to identify. * * @return A COleDateTime object containing the occurrence end date-time. * * @see SetStartTime(COleDateTime dtStart) */ virtual COleDateTime GetEndOccurrenceTime(COleDateTime dtOccurrenceStartDate) const; /** * @brief * This member function is used to obtain the value of the recurrence type flag. * * @return An int that contains the previous value of the Recurrence type flag. * * @see XTPCalendarEventRecurrenceType * @see XTP_CALENDAR_RECURRENCE_OPTIONS * @see SetRecurrenceOptions(const XTP_CALENDAR_RECURRENCE_OPTIONS& Options) */ virtual int GetRecurrenceType() const; /** * @brief * This member function is used to obtain a set of recurrence options. * * @return Reference to an XTP_CALENDAR_RECURRENCE_OPTIONS struct. * * @see XTP_CALENDAR_RECURRENCE_OPTIONS * @see SetRecurrenceOptions(const XTP_CALENDAR_RECURRENCE_OPTIONS& Options) */ virtual const XTP_CALENDAR_RECURRENCE_OPTIONS& GetRecurrenceOptions() const; /** * @brief * This member function is used to set the recurrence options. * * @param Options Reference to a XTP_CALENDAR_RECURRENCE_OPTIONS struct. * * @see XTP_CALENDAR_RECURRENCE_OPTIONS * @see SetRecurrenceOptions(const XTP_CALENDAR_RECURRENCE_OPTIONS& Options) */ virtual void SetRecurrenceOptions(const XTP_CALENDAR_RECURRENCE_OPTIONS& Options); /** * @brief * Call this member function to obtain the start pattern DateTime. * * @return A COleDateTime object containing the parent's start DateTime. * * @see SetPatternStartTime(COleDateTime dtStart) */ virtual COleDateTime GetPatternStartDate() const; /** * @brief * This member function is used to set the new start pattern date and time. * * @param dtStart A COleDateTime object that contains the new date value. * * @see GetPatternStartTime() */ virtual void SetPatternStartDate(COleDateTime dtStart); /** * @brief * Call this member function to obtain the end pattern DateTime. * * @return A COleDateTime object that contains the parent's end DateTime. * * @see SetPatternEndDate(COleDateTime dtEnd) */ virtual COleDateTime GetPatternEndDate() const; /** * @brief * This member function is used to set the new end pattern date. * * @param dtEnd A COleDateTime object that contains the new date value. * * @see COleDateTime * @see GetPatternEndDate() */ virtual void SetPatternEndDate(COleDateTime dtEnd); /** * @brief * This member function is used to obtain the "End After occurrences" * recurrence pattern option. * * @return An int that contains the occurrence count for the pattern end. * * @see SetEndAfterOccurrences * @see GetPatternEndDate * @see IsNoEndDate */ virtual int GetEndAfterOccurrences() const; /** * @brief * This member function is used to set the "End After occurrences" * recurrence pattern option. * * @param nOccurrences An int that contains the occurrence count for the * pattern end. * * @see GetEndAfterOccurrences * @see GetPatternEndDate * @see IsNoEndDate */ virtual void SetEndAfterOccurrences(int nOccurrences); /** * @brief * This member function is used to determine if the pattern has * an end date. * * @return A BOOL. TRUE if the pattern end is not set. FALSE otherwise. * * @see SetNoEndDate() * @see GetEndAfterOccurrences() * @see GetPatternEndDate() */ virtual BOOL IsNoEndDate() const; /** * @brief * This member function is used to reset the pattern end date. * * @see IsNoEndDate() * @see GetEndAfterOccurrences() * @see GetPatternEndDate() */ virtual void SetNoEndDate(); /** * @brief * Call this method to retrieve the value of the "use end" flag. * * @return An int that contains the "use end" flag value. * * @see XTPCalendarPatternEnd. */ virtual XTPCalendarPatternEnd GetUseEndMethod() const; /** * @brief * Call this method to retrieve the end pattern value. * * @return A reference of the associated pattern end structure. * * @see XTP_CALENDAR_PATTERN_END * @see XTPCalendarPatternEnd */ virtual const XTP_CALENDAR_PATTERN_END& GetPatternEnd() const; /** * @brief * Call this method to set the end pattern value. * * @param patternEnd A reference to the source pattern end structure. * * @see GetPatternEnd() */ virtual void SetPatternEnd(const XTP_CALENDAR_PATTERN_END& patternEnd); /** * @brief * This member function is used to obtain the occurrence dates * from the pattern in the given interval. * * @param rArDates A CDatesArray reference to an array of dates to be returned. * @param dtStart A COleDateTime object that contains the interval's begin date. * @param dtEnd A COleDateTime object that contains the interval's end date. * * @see CDatesArray */ virtual void GetOccurrencesDates(CXTPCalendarDatesArray& rArDates, COleDateTime dtStart, COleDateTime dtEnd) const; /** * @brief * This member function is used to obtain the occurrence dates * from the pattern in the given interval. * * @param pEventsArray Pointer to a CXTPCalendarEvents object that contains * the returned collection of slave events (occurrences). * @param dtStart A COleDateTime object that contains the interval's begin date. * @param dtEnd A COleDateTime object that contains the interval's end date. * @param pMasterEvent Pointer to a CXTPCalendarEvent object that contains the * master event. * * @return TRUE if succesfully obtain the dates, FALSE otherwise. * * @see CXTPCalendarEvents * @see CXTPCalendarEvent */ virtual BOOL GetOccurrences(CXTPCalendarEvents* pEventsArray, COleDateTime dtStart, COleDateTime dtEnd, CXTPCalendarEvent* pMasterEvent); /** * @brief * This member function is used to obtain a pointer to the read-write * copy of the pattern object. * * @return Smart pointer to CXTPCalendarRecurrencePattern object. * * @see CXTPCalendarRecurrencePattern. */ virtual CXTPCalendarRecurrencePatternPtr ClonePattern(); /** * @brief * This member function is used to update the pattern data from * the given pattern. * * @param pNewData A pointer to a CXTPCalendarRecurrencePattern object * that contains the pattern to update. * * @return A pointer to a CXTPCalendarRecurrencePattern object that contains * the updated pattern. * * @see CXTPCalendarRecurrencePattern. */ virtual BOOL Update(CXTPCalendarRecurrencePattern* pNewData); /** * @brief * This member function is used to obtain the master event ID value. * * @return A DWORD that contains the master event ID value. * * @see SetMasterEventID(DWORD dwEventID). */ virtual DWORD GetMasterEventID() const; /** * @brief * This member function is used to set the master event ID value. * * @param dwEventID A DWORD that contains the new master event ID value. * * @see GetMasterEventID() */ virtual void SetMasterEventID(DWORD dwEventID); /** * @brief * This member function is used to obtain a pointer to the read-only * interface of the master event. * * @return Smart pointer to CXTPCalendarEvent object. */ virtual CXTPCalendarEventPtr GetMasterEvent() const; /** * @brief * This member function is used to add an exception to the master event. * * @param pException A pointer to a CXTPCalendarEvent object which * represents the exception. * @param pMasterEventToUpdate A pointer to a CXTPCalendarEvent object * that is updated with the exception. * * @return A BOOL. TRUE if the update is successful. FALSE otherwise. * * @see CXTPCalendarEvent * @see CXTPCalendarEvent */ virtual BOOL SetException(CXTPCalendarEvent* pException, CXTPCalendarEvent* pMasterEventToUpdate = NULL); /** * @brief * This member function is used to remove an exception from the * master event. * * @param pException A pointer to a CXTPCalendarEvent object that * represents the exception. * @param pMasterEventToUpdate A pointer to the CXTPCalendarEvent object * from which the exception is removed. * * @return TRUE if successful; FALSE otherwise. * * @see CXTPCalendarEvent * @see CXTPCalendarEvent * @see RemoveAllExceptions() */ virtual BOOL RemoveException(CXTPCalendarEvent* pException, CXTPCalendarEvent* pMasterEventToUpdate = NULL); /** * @brief * This member function is used to remove all of the exceptions * from the master event. * * @see RemoveException(CXTPCalendarEvent* pException, CXTPCalendarEvent* * pMasterEventToUpdate = NULL) * @see SetException(CXTPCalendarEvent* pException, CXTPCalendarEvent* pMasterEventToUpdate * = NULL) */ virtual void RemoveAllExceptions(); /** * @brief * This member function is used to return the read-only collection * with the exception events. * * @return Smart pointer to a CXTPCalendarEvents object that contains the read-only * collection of exception events. * * @see CXTPCalendarEvent * @see CXTPCalendarEvent * @see RemoveAllExceptions() */ virtual CXTPCalendarEventsPtr GetExceptions(); /** * @brief * Call this member function to Store/Load a recurrence pattern * using the specified data object. * * @param pPX Source or destination CXTPPropExchange data object reference. * * @details * This member function is used to store data to or load data from * storage. */ virtual void DoPropExchange(CXTPPropExchange* pPX); /** * @brief * Get custom (named, user-defined) properties collection. * * @return A pointer to CXTPCalendarCustomProperties object. * * @see CXTPCalendarCustomProperties. */ CXTPCalendarCustomProperties* GetCustomProperties() const; protected: /** * @brief * This member function is used to assign an ID to a pattern. * * @param dwID Identifier to set. * * @see GetPatternID() */ void SetPatternID(DWORD dwID); private: void _GetOccurrenceStartEnd(const COleDateTime& dtOccStartDate, COleDateTime& rdtOccStart, COleDateTime& rdtOccEnd) const; public: /** * @brief * This member function is used to find the index of the exception * event by its original start and end dates. * * @param dtStartOrig A COleDateTime object that contains the start date. * @param dtEndOrig A COleDateTime object that contains the end date. * * @return An int that contains the value of the index in the collection. * -1 if the exception is not found in the collection. */ virtual int FindExceptionIndex(COleDateTime dtStartOrig, COleDateTime dtEndOrig) const; /** * @brief * This member function is used to find the exception event by its * original start and end dates. * * @param dtStartOrig A COleDateTime object that contains the start date. * @param dtEndOrig A COleDateTime object that contains the end date. * * @return If the exception event is found, then the function returns a pointer * to a CXTPCalendarEvent object that contains the exception event. * If the exception event is not found, then the function returns NULL. * * @see CXTPCalendarEvent */ virtual CXTPCalendarEvent* FindException(COleDateTime dtStartOrig, COleDateTime dtEndOrig) const; /** * @brief * This member function is used to find an exception event by its * original start and end dates. * * @param pEvents A CXTPCalendarEvents pointer that points to the collection of events to be * found. * @param dtStart A COleDateTime object that contains the start date of the search * interval. * @param dtEnd A COleDateTime object that contains the end date of search interval. * * @return A BOOL. The base class implementation alway returns TRUE. * This function should return TRUE if successful. FALSE otherwise. * * @see CXTPCalendarEvents */ virtual BOOL FindExceptions(CXTPCalendarEvents* pEvents, COleDateTime dtStart, COleDateTime dtEnd) const; /** * @brief * This member function is used to retrieve a collection of reminders * settings for occurrences of this recurrence pattern. * * @return An array of CXTPCalendarReminderForoccurrence objects for every * occurrence with configured Reminders settings. * * @see CXTPCalendarReminderForoccurrenceArray overview */ CXTPCalendarReminderForOccurrenceArray* GetOccReminders(); /** * @brief * This member function is used to setup an occurrence with new * Reminder settings. * * @param pOccEvent A CXTPCalendarEvent pointer that points to the occurrence * event which is to be modified. * @param nbIsReminder Trigger value showing whether to change enabled * reminder flag for this occurrence or not. * @param dtNextReminderTime_Snoozed Reminder snooze time. * * @see GetOccReminders() * @see XTPEnumCalendarReminderForoccurrenceParameters overview */ void SetOccReminder(CXTPCalendarEvent* pOccEvent, int nbIsReminder = xtpCalendarRmdPrm_DontChange, DATE dtNextReminderTime_Snoozed = xtpCalendarRmdPrm_DontChange); // void ResetReminderForOccFromThePast(CXTPCalendarEvent* pMasterEvent); private: DWORD m_dwPatternID; DWORD m_dwMasterEventID; CXTPCalendarReminderForOccurrenceArray m_arOccReminders; CXTPCalendarEvents* m_parExceptionEvents; CXTPCalendarData* m_ptrDataProvider; COleDateTime m_dtStartTime; int m_nDurationMinutes; XTP_CALENDAR_RECURRENCE_OPTIONS m_Options; COleDateTime m_dtPatternStartDate; XTP_CALENDAR_PATTERN_END m_PatternEnd; CXTPCalendarCustomProperties* m_pCustomProperties; /**< Custom properties collection object.*/ # ifdef _XTP_ACTIVEX DECLARE_DISPATCH_MAP() DECLARE_INTERFACE_MAP() DECLARE_OLETYPELIB_EX(CXTPCalendarRecurrencePattern); afx_msg DATE OleGetStartTime(); afx_msg void OleSetStartTime(DATE dt); DATE OleGetStartDate(); void OleSetStartDate(DATE dt); DATE OleGetEndDate(); void OleSetEndDate(DATE dt); long OleGetEndAfterOccurrences(); void OleSetEndAfterOccurrences(int nOccurrences); LPDISPATCH OleGetMasterEvent(); LPDISPATCH OleGetOptions(); LPDISPATCH OleGetExceptions(); LPDISPATCH OleCustomProperties(); void OleSetException(LPDISPATCH pExcEventDisp); void OleRemoveException(LPDISPATCH pExcEventDisp); void OleRemoveAllExceptions(); long OleGetId(); # endif }; //=========================================================================== ///////////////////////////////////////////////////////////////////////////// AFX_INLINE DWORD CXTPCalendarRecurrencePattern::GetPatternID() const { return m_dwPatternID; } AFX_INLINE COleDateTime CXTPCalendarRecurrencePattern::GetStartTime() const { return m_dtStartTime; } AFX_INLINE void CXTPCalendarRecurrencePattern::SetStartTime(COleDateTime dtStart) { m_dtStartTime = dtStart; } AFX_INLINE int CXTPCalendarRecurrencePattern::GetDurationMinutes() const { return m_nDurationMinutes; } AFX_INLINE void CXTPCalendarRecurrencePattern::SetDurationMinutes(int nMinutes) { m_nDurationMinutes = nMinutes; } AFX_INLINE int CXTPCalendarRecurrencePattern::GetRecurrenceType() const { return m_Options.m_nRecurrenceType; } AFX_INLINE const XTP_CALENDAR_RECURRENCE_OPTIONS& CXTPCalendarRecurrencePattern::GetRecurrenceOptions() const { return m_Options; } AFX_INLINE const XTP_CALENDAR_PATTERN_END& CXTPCalendarRecurrencePattern::GetPatternEnd() const { return m_PatternEnd; } AFX_INLINE COleDateTime CXTPCalendarRecurrencePattern::GetPatternStartDate() const { return m_dtPatternStartDate; } AFX_INLINE COleDateTime CXTPCalendarRecurrencePattern::GetPatternEndDate() const { return m_PatternEnd.m_dtPatternEndDate; } AFX_INLINE int CXTPCalendarRecurrencePattern::GetEndAfterOccurrences() const { return m_PatternEnd.m_nEndAfterOccurrences; } AFX_INLINE void CXTPCalendarRecurrencePattern::SetEndAfterOccurrences(int nOccurrences) { m_PatternEnd.m_nEndAfterOccurrences = nOccurrences; m_PatternEnd.m_nUseEnd = xtpCalendarPatternEndAfterOccurrences; } AFX_INLINE BOOL CXTPCalendarRecurrencePattern::IsNoEndDate() const { return (m_PatternEnd.m_nUseEnd == xtpCalendarPatternEndNoDate); } AFX_INLINE void CXTPCalendarRecurrencePattern::SetNoEndDate() { m_PatternEnd.m_nUseEnd = xtpCalendarPatternEndNoDate; } AFX_INLINE XTPCalendarPatternEnd CXTPCalendarRecurrencePattern::GetUseEndMethod() const { return m_PatternEnd.m_nUseEnd; } AFX_INLINE DWORD CXTPCalendarRecurrencePattern::GetMasterEventID() const { return m_dwMasterEventID; } AFX_INLINE void CXTPCalendarRecurrencePattern::SetMasterEventID(DWORD dwEventID) { m_dwMasterEventID = dwEventID; } AFX_INLINE CXTPCalendarCustomProperties* CXTPCalendarRecurrencePattern::GetCustomProperties() const { return m_pCustomProperties; } AFX_INLINE CXTPCalendarReminderForOccurrenceArray* CXTPCalendarRecurrencePattern::GetOccReminders() { return &m_arOccReminders; } # include "Common/Base/Diagnostic/XTPEnableNoisyWarnings.h" #endif // !defined(_XTPCALENDARRECURRENCEPATTERN_H__)