Files
OpenRGB/RGBController/RGBController_Network.h
Adam Honse c0826fbe83 Settings Rework
* Add JSON string configuration field to RGBController to store device-specific configurations
    * This JSON string holds both configuration and schema
    * Add settings schema tracking to SettingsManager
    * Implement dynamic settings widget that generates a settings UI based on a JSON schema
    * Implement SettingsManager callback for notifying of settings changes and settings schema updates
    * Always enable Entire Device zone option and use it to enable Edit Device
    * Rename SaveSizes to SaveConfiguration in ProfileManager and Sizes.json to Configuration.json
    * Add zone flag for indicating that a zone's geometry may change, informing profile manager to ignore this check
    * Remove Theme setting and Theme Manager, as this didn't work on most setups anyways and Qt6 has proper Windows dark theming
2026-05-04 22:50:47 -05:00

58 lines
2.2 KiB
C++

/*---------------------------------------------------------*\
| RGBController_Network.h |
| |
| RGBController implementation that represents a remote |
| RGBController instance from a connected OpenRGB server |
| |
| Adam Honse (CalcProgrammer1) 11 Apr 2020 |
| |
| This file is part of the OpenRGB project |
| SPDX-License-Identifier: GPL-2.0-or-later |
\*---------------------------------------------------------*/
#pragma once
#include "RGBController.h"
#include "NetworkClient.h"
class RGBController_Network : public RGBController
{
public:
RGBController_Network(NetworkClient * client_ptr, unsigned int dev_idx_val);
~RGBController_Network();
unsigned int GetID();
void ClearSegments(int zone);
void AddSegment(int zone, segment new_segment);
void ConfigureZone(int zone_idx, zone new_zone);
void ResizeZone(int zone, int new_size);
void DeviceUpdateLEDs();
void DeviceUpdateZoneLEDs(int zone);
void DeviceUpdateSingleLED(int led);
void SetCustomMode();
void SetDeviceSpecificConfiguration(nlohmann::json configuration_json);
void SetDeviceSpecificZoneConfiguration(int zone, nlohmann::json configuration_json);
void UpdateLEDs();
void UpdateMode();
void DeviceUpdateMode();
void DeviceUpdateZoneMode(int zone);
void DeviceSaveMode();
private:
NetworkClient * client;
unsigned int dev_id;
unsigned char * CreateUpdateLEDsPacket(unsigned int protocol_version);
unsigned char * CreateUpdateModePacket(int mode_idx, unsigned int* size, unsigned int protocol_version);
unsigned char * CreateUpdateSingleLEDPacket(int led);
unsigned char * CreateUpdateZoneLEDsPacket(int zone);
unsigned char * CreateUpdateZoneModePacket(int zone_idx, int mode_idx, unsigned int* size, unsigned int protocol_version);
};