~aleteoryx/muditaos

ref: 585c612f5d880ed715c768bf8290dfb9f7e76f81 muditaos/module-services/service-time/timeEvents/CalendarTimeEvents.hpp -rw-r--r-- 814 bytes
585c612f — marek303 [EGD-3315]Review changes: EventReminderWindow - localized date and time; unit tests for SelectFirstUpcoming query 5 years ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#pragma once
#include "TimeEvents.hpp"
#include <module-db/queries/calendar/QueryEventsEdit.hpp>

namespace stm
{
    class CalendarTimeEvents : public TimeEvents
    {
      private:
        EventsRecord eventRecord;
        TimePoint startTP = TIME_POINT_INVALID;

      protected:
        const std::string timerName() override
        {
            return "CalendarTimeEvents_timer";
        };
        uint32_t calcToNextEventInterval(std::unique_ptr<db::QueryResult> nextEventQueryResult) override;

        bool sendNextEventQuery() override;
        bool sendEventFiredQuery() override;
        void invokeEvent() override;

      public:
        CalendarTimeEvents() = delete;
        explicit CalendarTimeEvents(sys::Service *service);
        ~CalendarTimeEvents() = default;
    };

} // namespace stm