From 758762fbc91f2002a9e41957ca34a5d772d575f4 Mon Sep 17 00:00:00 2001 From: Gluzskiy Alexandr Date: Mon, 19 Dec 2016 06:04:51 +0300 Subject: plugins: alarms: added days of week. closes #318 --- plugins/Alarms/src/alarmlist.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) mode change 100644 => 100755 plugins/Alarms/src/alarmlist.h (limited to 'plugins/Alarms/src/alarmlist.h') diff --git a/plugins/Alarms/src/alarmlist.h b/plugins/Alarms/src/alarmlist.h old mode 100644 new mode 100755 index af8e90b666..a18b8a4aa1 --- a/plugins/Alarms/src/alarmlist.h +++ b/plugins/Alarms/src/alarmlist.h @@ -11,11 +11,11 @@ void free_alarm_data(ALARM *alarm); void copy_alarm_data(ALARM *dest, ALARM *src); -int MinutesInFuture(SYSTEMTIME time, Occurrence occ); +int MinutesInFuture(SYSTEMTIME time, Occurrence occ, int selected_days = 0); void TimeForMinutesInFuture(int mins, SYSTEMTIME *time); static bool operator<(const ALARM &a1, const ALARM &a2) { - return MinutesInFuture(a1.time, a1.occurrence) < MinutesInFuture(a2.time, a2.occurrence); // less-than inverted 'cause we want ascending order + return MinutesInFuture(a1.time, a1.occurrence, a1.day_mask) < MinutesInFuture(a2.time, a2.occurrence, a2.day_mask); // less-than inverted 'cause we want ascending order } class AlarmList { @@ -138,7 +138,7 @@ void suspend(unsigned short alarm_id); void GetPluginTime(SYSTEMTIME *t); // increase 'time' to next occurrence -bool UpdateAlarm(SYSTEMTIME &time, Occurrence occ); +bool UpdateAlarm(SYSTEMTIME &time, Occurrence occ, int selected_days = 0); const ULARGE_INTEGER mult = { 600000000, 0}; // number of 100 microsecond blocks in a minute -- cgit v1.2.3