2 The software in this package is distributed under the GNU General
3 Public License version 2 (with a special exception described below).
5 A copy of GNU General Public License (GPL) is included in this distribution,
6 in the file COPYING.GPL.
8 As a special exception, if other files instantiate templates or use macros
9 or inline functions from this file, or you compile this file and link it
10 with other works to produce a work based on this file, this file
11 does not by itself cause the resulting work to be covered
12 by the GNU General Public License.
14 However the source code for this file must still be made available
15 in accordance with section (3) of the GNU General Public License.
17 This exception does not invalidate any other reasons why a work based
18 on this file might be covered by the GNU General Public License.
21 * @brief repeating time-points and intervals
23 * @copyright Copyright © 2009 by Intra2net AG
37 @brief Time points and intervals repeating each week
38 This class represents recurring time points and intervals
39 which can be repeated on configurable days of the week.
44 static const time_t StNimmerleinsDay;
47 /// Start point of time in seconds since the start of the day
49 /// End point of time in seconds since the start of the day. Only used when #Every != -1
51 /// Repeat event every xxx seconds in the half-open interval of #Begin and #End. -1 is disabled
53 /// Stores the active days this WeekCron is valid for
56 time_t get_next_point(const time_t calc_from, const int daysec, const bool todaycheck) const;
57 time_t get_previousnow_point(const time_t calc_from, const int daysec, const bool todaycheck) const;
58 void fill_tm_with_wallclock(struct tm *ft, const int daysec) const;
62 WeekCron(const std::string& daystring, const int begin);
63 WeekCron(const std::string& daystring, const int begin, const int end, const int every);
64 WeekCron(const I2n::Time::Week& week, const int begin);
65 WeekCron(const I2n::Time::Week& week, const int begin, const int end, const int every);
68 I2n::Time::Week get_week(void) const
70 void set_week(const I2n::Time::Week& week)
72 int get_begin(void) const
74 void set_begin(const int begin)
76 int get_end(void) const
78 void set_end(const int end)
80 int get_every(void) const
82 void set_every(const int every)
87 time_t get_next_run(time_t calc_from=0) const;