mirror of
https://github.com/CalcProgrammer1/OpenRGB.git
synced 2025-12-25 16:27:50 -05:00
* Update OpenRGB Plugin Interface to include functions for loading/saving profile JSON data into OpenRGB profiles
* Update ProfileManager to handle auto-load profiles (Exit, Open, Resume, Suspend) and move their settings to ProfileManager section
* Update ProfileManager to store profiles in "profiles" folder in .json format
* Update ProfileManager to store size profile in sizes.json
* Update ProfileManager to perform device UpdateMode/UpdateColors when loading profile
* Code cleanup of ProfileManager and profile-related code
34 lines
1.7 KiB
C++
34 lines
1.7 KiB
C++
/*---------------------------------------------------------*\
|
|
| PluginManagerInterface.h |
|
|
| |
|
|
| OpenRGB plugin manager interface |
|
|
| |
|
|
| Adam Honse <calcprogrammer1@gmail.com> Nov 18 2025 |
|
|
| |
|
|
| This file is part of the OpenRGB project |
|
|
| SPDX-License-Identifier: GPL-2.0-or-later |
|
|
\*---------------------------------------------------------*/
|
|
|
|
#pragma once
|
|
|
|
#include <string>
|
|
#include "nlohmann/json.hpp"
|
|
|
|
class PluginManagerInterface
|
|
{
|
|
public:
|
|
virtual unsigned int GetPluginCount() = 0;
|
|
virtual std::string GetPluginDescription(unsigned int plugin_idx) = 0;
|
|
virtual std::string GetPluginName(unsigned int plugin_idx) = 0;
|
|
virtual unsigned int GetPluginProtocolVersion(unsigned int plugin_idx) = 0;
|
|
virtual std::string GetPluginVersion(unsigned int plugin_idx) = 0;
|
|
|
|
virtual void LoadPlugins() = 0;
|
|
virtual void UnloadPlugins() = 0;
|
|
|
|
virtual void OnProfileAboutToLoad() = 0;
|
|
virtual void OnProfileLoad(nlohmann::json profile_data) = 0;
|
|
virtual nlohmann::json OnProfileSave() = 0;
|
|
virtual unsigned char * OnSDKCommand(unsigned int plugin_idx, unsigned int pkt_id, unsigned char * pkt_data, unsigned int * pkt_size) = 0;
|
|
};
|