-
-
Notifications
You must be signed in to change notification settings - Fork 377
Expand file tree
/
Copy pathPluginManagerInterface.h
More file actions
53 lines (46 loc) · 3.03 KB
/
Copy pathPluginManagerInterface.h
File metadata and controls
53 lines (46 loc) · 3.03 KB
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
50
51
52
53
/*---------------------------------------------------------*\
| 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>
#include "RGBController.h"
class PluginManagerInterface
{
public:
/*-----------------------------------------------------*\
| Plugin Information |
\*-----------------------------------------------------*/
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;
/*-----------------------------------------------------*\
| Plugin-Created RGBControllers |
\*-----------------------------------------------------*/
virtual std::vector<RGBController *> GetRGBControllers() = 0;
/*-----------------------------------------------------*\
| Plugin Management |
\*-----------------------------------------------------*/
virtual void LoadPlugins() = 0;
virtual void UnloadPlugins() = 0;
/*-----------------------------------------------------*\
| Plugin Profile Integration |
\*-----------------------------------------------------*/
virtual void OnProfileAboutToLoad() = 0;
virtual void OnProfileLoad(nlohmann::json profile_data) = 0;
virtual nlohmann::json OnProfileSave() = 0;
virtual nlohmann::json OnProfileSave(std::vector<std::string> enabled_plugins) = 0;
/*-----------------------------------------------------*\
| Plugin SDK Integration |
\*-----------------------------------------------------*/
virtual unsigned char * OnSDKCommand(unsigned int plugin_idx, unsigned int pkt_id, unsigned char * pkt_data, unsigned int * pkt_size) = 0;
};