#pragma once #include "AudioNotificationListener.h" #include "WindowsShell.h" #include #include #include #include #include class AudioDevice { public: IMMDevice* device = nullptr; IAudioEndpointVolume* volumeInterface = nullptr; IAudioMeterInformation* meterInterface = nullptr; std::wstring id = {}; std::string name = {}; unsigned long state = {}; bool isDefaultConsole = false; bool isDefaultMedia = false; bool isDefaultCommunication = false; float minVolumeDb = 0.f; float maxVolumeDb = 0.f; AudioDevice(IMMDevice* device, LPCWSTR deviceId); AudioDevice(AudioDevice&& other) noexcept; AudioDevice& operator=(AudioDevice&& other) noexcept; ~AudioDevice(); }; class AudioData { public: std::vector playbackDevices = {}; std::vector recordingDevices = {}; IMMDeviceEnumerator* deviceEnumerator = nullptr; AudioNotificationListener* audioNotificationListener = nullptr; AudioData(); AudioData(AudioData&& other) noexcept; AudioData& operator=(AudioData&& other) noexcept; ~AudioData(); }; class ApplicationSettings { public: bool autostart = false; bool docked = false; bool showDisabledDevices = false; bool showChecklistExtras = false; std::vector taskNames = {}; std::unordered_map> tasks = {}; std::vector baseStationMacAdresses = {}; float timerDuration = 5.f * 60.f; float timerRepeatDuration = 2.f * 60.f; bool timerRepeating = false; }; enum class HoverTargetType { HOVER_TARGET_NONE = 0, HOVER_TARGET_CHECKLIST_DAY = 1, }; struct TimerData { bool isTimerActive = false; std::chrono::system_clock::time_point timerStartTimestamp; bool timerHasNotified = false; float lastNotifySeconds; TimerToastHandler toastHandler = {}; }; class ApplicationData { public: ApplicationSettings settings = {}; size_t checklistLength = 0; int checklistHighlightDurationDays = 3; std::shared_ptr audioData = std::make_shared(); HoverTargetType hoverTargetType = HoverTargetType::HOVER_TARGET_NONE; time_t hoverTargetDay = 0; TimerData timerData{}; std::mutex timerMutex{}; //ApplicationData(const ApplicationData&) = delete; //ApplicationData& operator=(const ApplicationData&) = delete; };