-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathSettings.h
49 lines (36 loc) · 1.43 KB
/
Settings.h
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
#pragma once
#include "nightlight_schema_types.h"
#include "Registry.h"
namespace NightLightLibrary
{
struct Time : public _Time, public Registry::Bond<Time>
{
static Time now();
static const bool isWithinRange(const Time& start, Time end, Time t) noexcept;
const bool isWithinRange(const Time& start, const Time& end) const noexcept;
Time& operator=(const Time& newtime);
Time& setHours(const int8_t h);
Time& setMinutes(const int8_t m);
const uint16_t toMinutes() const noexcept;
Time& _reset() noexcept override;
}; // struct Time
struct Settings : public _Settings<Time>, public Registry::Record<Settings>, public Registry::Bond<Settings>
{
static const LPCSTR getRegistryKey();
Time getStartTime() const noexcept;
Settings& setStartTime(const Time& time);
Time getEndTime() const noexcept;
Settings& setEndTime(const Time& time);
const bool isEnabled() const noexcept;
Settings& setEnabled(const bool enabled) noexcept;
const bool isOnSunSchedule() const noexcept;
Settings& setOnSunSchedule(const bool onSunSchedule) noexcept;
const int16_t getDayColorTemperature() const noexcept;
const int16_t getNightColorTemperature() const noexcept;
Settings& setNightColorTemperature(const int16_t ctemp);
const bool isPreviewing() const noexcept;
//static const bool load(Settings&);
Settings& save() override;
Settings& _reset() noexcept override;
}; // struct Settings
}; // namespace NightLightLibrary