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;
118 /**--------------------------------------------------------------------------------------------------
119 Class: ApplicationResource
120
121 \brief High-Level functions for communicating with the operating system or getting general information about the application.
122 *-----------------------------------------------------------------------------------------------**/
124 {
125 public:
126 enum class InstanceType
127 {
128 e_system
129 , e_desktop
130 , e_session
131 , e_trustee
132 };
146 public:
147 static String CreateExclusionName(String guid, InstanceType kind = InstanceType::e_system);
149 static UUID SessionID();
150 static Time BuildTime();
152 static Buffer<uint01> GetAppBundledResource(void* handle, const String& type, const String& name);
154 static bool IsFirstTimeRunning();
156 static void OpenExplorerWindow(const String& location);
157 static void OpenFile(const File& file);
158 static void SendFile(const File& file);
159 static void ShareFileWithMediaServer(const File& file);
160 static void SetFolderIcon(const File& folder, const File& icon);
161 static void OpenOSWifiDialog();
163 static void OpenOSClockDialog();
164 static void OpenOSLocationDialog();
165 static void OpenOSPrinterDialog();
170 static void LogUserSettings(ProgressInfo* log, bool log_only_non_defaults);
171 static void CloseApp(bool relaunch = false, const String& relaunch_options = "--relaunch");
172 static void FactoryResetApp();
173 static void SaveUserOptions(bool is_shutting_down);
174 static void ReadUserOptions();
180 };
181};
182
#define NDEVR_BASE_API
Definition DLLInfo.h:78
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:124
static String CreateExclusionName(String guid, InstanceType kind=InstanceType::e_system)
static void OpenFile(const File &file)
static Time last_run_time
Definition ApplicationResource.h:145
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:140
static ApplicationOption< bool > proper_shutdown
Definition ApplicationResource.h:142
static ApplicationOption< Time > current_run_time
Definition ApplicationResource.h:141
static Resource< TranslatedString > application_name
Definition ApplicationResource.h:133
static Resource< String > application_version
Definition ApplicationResource.h:134
static void OpenOSBluetoothDialog()
static Buffer< VideoCardInformation > GetVideoCardInfo()
static TranslatedString GetLastErrorString()
static HardwareInformation GetHardwareInformation()
static ApplicationOption< bool > has_finished_initial_setup
Definition ApplicationResource.h:143
static Resource< String > activation_code
Definition ApplicationResource.h:138
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:144
static void OpenOSPrinterDialog()
static Time SessionStartTime()
static Resource< String > user_email
Definition ApplicationResource.h:137
InstanceType
Definition ApplicationResource.h:127
static Resource< bool > is_development_version
Definition ApplicationResource.h:135
static void OpenOSClockDialog()
static bool IsFirstTimeRunning()
static TranslatedString ApplicationNameAndVersion()
static Resource< Buffer< String > > startup_options
Definition ApplicationResource.h:139
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:136
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:64
Definition File.h:47
Definition ProgressInfo.hpp:43
Definition Toggle.h:41
Definition String.h:40
Represents a timestamp with utilities for manipulation and conversion.
Definition Time.h:54
Definition TranslatedString.h:9
Definition UUID.h:66
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:86
uint64_t uint08
-Defines an alias representing an 8 byte, unsigned integer -Can represent exact integer values 0 thro...
Definition BaseValues.hpp:132
uint32_t uint04
-Defines an alias representing a 4 byte, unsigned integer -Can represent exact integer values 0 throu...
Definition BaseValues.hpp:120
Definition BaseValues.hpp:272
Definition ApplicationResource.h:104
uint08 memory_size
Definition ApplicationResource.h:114
uint04 page_size
Definition ApplicationResource.h:110
String manufacturer
Definition ApplicationResource.h:105
uint04 oem_id
Definition ApplicationResource.h:108
uint04 processor_type
Definition ApplicationResource.h:111
uint04 active_processor_mask
Definition ApplicationResource.h:112
Buffer< VideoCardInformation > video_card_information
Definition ApplicationResource.h:116
String model
Definition ApplicationResource.h:106
uint04 num_of_processors
Definition ApplicationResource.h:109
Definition ApplicationResource.h:48
uint04 os_version_num
Definition ApplicationResource.h:70
String os_version_name
Definition ApplicationResource.h:68
uint04 os_sub_version_num
Definition ApplicationResource.h:71
String os_service_pack_name
Definition ApplicationResource.h:69
OSVersion os_version
Definition ApplicationResource.h:67
OSVersion
Definition ApplicationResource.h:50
@ e_linux_generic
Definition ApplicationResource.h:54
@ e_windows_server_2012
Definition ApplicationResource.h:63
@ e_ios_generic
Definition ApplicationResource.h:56
@ e_windows_server_2008
Definition ApplicationResource.h:64
@ e_windows_generic
Definition ApplicationResource.h:53
@ e_windows_xp
Definition ApplicationResource.h:65
@ e_windows_8
Definition ApplicationResource.h:60
@ e_unknown
Definition ApplicationResource.h:51
@ e_android_generic
Definition ApplicationResource.h:57
@ e_windows_10
Definition ApplicationResource.h:59
@ e_windows_vista
Definition ApplicationResource.h:62
@ e_windows_7
Definition ApplicationResource.h:61
@ e_macOS_generic
Definition ApplicationResource.h:55
uint04 os_revision_num
Definition ApplicationResource.h:72
Definition ApplicationResource.h:75
uint04 architecture_id
Definition ApplicationResource.h:101
uint04 video_memory
Definition ApplicationResource.h:100
String architecture_name
Definition ApplicationResource.h:91
uint04 config_manager_code
Definition ApplicationResource.h:99
String adapter_dac_type
Definition ApplicationResource.h:97
String device_name
Definition ApplicationResource.h:92
String device_id
Definition ApplicationResource.h:93
String config_manager_string
Definition ApplicationResource.h:90
String video_mode_description
Definition ApplicationResource.h:96
String video_processor
Definition ApplicationResource.h:95
VideoCardType card_type
Definition ApplicationResource.h:98
VideoCardType
Definition ApplicationResource.h:77
@ e_nvidia_quadpro
Definition ApplicationResource.h:85
@ e_nvidia_generic
Definition ApplicationResource.h:81
@ e_intel_generic
Definition ApplicationResource.h:80
@ e_nvidia_titan
Definition ApplicationResource.h:86
@ e_unknown
Definition ApplicationResource.h:78
@ e_amd_generic
Definition ApplicationResource.h:82
@ e_nvidia_geforce
Definition ApplicationResource.h:84
String driver_version
Definition ApplicationResource.h:94