API Documentation
Loading...
Searching...
No Matches
ModuleResourceManager.h
Go to the documentation of this file.
1#pragma once
2#include "DLLInfo.h"
3#include <NDEVR/Buffer.h>
4#include <NDEVR/String.h>
5#include <NDEVR/TranslatedString.h>
6#undef linux
7namespace NDEVR
8{
10 {
13 static String macx;
14 static String ios;
15 static String wasm;
16 static String all;
17 };
19 {
20 static String debug;
22 static String all;
23 };
25 {
26 static String x86;
27 static String x64;
29 static String arm64;
30 static String all;
31 };
32
33
47 {
49 : os_type(OSType::all)
50 , config_type(ConfigType::all)
51 , platform_type(PlatformType::all)
52 {}
53 ModuleConfiguration(const String& os_type, const String& config_type, const String& platform_type)
54 : os_type(os_type)
55 , config_type(config_type)
56 , platform_type(platform_type)
57 {}
58
59 bool neededForOS(const String& os) const
60 {
61 return os_type.hasSubString(os);
62 }
63 bool neededForConfig(const String& os) const
64 {
65 return config_type.hasSubString(os);
66 }
67 bool neededForPlatform(const String& os) const
68 {
69 return platform_type.hasSubString(os);
70 }
71 static String Combine(std::initializer_list<String> l);
72 static String& Remove(String& s, std::initializer_list<String> l);
76 };
77
79 {
80 String id;// Unique ID of this firewall exception.
82 TranslatedString description;//Description for this firewall rule displayed in Windows Firewall manager in Windows Vista and later.
83 };
85 {
87 String protocol = "tcp";//tcp or udp
88 String profile = "domain";//domain,private,public, or all
89 String scope = "any";//any or localSubnet
90 uint04 port = Constant<uint04>::NaN;//Port to allow through the firewall for this exception.
91 bool ignore_failure = true;//If true failures to register this firewall exception will be silently ignored. If false, failures will cause rollback.
92 };
94 {
95 String id;//ndv_open
96 String command = "Open";
97 String argument = "--open &quot;%1&quot;";
98 };
112 {
113 e_append //Appends the specified value(s) to a multiString registry key.
114 , e_create //Creates the key, if absent, when the parent component is installed.
115 , e_remove//Removes a registry name when the parent component is installed.
116 };
117 enum class RegistryType
118 {
119 e_string //The value is interpreted and stored as a string(REG_SZ).
120 , e_integer //The value is interpreted and stored as an integer(REG_DWORD).
121 , e_binary //The value is interpreted and stored as a hexadecimal value(REG_BINARY).
122 , e_expandable //The value is interpreted and stored as an expandable string(REG_EXPAND_SZ).
124 , e_folder
125 };
127 {
130 bool append = false;
131 bool change_permission = false;
132 bool create_child = false;
133 bool create_file = false;
134 bool create_link = false;
135 bool create_subkey = false;
136 bool delete_object = false;
137 bool delete_child = false;
138 bool enumerate_subkey = false;
139 bool execute = false;
140 bool read = true;
141 bool notify = false;
142 bool take_ownership = false;
143 bool write = false;
144 bool all_rights = false;
145 };
157
159 {
160 ModuleDependency(DependecyType type, const String& resource, const String& os_type, const String& config_type, const String& platform_type = PlatformType::all)
161 : ModuleConfiguration(os_type, config_type, platform_type)
162 , resource(resource)
163 , type(type)
164 {}
165 ModuleDependency(const String& resource, const String& os_type, const String& config_type, const String& platform_type = PlatformType::all)
166 : ModuleConfiguration(os_type, config_type, platform_type)
167 , resource(resource)
168 , type(DependecyType::e_library)
169 {}
170 ModuleDependency(const FireWallException& exception, const String& os_type, const String& config_type, const String& platform_type = PlatformType::all);
171
172 FireWallException getAsFirewallException() const;
175 DependecyType type = DependecyType::e_library;
176 };
177
189}
#define NDEVR_BASE_API
Definition DLLInfo.h:78
The equivelent of std::vector but with a bit more control. The basic array unit of the library.
Definition Buffer.hpp:64
Definition ModuleResourceManager.h:179
String launch_function
Definition ModuleResourceManager.h:187
Buffer< FireWallException > firewall_exceptions
Definition ModuleResourceManager.h:182
Buffer< FileHandler > file_handlers
Definition ModuleResourceManager.h:184
Buffer< String > permissions
Definition ModuleResourceManager.h:183
Buffer< ModuleDependency > dependencies
Definition ModuleResourceManager.h:181
Buffer< RegistryKeyAction > registry_actions
Definition ModuleResourceManager.h:185
ModuleConfiguration supported_configurations
Definition ModuleResourceManager.h:186
Definition String.h:40
Definition TranslatedString.h:9
Definition ACIColor.h:37
RegistryActionType
Definition ModuleResourceManager.h:112
DependecyType
Definition ModuleResourceManager.h:35
@ e_source_folder
Definition ModuleResourceManager.h:44
@ e_module
Definition ModuleResourceManager.h:39
@ e_type
Definition ModuleResourceManager.h:40
@ e_library
Definition ModuleResourceManager.h:37
@ e_rcc_resource
Definition ModuleResourceManager.h:43
@ e_bundled_folder
Definition ModuleResourceManager.h:42
@ e_executable
Definition ModuleResourceManager.h:38
@ e_file
Definition ModuleResourceManager.h:36
@ e_firewall_exception
Definition ModuleResourceManager.h:41
uint32_t uint04
-Defines an alias representing a 4 byte, unsigned integer -Can represent exact integer values 0 throu...
Definition BaseValues.hpp:120
RegistryType
Definition ModuleResourceManager.h:118
Definition ModuleResourceManager.h:19
static String release
Definition ModuleResourceManager.h:21
static String all
Definition ModuleResourceManager.h:22
static String debug
Definition ModuleResourceManager.h:20
Definition BaseValues.hpp:272
Definition ModuleResourceManager.h:100
String id
Definition ModuleResourceManager.h:101
String content_type
Definition ModuleResourceManager.h:102
Buffer< FileHandlerVerb > verbs
Definition ModuleResourceManager.h:103
Definition ModuleResourceManager.h:106
String icon
Definition ModuleResourceManager.h:107
bool advertise
Definition ModuleResourceManager.h:108
Buffer< FileHanderExtension > extensions
Definition ModuleResourceManager.h:109
Definition ModuleResourceManager.h:94
String argument
Definition ModuleResourceManager.h:97
String id
Definition ModuleResourceManager.h:95
String command
Definition ModuleResourceManager.h:96
Definition ModuleResourceManager.h:85
String protocol
Definition ModuleResourceManager.h:87
String profile
Definition ModuleResourceManager.h:88
String scope
Definition ModuleResourceManager.h:89
bool ignore_failure
Definition ModuleResourceManager.h:91
uint04 port
Definition ModuleResourceManager.h:90
Buffer< String > remote_addresses
Definition ModuleResourceManager.h:86
Definition ModuleResourceManager.h:47
bool neededForConfig(const String &os) const
Definition ModuleResourceManager.h:63
ModuleConfiguration(const String &os_type, const String &config_type, const String &platform_type)
Definition ModuleResourceManager.h:53
bool neededForOS(const String &os) const
Definition ModuleResourceManager.h:59
String config_type
Definition ModuleResourceManager.h:74
String os_type
Definition ModuleResourceManager.h:73
String platform_type
Definition ModuleResourceManager.h:75
bool neededForPlatform(const String &os) const
Definition ModuleResourceManager.h:67
ModuleConfiguration()
Definition ModuleResourceManager.h:48
Definition ModuleResourceManager.h:159
ModuleDependency(const String &resource, const String &os_type, const String &config_type, const String &platform_type=PlatformType::all)
Definition ModuleResourceManager.h:165
String os_type
Definition ModuleResourceManager.h:174
ModuleDependency(DependecyType type, const String &resource, const String &os_type, const String &config_type, const String &platform_type=PlatformType::all)
Definition ModuleResourceManager.h:160
String resource
Definition ModuleResourceManager.h:173
Definition ModuleResourceManager.h:79
TranslatedString description
Definition ModuleResourceManager.h:82
TranslatedString name
Definition ModuleResourceManager.h:81
String id
Definition ModuleResourceManager.h:80
Definition ModuleResourceManager.h:10
static String all
Definition ModuleResourceManager.h:16
static String wasm
Definition ModuleResourceManager.h:15
static String ios
Definition ModuleResourceManager.h:14
static String android
Definition ModuleResourceManager.h:12
static String macx
Definition ModuleResourceManager.h:13
static String windows
Definition ModuleResourceManager.h:11
Definition ModuleResourceManager.h:127
bool all_rights
Definition ModuleResourceManager.h:144
bool execute
Definition ModuleResourceManager.h:139
bool create_file
Definition ModuleResourceManager.h:133
bool create_child
Definition ModuleResourceManager.h:132
bool notify
Definition ModuleResourceManager.h:141
String domain
Definition ModuleResourceManager.h:128
bool enumerate_subkey
Definition ModuleResourceManager.h:138
bool change_permission
Definition ModuleResourceManager.h:131
bool create_subkey
Definition ModuleResourceManager.h:135
bool write
Definition ModuleResourceManager.h:143
String user
Definition ModuleResourceManager.h:129
bool delete_object
Definition ModuleResourceManager.h:136
bool append
Definition ModuleResourceManager.h:130
bool delete_child
Definition ModuleResourceManager.h:137
bool take_ownership
Definition ModuleResourceManager.h:142
bool read
Definition ModuleResourceManager.h:140
bool create_link
Definition ModuleResourceManager.h:134
Definition ModuleResourceManager.h:25
static String all
Definition ModuleResourceManager.h:30
static String x86
Definition ModuleResourceManager.h:26
static String arm64
Definition ModuleResourceManager.h:29
static String x64
Definition ModuleResourceManager.h:27
static String armeabi
Definition ModuleResourceManager.h:28
Definition ModuleResourceManager.h:147
RegistryActionType action
Definition ModuleResourceManager.h:152
String root
Definition ModuleResourceManager.h:148
String value
Definition ModuleResourceManager.h:150
bool ownership
Definition ModuleResourceManager.h:154
Buffer< Permission > permissions
Definition ModuleResourceManager.h:153
bool is_key_path
Definition ModuleResourceManager.h:155
RegistryType type
Definition ModuleResourceManager.h:151
String path
Definition ModuleResourceManager.h:149