API Documentation
Loading...
Searching...
No Matches
ApplicationResource.h
Go to the documentation of this file.
1/*--------------------------------------------------------------------------------------------
2Copyright (c) 2019, NDEVR LLC
3tyler.parke@ndevr.org
4 __ __ ____ _____ __ __ _______
5 | \ | | | __ \ | ___|\ \ / / | __ \
6 | \ | | | | \ \ | |___ \ \ / / | |__) |
7 | . \| | | |__/ / | |___ \ V / | _ /
8 | |\ |_|_____/__|_____|___\_/____| | \ \
9 |__| \__________________________________| \__\
10
11Subject to the terms of the Enterprise+ Agreement, NDEVR hereby grants
12Licensee a limited, non-exclusive, non-transferable, royalty-free license
13(without the right to sublicense) to use the API solely for the purpose of
14Licensee's internal development efforts to develop applications for which
15the API was provided.
16
17The above copyright notice and this permission notice shall be included in all
18copies or substantial portions of the Software.
19
20THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
21INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
22PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE
23FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
24OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
25DEALINGS IN THE SOFTWARE.
26
27Library: Base
28File: ApplicationResource
29Included in API: True
30Author(s): Tyler Parke
31 *-----------------------------------------------------------------------------------------**/
32#pragma once
33#include "DLLInfo.h"
34#include <NDEVR/String.h>
35#include <NDEVR/BaseValues.h>
36#include <NDEVR/ApplicationOptions.h>
37#include <NDEVR/Resource.h>
38#include <NDEVR/Time.h>
39namespace NDEVR
40{
41 class File;
42 class ProgressInfo;
43 class RGBColor;
44 class INIFactory;
45 struct Font;
46 class UUID;
47
48 /**--------------------------------------------------------------------------------------------------
49 \brief Contains information about an Operating System including versions and types
50
51 **/
80
81 /**--------------------------------------------------------------------------------------------------
82 \brief Contains information about a video card, including manufacturer and some level of capabilities
83
84 **/
115
116 /**--------------------------------------------------------------------------------------------------
117 \brief Contains information about a computer or device that is capable of running software typically
118 with a CPU and memory.
119 **/
136
137 /**--------------------------------------------------------------------------------------------------
138 \brief High-Level functions for communicating with the operating system or getting general information
139 about the application.
140 **/
142 {
143 public:
144 enum class InstanceType
145 {
146 e_system
147 , e_desktop
148 , e_session
149 , e_trustee
150 };
164 public:
165 static String CreateExclusionName(String guid, InstanceType kind = InstanceType::e_system);
167 static UUID SessionID();
168 static Time BuildTime();
170 static Buffer<uint01> GetAppBundledResource(void* handle, const String& type, const String& name);
172 static bool IsFirstTimeRunning();
174 static void OpenExplorerWindow(const String& location);
175 static void OpenFile(const File& file);
176 static void SendFile(const File& file);
177 static void ShareFileWithMediaServer(const File& file);
178 static void SetFolderIcon(const File& folder, const File& icon);
179 static void OpenOSWifiDialog();
181 static void OpenOSClockDialog();
182 static void OpenOSLocationDialog();
183 static void OpenOSPrinterDialog();
188 static void LogUserSettings(ProgressInfo* log, bool log_only_non_defaults);
189 static void CloseApp(bool relaunch = false, const String& relaunch_options = "--relaunch");
190 static void FactoryResetApp();
191 static void SaveUserOptions(bool is_shutting_down);
192 static void ReadUserOptions();
198 };
199};
200
#define NDEVR_BASE_API
Definition DLLInfo.h:57
The default object to store data of any type that should persist through sessions of the application.
Definition Button.h:57
High-Level functions for communicating with the operating system or getting general information about...
Definition ApplicationResource.h:142
static String CreateExclusionName(String guid, InstanceType kind=InstanceType::e_system)
static void OpenFile(const File &file)
static Time last_run_time
Definition ApplicationResource.h:163
static Buffer< uint01 > GetAppBundledResource(void *handle, const String &type, const String &name)
static void ShareFileWithMediaServer(const File &file)
static void OpenOSLocationDialog()
static String OSUserName()
static TranslatedString GetErrorString(sint08 result)
static void LogUserSettings(ProgressInfo *log, bool log_only_non_defaults)
static File GetDefaultOSApplicationForExtension(const String &extension)
static void OpenOSFileSystemDialog()
static void LogComputerInformation(ProgressInfo *log)
static void SendFile(const File &file)
static void OpenOSWifiDialog()
static ApplicationOption< String > last_application_version
Definition ApplicationResource.h:158
static ApplicationOption< bool > proper_shutdown
Definition ApplicationResource.h:160
static ApplicationOption< Time > current_run_time
Definition ApplicationResource.h:159
static Resource< TranslatedString > application_name
Definition ApplicationResource.h:151
static Resource< String > application_version
Definition ApplicationResource.h:152
static void OpenOSBluetoothDialog()
static Buffer< VideoCardInformation > GetVideoCardInfo()
static TranslatedString GetLastErrorString()
static HardwareInformation GetHardwareInformation()
static ApplicationOption< bool > has_finished_initial_setup
Definition ApplicationResource.h:161
static Resource< String > activation_code
Definition ApplicationResource.h:156
static OSInformation GetOSInformation()
static void ReadUserOptions()
static void LogOSInformation(ProgressInfo *log)
static void LogApplicationInformation(ProgressInfo *log)
static void SaveUserOptions(bool is_shutting_down)
static bool last_proper_shutdown
Definition ApplicationResource.h:162
static void OpenOSPrinterDialog()
static Time SessionStartTime()
static Resource< String > user_email
Definition ApplicationResource.h:155
InstanceType
Definition ApplicationResource.h:145
static Resource< bool > is_development_version
Definition ApplicationResource.h:153
static void OpenOSClockDialog()
static bool IsFirstTimeRunning()
static TranslatedString ApplicationNameAndVersion()
static Resource< Buffer< String > > startup_options
Definition ApplicationResource.h:157
static void CloseApp(bool relaunch=false, const String &relaunch_options="--relaunch")
static void SetFolderIcon(const File &folder, const File &icon)
static void FactoryResetApp()
static Resource< String > username
Definition ApplicationResource.h:154
static void OpenExplorerWindow(const String &location)
The equivelent of std::vector but with a bit more control. The basic array unit of the library.
Definition Buffer.hpp:56
Logic for reading or writing to a file as well as navigating filesystems.
Definition File.h:48
Contains information about a computer or device that is capable of running software typically with a ...
Definition ApplicationResource.h:121
uint08 memory_size
Definition ApplicationResource.h:132
uint04 page_size
Definition ApplicationResource.h:128
String manufacturer
Definition ApplicationResource.h:123
uint04 oem_id
Definition ApplicationResource.h:126
uint04 processor_type
Definition ApplicationResource.h:129
uint04 active_processor_mask
Definition ApplicationResource.h:130
Buffer< VideoCardInformation > video_card_information
Definition ApplicationResource.h:134
String model
Definition ApplicationResource.h:124
uint04 num_of_processors
Definition ApplicationResource.h:127
Contains information about an Operating System including versions and types.
Definition ApplicationResource.h:53
uint04 os_version_num
Definition ApplicationResource.h:76
String os_version_name
Definition ApplicationResource.h:74
uint04 os_sub_version_num
Definition ApplicationResource.h:77
String os_service_pack_name
Definition ApplicationResource.h:75
OSVersion os_version
Definition ApplicationResource.h:73
OSVersion
Definition ApplicationResource.h:56
@ e_linux_generic
Definition ApplicationResource.h:60
@ e_windows_server_2012
Definition ApplicationResource.h:69
@ e_ios_generic
Definition ApplicationResource.h:62
@ e_windows_server_2008
Definition ApplicationResource.h:70
@ e_windows_generic
Definition ApplicationResource.h:59
@ e_windows_xp
Definition ApplicationResource.h:71
@ e_windows_8
Definition ApplicationResource.h:66
@ e_unknown
Definition ApplicationResource.h:57
@ e_android_generic
Definition ApplicationResource.h:63
@ e_windows_10
Definition ApplicationResource.h:65
@ e_windows_vista
Definition ApplicationResource.h:68
@ e_windows_7
Definition ApplicationResource.h:67
@ e_macOS_generic
Definition ApplicationResource.h:61
uint04 os_revision_num
Definition ApplicationResource.h:78
A light-weight base class for Log that allows processes to update, without the need for additional in...
Definition ProgressInfo.hpp:48
A core part of the engine, stores variables that can be listened to with ResourceListener which will ...
Definition Toggle.h:41
The core String class for the NDEVR API.
Definition String.h:69
Represents a timestamp with utilities for manipulation and conversion.
Definition Time.h:54
Any text displayed to the user should be defined as a TranslatedString which allows the program to lo...
Definition TranslatedString.h:13
A universally unique identifier (UUID) is a 128-bit number used to identify information in computer s...
Definition UUID.h:60
Contains information about a video card, including manufacturer and some level of capabilities.
Definition ApplicationResource.h:86
uint04 architecture_id
Definition ApplicationResource.h:113
uint04 video_memory
Definition ApplicationResource.h:112
String architecture_name
Definition ApplicationResource.h:103
uint04 config_manager_code
Definition ApplicationResource.h:111
String adapter_dac_type
Definition ApplicationResource.h:109
String device_name
Definition ApplicationResource.h:104
String device_id
Definition ApplicationResource.h:105
String config_manager_string
Definition ApplicationResource.h:102
String video_mode_description
Definition ApplicationResource.h:108
String video_processor
Definition ApplicationResource.h:107
VideoCardType card_type
Definition ApplicationResource.h:110
VideoCardType
Definition ApplicationResource.h:89
@ e_nvidia_quadpro
Definition ApplicationResource.h:97
@ e_nvidia_generic
Definition ApplicationResource.h:93
@ e_intel_generic
Definition ApplicationResource.h:92
@ e_nvidia_titan
Definition ApplicationResource.h:98
@ e_unknown
Definition ApplicationResource.h:90
@ e_amd_generic
Definition ApplicationResource.h:94
@ e_nvidia_geforce
Definition ApplicationResource.h:96
String driver_version
Definition ApplicationResource.h:106
Definition ACIColor.h:37
int64_t sint08
-Defines an alias representing an 8 byte, signed integer -Can represent exact integer values -9223372...
Definition BaseValues.hpp:71
uint64_t uint08
-Defines an alias representing an 8 byte, unsigned integer
Definition BaseValues.hpp:106
uint32_t uint04
-Defines an alias representing a 4 byte, unsigned integer -Can represent exact integer values 0 throu...
Definition BaseValues.hpp:96
Defines for a given type (such as sint04, fltp08, UUID, etc) a maximum, minimum, and reserved 'invali...
Definition BaseValues.hpp:233