acme
Foundational cross-platform layer of the ca2 framework
Loading...
Searching...
No Matches
node.h
1//
2// Created by camilo on 19/01/2021. <33TBS!!
3//
4
5//
6// Created by camilo on 19/01/2021. <3-<3ThomasBS!!
7//
8
9// Created by camilo on 2021-03-21 18:11 <3ThomasBS_!!
10#pragma once
11
12
13#include "node_acme.h"
14#include "node_apex.h"
15#include "node_aqua.h"
16#include "node_aura.h"
17
18
19namespace platform
20{
21
22
23 class CLASS_DECL_ACME node :
24 virtual public ::acme::shell,
25 virtual public ::platform::acme_node_layer_t,
26 virtual public ::platform::apex_node_layer_t,
27 virtual public ::platform::aqua_node_layer_t,
28 virtual public ::platform::aura_node_layer_t,
29 virtual public ::platform::acme_node_layer,
30 virtual public ::platform::apex_node_layer,
31 virtual public ::platform::aqua_node_layer,
32 virtual public ::platform::aura_node_layer
33 {
34 public:
35
36 // bool m_bDropboxCalculated;
37 // bool m_bDropbox;
38 // ::file::path m_pathDropbox;
39 //
40 //
41 // bool m_bOneDriveCalculated;
42 // bool m_bOneDrive;
43 // ::file::path m_pathOneDrive;
44 //
45 // protected:
46 //
47 //
48 //
49 //
50 // //::procedure_array m_routineaPost;
51 //
52 //
53 // public:
54 //
55 //
56 // union
57 // {
58 //
59 // ::u64 m_uNodeFlags;
60 //
61 // bool m_bHasNodePostedSystemInitialRequest : 1;
62 //
63 // };
64 //
65 // htask m_htaskSystem;
66 // ::apex::node * m_papexnode;
67 // ::aura::node * m_pauranode;
68 //
69 // ::acme_posix::node * m_pAcmePosix;
70 // ::apex_posix::node * m_pApexPosix;
71 // ::aura_posix::node * m_pAuraPosix;
72 //
73 // :: IDENTIFIER_SUFFIX_OPERATING_SYSTEM(acme_)::node * m_pAcmePlatform;
74 // :: IDENTIFIER_SUFFIX_OPERATING_SYSTEM(apex_)::node * m_pApexPlatform;
75 // :: IDENTIFIER_SUFFIX_OPERATING_SYSTEM(aura_)::node * m_pAuraPlatform;
76 //
77 //
78 // //::particle_pointer m_pparticleQuit;
79 //
80 //
81 // //::particle_pointer m_pparticleStandardIOSynchronization;
82 //
83 //
84 // bool m_bCallStackInitialized;
85 // bool m_bUpdateCallStack;
86 //
87 //
88 // string m_strTheme;
89 // string m_strIconTheme;
90 //
91 // map_base < enum_character_set, ::string > m_mapCharacterSetDefaultSampleText;
92 // string_map_base < enum_character_set > m_mapCharacterSetEnum;
93 //
94 // ::os_theme_colors * m_pthemecolors;
95 //
96 // //:: IDENTIFIER_PREFIX_OPERATING_SYSTEM(_node)::node * m_pNode;
97 //
98 //
99 // //::windowing_win32::node * m_pWindowingWin32Node;
100 // //::windowing_universal_windows::node * m_pWindowingUniversalWindowsNode;
101 //
102 //
103 // //::windowing_x11::node * m_pNodeX11;
104 // //::windowing_xcb::node * m_pNodeXcb;
105 // ::node_gtk3::node * m_pNodeGtk3;
106 // ::node_gtk4::node * m_pNodeGtk4;
107 // ::node_gtk_based::node * m_pNodeGtkBased;
108 // ::node_kde5::node * m_pNodeKDE5;
109 // ::node_kde6::node * m_pNodeKDE6;
110 // ::node_xfce::node * m_pNodeXfce;
111 // ::operating_ambient_gtk_based::node * m_pNodeDesktopEnvironmentGtkBased;
112 // ::desktop_environment_kde::node * m_pNodeDesktopEnvironmentKDE;
113 // ::desktop_environment_xfce::node * m_pNodeDesktopEnvironmentXfce;
114 //
115 // //bool m_bUserDarkMode;
116 //
117 // //bool m_bOperatingSystemDarkMode;
118 // //::i32 m_iWeatherDarkness;
119 // ::file::path m_pathModule;
120 //
121 //
122 // enum_application_capability_array m_eapplicationcapabilitya;
123 // string_map_base < ::pointer<::acme::exclusive > > m_mapExclusive;
124 struct font_t
125 {
126 ::file::path m_path;
127
128 };
129 ::string_map_base < font_t > m_mapFont;
130
131 node();
132 ~node() override;
133
134
135#ifdef _DEBUG
136
137 ::i64 increment_reference_count() override;
138 ::i64 decrement_reference_count() override;
139
140#endif
141
142 virtual ::string get_file_type_identifier(const ::file::path & path) override;
143
144
145 virtual void call_async(const ::scoped_string & scopedstrPath, const ::scoped_string & scopedstrParam, const ::scoped_string & scopedstrDir, ::e_display edisplay, bool bPrivileged, ::u32 * puiPid = nullptr) override;
146 virtual void call_sync(const ::scoped_string & scopedstrPath, const ::scoped_string & scopedstrParam, const ::scoped_string & scopedstrDir, ::e_display edisplay, const class time & timeTimeout, ::property_set & set, ::i32 * piExitCode) override;
147
148
149 virtual ::process_identifier_array module_list_file_processes_identifiers(const ::scoped_string & scopedstr) override;
150
151 virtual void defer_add_to_system_recent_file_list(const ::file::path& pathRecentFile);
152 virtual ::enum_id key_command(const ::user::e_key & ekey) override;
153 //idaPid = pnode->(path, false);
154
155
156 virtual ::particle_pointer create_mutex() override;
157
158
159 virtual void initialize(::particle * pparticle) override;
160
161 virtual void node_application_on_status(const_char_pointer pszStatus, void * p = nullptr, ::i64 hi = 0) override;
162 //virtual ::particle_pointer create_quit_particle(::pointer<::platform::node>& pnode);
163
164 //virtual ::particle_pointer create_quit_particle();
165 virtual ::file::path get_default_base_integration_folder() override;
166
167
169
170 void node_main() override;
171 void node_implement_main() override;
172
173
174 void on_app_activated(::user::activation_token * puseractivationtoken) override;
175
176 void on_system_main() override;
177
178
179 void start_application(::pointer<::platform::node> & pnode) override;
180
181
182 //void acme_application_main(::platform::system * psystem) override;
183 void _will_finish_launching() override;
184
185 void _did_finish_launching() override;
186
187 //virtual void element_quit_post_quit();
188
189
190 string audio_get_default_implementation_name() override;
191 string multimedia_audio_get_default_implementation_name() override;
192 string multimedia_audio_mixer_get_default_implementation_name() override;
193 string veriwell_multimedia_music_midi_get_default_implementation_name() override;
194
195
196 virtual void defer_register_server_library(const ::platform::uuid & uuid, const ::file::path & path);
197 virtual void defer_unregister_server_library(const ::platform::uuid & uuid, const ::file::path & path);
198 virtual bool is_server_library_registered(::file::path & path, const ::platform::uuid & uuid);
199
200
201 void _launch_macos_app(const ::scoped_string & scopedstrAppFolder) override;
202
203 void _launch_macos_app_args(const ::scoped_string & scopedstrAppFolder, const ::scoped_string & scopedstrArgs) override;
204
205 void on_initialize_particle() override;
206
207 void initialize_memory_counter() override;
208
209 void system_main() override;
210
211 void reboot() override;
212
213 void defer_show_system_menu(::user::mouse * pmouse) override;
214 void install_crash_dump_reporting(const ::scoped_string & scopedstrModuleNameWithTheExeExtension) override;
215
216
217 ::file::path module_path_source() override;
218 //virtual ::file::path module_path_seed();
219 //virtual ::file::path module_path_origin();
220 //::file::path update_module_path();
221
222
223 ::pointer < ::mutex > create_local_named_mutex(::particle * pparticleContext, bool bInitiallyOwned, const ::scoped_string & scopedstrName, security_attributes * psecurityattributes = nullptr) override;
224 ::pointer < ::mutex > create_global_named_mutex(::particle * pparticleContext, bool bInitiallyOwned, const ::scoped_string & scopedstrName, security_attributes * psecurityattributes = nullptr) override;
225
226
227 ::pointer < ::mutex > open_local_named_mutex(::particle * pparticleContext, const ::scoped_string & scopedstrName) override;
228 ::pointer < ::mutex > open_global_named_mutex(::particle * pparticleContext, const ::scoped_string & scopedstrName) override;
229
230
231 ::pointer < ::mutex > get_install_mutex(::particle * pparticleContext, const ::scoped_string & scopedstrPlatform, const ::scoped_string & scopedstrSuffix) override;
232
233 ::pointer < ::acme::exclusive > _get_exclusive(::particle * pparticleContext, const ::scoped_string & scopedstrName, ::security_attributes * psecurityattributes = nullptr) override;
234
235 ::pointer < ::acme::exclusive > get_exclusive(::particle * pparticleContext, const ::scoped_string & scopedstrName, ::security_attributes * psecurityattributes = nullptr) override;
236
237 bool erase_exclusive(const ::scoped_string & scopedstrName) override;
238
239 void release_exclusive() override;
240
241 bool exclusive_fails(::particle * pparticleContext, const ::scoped_string & scopedstrName, security_attributes * psecurityattributes = nullptr) override;
242
243
244 string app_id_to_app_name(const ::scoped_string & scopedstrAppId) override;
245 string app_id_to_executable_name(const ::scoped_string & scopedstrAppId) override;
246
247
248 bool is_application_installed(const ::file::path& pathExe, const ::scoped_string & scopedstrAppId, string& strBuild, const ::scoped_string & scopedstrPlatform, const ::scoped_string & scopedstrConfiguration, const ::scoped_string & scopedstrLocale, const ::scoped_string & scopedstrSchema) override;
249 void set_application_installed(const ::file::path& pathExe, const ::scoped_string & scopedstrAppId, const ::scoped_string & scopedstrBuild, const ::scoped_string & scopedstrPlatform, const ::scoped_string & scopedstrConfiguration, const ::scoped_string & scopedstrLocale, const ::scoped_string & scopedstrSchema) override;
250
251
252 ::file::path application_installer_folder(const ::file::path& pathExe, const ::scoped_string & scopedstrAppId, const ::scoped_string & scopedstrPlatform, const ::scoped_string & scopedstrConfiguration, const ::scoped_string & scopedstrLocale, const ::scoped_string & scopedstrSchema) override;
253 ::file::path get_application_path(const ::scoped_string & scopedstrAppId, const ::scoped_string & scopedstrPlatform, const ::scoped_string & scopedstrConfiguration) override;
254
255
256 ::file::path get_last_run_application_path_file(const ::scoped_string & scopedstrAppId) override;
257 ::file::path get_last_run_application_path(const ::scoped_string & scopedstrAppId) override;
258 void set_last_run_application_path(const ::scoped_string & scopedstrAppId) override;
259
260
261 virtual ::file::path _module_path() override;
262
263 //virtual void do_windowing_system_factory();
264
265
266 //virtual bool memory_counter_on();
267
268 //virtual ::file::path memory_counter_base_path();
269
270 virtual void datetime_to_file_time(::file_time_t* pfile_time, const ::earth::time& time) override;
271
272
273
274 virtual ::i32 node_init_check(::i32 * pi, char_pointer ** ppz) override;
275
276 virtual void start_node() override;
277
278 virtual void install_sigchld_handler() override;
279
280 // virtual ::color::color get_system_color(enum_system_color esystemcolor);
281 //
282 // //virtual bool dark_mode() const;
283 //
284 // virtual ::os_theme_colors * _new_os_theme_colors();
285 //
286 // virtual ::os_theme_colors * _get_os_theme_colors();
287 //
288 // virtual void _fill_os_theme_colors(::os_theme_colors * pthemecolors);
289 //
290 // virtual void _set_os_theme_colors(::os_theme_colors * pthemecolors);
291 //
292 // virtual void _del_os_theme_colors(::os_theme_colors * pthemecolors);
293 //
294 // virtual void _term_os_theme_colors();
295
296// virtual ::i32 get_simple_ui_darkness();
297
298// virtual void set_simple_ui_darkness(::i32 iWeatherDarkness);
299
300 //virtual void set_dark_mode(bool bDark);
301
302 // virtual void fetch_user_color();
303 //
304 // virtual void _fetch_user_color();
305
306 //virtual void on_operating_system_user_theme_change();
307
308 //virtual void on_operating_system_user_color_change();
309
310 //virtual void on_operating_system_font_list_change();
311
312 //virtual string os_get_user_theme();
313
314 //virtual void os_set_user_theme(const ::scoped_string & scopedstrUserTheme);
315
316 //virtual void os_process_user_theme(const ::scoped_string & scopedstrTheme);
317
318 //virtual void os_process_user_icon_theme(const ::scoped_string & scopedstrIconTheme);
319
320 virtual string get_file_icon_path(const ::scoped_string & scopedstrPath, ::i32 iSize) override;
321
322 virtual string get_file_content_type(const ::scoped_string & scopedstrPath) override;
323
324 virtual ::i32 os_launch_uri(const ::scoped_string & scopedstrUri, char_pointer pszError = NULL, ::i32 iBufferSize = 0) override;
325
326 //virtual void enable_wallpaper_change_notification() override;
327
328 virtual bool has_xcb() override;
329
330 virtual void * get_os_xcb_connection() override;
331
332 virtual bool is_wayland() override;
333
334 void user_send(const ::procedure & procedure) override;
335 void user_post(const ::procedure & procedure) override;
336 void main_send(const ::procedure & procedure) override;
337 void main_post(const ::procedure & procedure) override;
338
339 //virtual void _user_send(::subparticle * psubparticle) override;
340 //virtual void _user_post(::subparticle * psubparticle) override;
341
342 //void post_procedure(const ::procedure & procedure) override;
343
344 //void send_procedure(const ::procedure & procedure) override;
345
346 virtual void defer_do_main_tasks() override;
347
348 //virtual void user_post_quit() override;
349
350 //virtual void node_quit();
351
352 virtual bool should_launch_on_node(::topic * ptopic) override;
353
354 virtual bool defer_launch_on_node(::topic * ptopic) override;
355
356 virtual bool launch_on_node(::topic * ptopic) override;
357
358
359 virtual string get_user_name() override;
360
361
362 virtual void set_console_colors(::u32 dwScreenColors, ::u32 dwPopupColors, ::u32 dwWindowAlpha) override;
363
364
365 virtual void browse_for_folder(::file::path & pathFolder) override;
366 virtual void browse_for_file(::file::path & path) override;
367
368
369 virtual ::f64 get_time_zone() override;
370
371
372 virtual string font_name(enum_font efont) override;
373
374
375 //virtual string font_name(enum_operating_system eoperatingsystem, ::i32 iVariant, enum_font efont);
376
377
378 virtual string file_memory_map_path_from_name(const ::scoped_string & scopedstrName) override;
379
380 virtual enum_operating_system get_operating_system() const override;
381
382 virtual void launch_app(const ::scoped_string & scopedstr, const_char_pointer *argv, ::i32 iFlags) override;
383
384 virtual ::file::path get_executable_path_by_app_id(const ::scoped_string & scopedstrAppId, bool bSingleExecutableVersion) override;
385 virtual ::file::path get_executable_path_by_app_id(const ::scoped_string & scopedstrRepos, const ::scoped_string & scopedstrApp, bool bSingleExecutableVersion) override;
386 virtual void launch_app_by_app_id(const ::scoped_string & scopedstrAppId, bool bSingleExecutableVersion) override;
387
388 virtual ::process_identifier create_process(const ::scoped_string & scopedstrCommandLine) override;
389
390 virtual void run_silent(const ::scoped_string & scopedstrFunct, const ::scoped_string & scopedstrstrParams) override;
391
392 virtual ::file::path_array_base process_identifier_modules_paths(::process_identifier processidentifier) override;
393
394 virtual ::file::path_array_base modules_paths() override;
395
396 virtual bool load_modules_diff(string_array_base& straOld, string_array_base& straNew, const ::scoped_string & scopedstrExceptDir) override;
397
398 virtual ::process_identifier_array processes_identifiers() override;
399
400 virtual ::process_identifier_array module_path_processes_identifiers(const ::scoped_string & scopedstrModulePath, bool bModuleNameIsPropertyFormatted) override;
401
402 virtual ::file::path process_identifier_module_path(::process_identifier processidentifier) override;
403
404 virtual string process_identifier_command_line(::process_identifier processidentifier) override;
405
406 //virtual bool is_shared_library_busy(::process_identifier processidentifier, const string_array_base& stra);
407
408 //virtual bool is_shared_library_busy(const string_array_base& stra);
409
410 virtual bool process_contains_module(string& strImage, ::process_identifier processidentifier, const ::scoped_string & scopedstrLibrary) override;
411
412 virtual ::process_identifier_array shared_library_process(string_array_base& straProcesses, const ::scoped_string & scopedstrLibrary) override;
413
414 virtual bool is_process_running(::process_identifier processidentifier) override;
415
416 virtual string get_environment_variable(const ::scoped_string & scopedstrEnvironmentVariable) override;
417
418 virtual string expand_environment_variables(const ::scoped_string & scopedstr) override;
419
420 virtual void set_environment_variable(const ::scoped_string & scopedstrEnvironmentVariable, const ::scoped_string& scopedstrValue) override;
421
422 virtual void unset_environment_variable(const ::scoped_string & scopedstrEnvironmentVariable) override;
423
424 virtual string get_user_language() override;
425
426
427 virtual ::pointer < security_attributes > get_application_exclusivity_security_attributes() override;
428
429 virtual void register_spa_file_type(const ::scoped_string & scopedstrAppIdHandler) override;
430
431 virtual bool low_is_app_app_admin_running(const ::scoped_string & scopedstrPlatform, const ::scoped_string & scopedstrConfiguration) override;
432 virtual void defer_start_program_files_app_app_admin(const ::scoped_string & scopedstrPlatform, const ::scoped_string & scopedstrConfiguration) override;
433 virtual void start_program_files_app_app_admin(const ::scoped_string & scopedstrPlatform, const ::scoped_string & scopedstrConfiguration) override;
434
435 virtual void get_folder_path_from_user(::file::path & pathFolder) override;
436
437
438 //virtual ::string expand_environment_variables(const ::scoped_string & scopedstr);
439
440 virtual ::file::path command_find_path(const ::scoped_string & scopedstrCommand) override;
441
442
443
444 virtual void launch_application(::particle * pparticle, const ::scoped_string & scopedstrAppId, const ::scoped_string & scopedstrParams, ::i32 iBitCount) override;
445
446
447 virtual void shell_open(const ::file::path & path, const ::scoped_string & scopedstrParams = "", const ::file::path & pathFolder = {}) override;
448 //virtual void open_url(const ::scoped_string & scopedstrUrl);
449
450
451 virtual void shell_execute_async(const ::scoped_string & scopedstrFile, const ::scoped_string & scopedstrParams, const ::file::path& pathWorkingDirectory = {}) override;
452 virtual ::i32 shell_execute_sync(const ::scoped_string& scopedstrFile, const ::scoped_string& scopedstrParams, const class time& timeTimeout = 1_minute, const ::file::path& pathWorkingDirectory = {}) override;
453
454 virtual void root_execute_async(const ::scoped_string & scopedstrFile, const ::scoped_string & scopedstrParams, const ::file::path& pathWorkingDirectory = {}) override;
455 virtual ::i32 root_execute_sync(const ::scoped_string & scopedstrFile, const ::scoped_string & scopedstrParams, const class time & timeTimeout = 1_minute, const ::file::path& pathWorkingDirectory = {}) override;
456
457
458 virtual void on_start_system() override;
459
460
461 virtual void create_app_shortcut(::platform::application * papplication) override;
462
463
464 virtual void report_exception_to_user(::particle* pparticle, ::exception& exception, const ::scoped_string & scopedstrMoreDetails) override;
465
466
467 virtual void shell_launch(const ::scoped_string & scopedstrAppId) override;
468
469
470 virtual bool has_application_capability(::enum_application_capability ecapability) const override;
471 virtual void add_application_capability(const ::enum_application_capability_array& ecapabilitya) override;
472 virtual void on_change_application_capability() override;
473
474
475 virtual string get_local_mutex_name(const ::scoped_string & scopedstrAppId) override;
476 virtual string get_local_id_mutex_name(const ::scoped_string & scopedstrAppId, const ::scoped_string & scopedstrId) override;
477 virtual string get_global_mutex_name(const ::scoped_string & scopedstrAppId) override;
478 virtual string get_global_id_mutex_name(const ::scoped_string & scopedstrAppId, const ::scoped_string & scopedstrId) override;
479
480
481
482
483// virtual ::string get_call_stack();
484
485
486 virtual ::process_identifier current_process_identifier() override;
487
488
489 virtual bool stdin_has_input_events() override;
490 virtual void flush_stdin_input_events() override;
491 virtual void flush_stdin() override;
492
493
494 virtual void defer_update_call_stack() override;
495//#if defined(__ANDROID__)
496// virtual string unwind_call_stack(const ::scoped_string & scopedstrFormat = call_stack_default_format(), ::i32 iSkip = CALLSTACK_DEFAULT_SKIP_TRIGGER, ::i32 iCount = -1);
497//#else
498 ::i32 get_call_stack_default_frame_count() override;
499 void get_call_stack_frames(void ** stack, ::i32 & frame_count) override;
500 string get_call_stack_trace(const ::scoped_string & scopedstrFormat = call_stack_default_format(), ::i32 iSkip = CALLSTACK_DEFAULT_SKIP_TRIGGER, void * caller_address = nullptr, ::i32 iCount = -1) override;
501
502 string get_call_stack_trace(void ** stack, ::i32 frame_count, const ::scoped_string& scopedstrFormat = call_stack_default_format(), ::i32 iSkip = CALLSTACK_DEFAULT_SKIP_TRIGGER, void* caller_address = nullptr, ::i32 iCount = -1) override;
503//#endif
504 string _get_call_stack_trace(const ::scoped_string & scopedstrFormat = call_stack_default_format(), ::i32 iSkip = CALLSTACK_DEFAULT_SKIP_TRIGGER, void * caller_address = nullptr, ::i32 iCount = -1) override;
505
506 string _get_call_stack_trace(void ** stack, ::i32 frame_count, const ::scoped_string& scopedstrFormat = call_stack_default_format(), ::i32 iSkip = CALLSTACK_DEFAULT_SKIP_TRIGGER, void* caller_address = nullptr, ::i32 iCount = -1) override;
507
508
509
510
511 virtual ::string get_command_line() override;
512
513
514 //virtual ::pointer<::acme::exclusive> get_exclusive(const ::scoped_string & scopedstr, const security_attributes & securityattributes = nullptr);
515
516
517 virtual ::i32 get_current_processor_index() override;
518 virtual ::i32 get_current_process_maximum_affinity() override;
519 virtual ::i32 get_current_process_affinity_order() override;
520 virtual ::u64 translate_processor_affinity(::i32 i) override;
521
522 //CLASS_DECL_ACME string expand_env(const ::scoped_string & scopedstr);
523 //CLASS_DECL_ACME string xxxget_environment_variable(const ::scoped_string & scopedstrEnvironmentVariable);
524 //CLASS_DECL_ACME string ca2_command_line();
525
526
527 //virtual ::i32 process_get_status();
528 //virtual void process_set_status(::i32 iStatus);
529 //virtual ::i32 * process_get_pargc();
530 //virtual ::i32 process_get_argc();
531
532
533 virtual bool set_process_priority(::enum_priority epriority) override;
534
535
536
537
538 //virtual string time_binary_platform(const ::scoped_string & scopedstrPlatform);
539
540
541
542
543
544
545//
546//#if !defined(UNIVERSAL_WINDOWS)
547//
548// //virtual ::i32 call_async(const ::scoped_string & scopedstrPath, const ::scoped_string & scopedstrParam, const ::scoped_string & scopedstrDir, ::e_display edisplay, bool bPrivileged, ::u32 * puiPid = nullptr);
549//
550// typedef ::i32 CALLSYNCONRETRY(::i32 iTry, uptr dwParam);
551//
552// typedef CALLSYNCONRETRY * PFNCALLSYNCONRETRY;
553//
554// //CLASS_DECL_ACME ::u32 call_sync(const ::scoped_string & scopedstrPath, const ::scoped_string & scopedstrParam, const ::scoped_string & scopedstrDir, ::e_display edisplay, const class time & timeTimeout, ::property_set & set);
555//
556//#endif
557
558
559//#if !defined(UNIVERSAL_WINDOWS) && !defined(LINUX) && !defined(__APPLE__) && !defined(__ANDROID__)
560//
561//
562// //virtual ::i32 get_current_processor_index();
563//
564// //virtual ::i32 get_current_process_maximum_affinity();
565//
566// //virtual ::i32 get_current_process_affinity_order();
567//
568//
569//#endif
570
571
572 //virtual string expand_env(const ::scoped_string & scopedstr);
573
574 //CLASS_DECL_ACME string consume_command_line_parameter(const ::scoped_string & scopedstrCommandLine, const ::string * & pszEndPtr);
575 //CLASS_DECL_ACME bool is_command_line_parameter_true(string& strValue, const ::scoped_string & scopedstrCommandLine, const ::scoped_string & scopedstrParam, bool bDefault = false);
576 //CLASS_DECL_ACME bool get_command_line_parameter(string & strValue, const ::scoped_string & scopedstrCommandLine, const ::scoped_string & scopedstrParam);
577 //CLASS_DECL_ACME bool get_command_line_parameter(string & strValue, const ::scoped_string & scopedstrCommandLine, const ::scoped_string & scopedstrParam, const ::scoped_string & scopedstrDefault);
578 //CLASS_DECL_ACME string get_command_line_parameter(const ::scoped_string & scopedstrCommandLine, const ::scoped_string & scopedstrParam);
579
580
581 //virtual bool launch_command(const ::scoped_string & scopedstrCommand);
582
583
584 virtual string process_configuration_name() override;
585
586 virtual string time_binary_platform(const ::scoped_string & scopedstrPlatform) override;
587 virtual string process_platform_name() override;
588 //virtual string process_platform_name();
589 virtual string process_version_dir_name() override;
590
591 virtual ::file::path core_app_path(const ::scoped_string & scopedstrApp) override;
592
593
594
595
596 //virtual bool is_shared_library_busy(::process_identifier processidentifier, const string_array_base & stra);
597 //virtual bool is_shared_library_busy(const string_array_base & stra);
598
599
600 // virtual bool launch_application(::particle * pparticle, const ::scoped_string & scopedstrAppId, const ::scoped_string & scopedstrParams, ::i32 iBitCount);
601
602
603
604 //virtual bool shell_execute_async(const ::scoped_string & scopedstrFile, const ::scoped_string & scopedstrParams);
605 //virtual bool shell_execute_sync(const ::scoped_string & scopedstrFile, const ::scoped_string & scopedstrParams, const class time & timeTimeout = 1_minute);
606
607 //virtual bool root_execute_async(const ::scoped_string & scopedstrFile, const ::scoped_string & scopedstrParams);
608 //virtual bool root_execute_sync(const ::scoped_string & scopedstrFile, const ::scoped_string & scopedstrParams, const class time & timeTimeout = 1_minute);
609
610
611 //CLASS_DECL_ACME bool os_init_application();
612 //CLASS_DECL_ACME void os_term_application();
613
614
615
616 virtual string executable_title_from_appid(const ::scoped_string & scopedstrAppId) override;
617
618
619 //CLASS_DECL_ACME ::u32 get_current_process_id();
620
621
622
623
624 //virtual string process_version_dir_name();
625
626
627
628 virtual ::i32 is_debug_build() override;
629
630
631 virtual ::i32 is_release_build() override;
632
633
634 //virtual bool succeeded(const ::error_code& errorcode);
635 //virtual bool failed(const ::error_code& errorcode);
636
637
638 virtual void _node_file_dialog(::file::file_dialog * pdialog) override;
639 virtual void _node_folder_dialog(::file::folder_dialog * pdialog) override;
640
641
642 virtual ::pointer < ::file::file_dialog > node_file_dialog() override;
643 virtual ::pointer < ::file::folder_dialog > node_folder_dialog() override;
644
645
646
647
648 ::file::path library_file_name(const ::scoped_string & scopedstr) override;
649
650
651 ::string default_component_implementation(const ::scoped_string & scopedstrComponentName) override;
652
653 void integration_factory() override;
654
655
656 //virtual void unzip_to_folder(const ::file::path& pathFolder, const ::file::path& pathZip);
657
658
659 ::string get_user_permanent_environment_variable(const ::scoped_string& scopedstr) override;
660 ::string get_system_permanent_environment_variable(const ::scoped_string& scopedstr) override;
661 void set_user_permanent_environment_variable(const ::scoped_string& scopedstr, const ::scoped_string& strPayload, bool bNoSystemNotify = false) override;
662
663 void system_notify_environment_variable_change() override;
664
665 void update_process_environment_variables() override;
666
667
668 void set_user_run_once(const ::scoped_string& scopedstrLabel, const ::scoped_string & scopedstrCommand) override;
669
670
671 ::string operating_system_store_release() override;
672
673 ::pointer <::operating_system::summary > operating_system_summary() override;
674
675
676 //virtual void module_path_main_window_post_close(const ::scoped_string & scopestr);
677
678 // ::pointer < ::operating_system::application > module_path_application(const ::scoped_string & scopestr) override;
679 //
680 // ::pointer < ::operating_system::application > process_identifier_application(::process_identifier processidentifier) override;
681 //
682 // ::pointer < ::operating_system::application > application_predicate(const ::function < bool(::operating_system::application * papplication) > & function) override;
683
684
685 ::string get_character_set_default_sample_text(enum_character_set echaracterset) override;
686 void load_character_set_default_sample_text() override;
687
688
689 void play_sound(const ::file::path& path) override;
690
691 //virtual void speak(const ::scoped_string& scopedstr);
692
693 ::string operating_system_application_version() override;
694
695
696 bool is_application_running_good_effort(const ::scoped_string & scopedstrRepos, const ::scoped_string & scopedstrApp) override;
697
698
699 bool are_framework_shared_libraries_busy(const ::scoped_string & scopedstrRepos, const ::scoped_string & scopedstrApp) override;
700
701 bool are_any_shared_libraries_mapped(const ::file::path_array_base & patha) override;
702
703
704 ::string get_error_code_message(const ::error_code & errorcode) override;
705
706
707 bool defer_enumerate_protocol(::file::listing_base& listing) override;
708
709 bool defer_process_protocol_path(::file::path & path) override;
710
711
712 void destroy() override;
713
714 //virtual string get_command_line();
715
716 //virtual void reboot();
717 void shutdown(bool bPowerOff) override;
718
719 void terminate_processes_by_title(const ::scoped_string & scopedstrName) override;
720
721//#ifdef WINDOWS
722// virtual ::file::path get_module_path(HMODULE hmodule);
723//#endif
724
725 ::process_identifier_array module_path_processes_identifiers(const ::scoped_string & scopedstrName) override;
726 ::process_identifier_array title_processes_identifiers(const ::scoped_string & scopedstrName) override;
727 //virtual ::process_identifier_array processes_identifiers();
728 //virtual ::file::path process_identifier_module_path(::process_identifier dwPid);
729
730
731 //virtual ::process_identifier current_process_identifier();
732
733 ::payload connection_settings_get_auto_detect() override;
734 ::payload connection_settings_get_auto_config_url() override;
735
736 void open_internet_link_in_browser(const ::scoped_string & scopedstrUrl,
737 const ::scoped_string & scopedstrBrowser, const ::scoped_string & scopedstrProfile = {}, const ::scoped_string & scopedstrTarget = {}) override;
738
739 void open_internet_link(const ::scoped_string & scopedstrUrl, const ::scoped_string &
740 scopedstrProfile = {}, const ::scoped_string & scopedstrTarget = {}) override;
741
742 void local_machine_set_run(const ::scoped_string & scopedstrKey, const ::file::path & pathExecutable, const ::scoped_string & scopedstrArguments, bool bSet) override;
743 void local_machine_set_run_once(const ::scoped_string & scopedstrKey, const ::file::path & pathExecutable, const ::scoped_string & scopedstrArguments, bool bSet) override;
744 void current_user_set_run(const ::scoped_string & scopedstrKey, const ::file::path & pathExecutable, const ::scoped_string & scopedstrArguments, bool bSet) override;
745 void current_user_set_run_once(const ::scoped_string & scopedstrKey, const ::file::path & pathExecutable, const ::scoped_string & scopedstrArguments, bool bSet) override;
746
747 void defer_register_ca2_plugin_for_mozilla() override;
748
749
750 void file_extension_get_open_with_list_keys(string_array_base & straKey, const ::scoped_string & scopedstrExtension) override;
751 void file_extension_get_open_with_list_commands(string_array_base & straCommand, const ::scoped_string & scopedstrExtension) override;
752
753 void file_association_set_default_icon(const ::scoped_string & scopedstrExtension, const ::scoped_string & scopedstrExtensionNamingClass, const ::file::path & pathIcon) override;
754 void file_association_set_shell_open_command(const ::scoped_string & scopedstrExtension, const ::scoped_string & scopedstrExtensionNamingClass, const ::file::path & pathExecutable, const ::scoped_string & scopedstrParam) override;
755 void file_association_get_shell_open_command(const ::scoped_string & scopedstrExtension, string & strExtensionNamingClass, string & strCommand, string & strParam) override;
756
757 void native_full_web_browser(const ::scoped_string & scopedstr) override;
758
759
760 void native_modern_web_browser(const ::scoped_string & scopedstr) override;
761
762
763 void enable_service() override;
764
765 void disable_service() override;
766
767 void start_service() override;
768
769 void stop_service() override;
770
771 void enable_service(const ::scoped_string & scopedstrServiceName, const ::scoped_string & scopedstrDisplayName, const ::scoped_string & scopedstrCommand, const ::scoped_string & scopedstrUser = "", const ::scoped_string & scopedstrPass = "") override;
772
773 void disable_service(const ::scoped_string & scopedstrServiceName) override;
774
775 void start_service(const ::scoped_string & scopedstrServiceName) override;
776
777 void stop_service(const ::scoped_string & scopedstrServiceName) override;
778
779//#ifdef WINDOWS
780// virtual DECLSPEC_NO_RETURN void raise_exception(::u32 dwExceptionCode, ::u32 dwExceptionFlags = EXCEPTION_NONCONTINUABLE);
781//#endif
782
783 bool is_remote_session() override;
784
785 void set_file_status(const ::file::path & path, const ::file::file_status& status) override;
786
787 //virtual void edit_link_target(const ::file::path & path, const ::file::path & pathLink);
788 //virtual void edit_link_folder(const ::file::path & path, const ::file::path & pathLink);
789 //virtual void edit_link_icon(const ::file::path& path, ::i32 iIcon, const ::file::path& pathLink);
790// virtual ::pointer < ::file::link > resolve_link(const ::file::path & path, ::file::e_link elink = ::file::e_link_all);
791 bool has_alias_in_path(const ::scoped_string & scopedstr, bool bNoUI = false, bool bNoMount = false) override;
792 bool is_alias(const ::file::path & path) override;
793
794 void initialize_wallpaper_fileset(::file::set* pfileset, bool bAddSearch) override;
795
796 //virtual void set_dark_mode(bool bDarkMode);
797
798 void file_open(const ::file::path & path, const ::scoped_string & scopedstrParams = "", const ::file::path & pathFolder = "") override;
799 void hidden_start(const ::file::path& path, const ::scoped_string & scopedstrParams = "", const ::file::path& pathFolder = "") override;
800 void hidden_run(const class time & timeWait, const ::file::path& path, const ::scoped_string & scopedstrParams = "", const ::file::path& pathFolder = "") override;
801
802 string get_default_browser() override;
803
804 void get_default_browser(string & strId, ::file::path & path, string & strParam) override;
805
806 void set_default_browser() override;
807
808 void set_file_extension_mime_type(::get_file_extension_mime_type * pgetfileextensionmimetype) override;
809
810 void set_file_extension_mime_type(string_array_base & straExtension, string_array_base & straMimeType) override;
811
812 void register_user_auto_start(::platform::application * papplication, const ::scoped_string & scopedstrArguments, bool bRegister) override;
813
814 bool is_user_auto_start(const ::scoped_string & scopedstrAppId) override;
815
816 ::file::path get_app_path(const ::scoped_string & scopedstrApp) override;
817
818 void on_process_request(::request * prequest) override;
819
825 //virtual void browse_file_open(::property_set & set);
826
832 //virtual void browse_file_save(::property_set & set);
833
835 //virtual void browse_folder(::property_set & set);
836
838 //virtual void browse_file_or_folder(::property_set & set);
839
840
841 void list_process(::file::path_array_base & patha, ::process_identifier_array& uaPid) override;
842
843
844 ::file::path_array_base list_process_path();
845
846 //virtual ::icon_pointer load_icon(const ::payload & payloadFile);
847
848 //virtual void enum_draw2d_fonts(::write_text::font_enumeration_item_array& itema);
849
850 void broadcast_environment_variable_change() override;
851
852
853 void set_this_application_as_default_for_file_extension(const ::scoped_string & scopedstrExtension) override;
854
855
856 string get_file_extension_mime_type(const ::scoped_string & scopedstrExtension);
857
858
859#ifdef LINUX
860
861 virtual enum_linux_distribution get_linux_distribution() const;
862//#ifdef LINUX
863
864 // inline enum_linux_distribution get_linux_distribution() const;
865
866 virtual void calculate_linux_distribution();
867
868#endif
869
870#if !defined(WINDOWS)
871 string_array_base cmdline_from_pid(::process_identifier processidentifier) override;
872 atom_array app_get_pid(const ::scoped_string & scopedstrModuleName) override;
873
874#endif
875
876
877#if defined(WINDOWS)
878
879 virtual error_code defer_co_initialize_ex(bool bMultiThread, bool bDisableOleDDE = false);
880
881#endif
882
883 //#ifdef WINDOWS_DESKTOP
884//
885//#endif
886//
887//
888//#endif
889
890 virtual ::string display_file_path(const ::file::path & path);
891
892
893#ifdef WINDOWS_DESKTOP
894
895 virtual platform_char ** _get_envp(wcsdup_array& a);
896
897 virtual void register_dll(const ::file::path& pathDll);
898
899 virtual ::e_status _defer_beta_use_unicode_utf8();
900
901 virtual ::e_status _defer_enable_coder_mode();
902
903 virtual bool _has_beta_use_unicode_utf8();
904
905 virtual bool _is_visual_studio_installed();
906
907 virtual bool _is_tortoise_git_installed();
908
909 virtual bool _is_msys2_installed();
910
911 //virtual void _defer_install_msys2_package(const ::scoped_string & scopedstr);
912
913 //virtual bool _has_msys2_command(const ::scoped_string & scopedstr);
914
915 //virtual void _install_msys2_package(const ::scoped_string & scopedstr);
916
917 bool _is_strawberry_perl_installed();
918
919
920 bool _is_coder_mode_enabled();
921
922 void _enable_coder_mode(bool bEnable = true);
923
924#endif
925
926 bool _is_code_exe_user_path_environment_variable_ok(::string *pstrCorrectPath=nullptr, const_char_pointer pszPath = nullptr) override;
927
928#if defined(WINDOWS_DESKTOP) || defined(MACOS) || defined(LINUX)
929
930 bool _is_smart_git_installed() override;
931
932#endif
933
934 bool _is_google_drive_installed() override;
935
936 //bool _is_dropbox_installed() override;
937
938 bool _is_onedrive_installed() override;
939
940 //void calculate_dropbox_installed() override;
941
942 void calculate_onedrive_installed() override;
943
944 bool _is_google_chrome_installed() override;
945
946 bool _is_opera_browser_installed() override;
947
948 bool _is_visual_studio_code_installed() override;
949
950 bool _is_git_credential_manager_installed() override;
951
952 bool _is_jetbrains_clion_installed() override;
953
954 bool _is_shell_patched() override;
955
956#ifndef UNIVERSAL_WINDOWS
957
958 ::array <::serial::port_info> list_serial_ports() override;
959
960#endif
961
962//#if !defined(UNIVERSAL_WINDOWS)
963//
964//
965// //virtual string module_path_from_pid(::process_identifier processidentifier);
966// //virtual atom_array module_path_get_pid(const ::scoped_string & scopedstrModuleName, bool bModuleNameIsPropertyFormatted = true);
967//
968//
969//#ifndef WINDOWS
970//
971//
972//
973//#endif
974//
975//
976//#endif
977//
978//#ifndef UNIVERSAL_WINDOWS
979// //virtual bool process_contains_module(string & strImage, ::process_identifier processidentifier, const ::scoped_string & scopedstrLibrary);
980// //virtual void shared_library_process(dword_array & dwa, string_array_base & straProcesses, const ::scoped_string & scopedstrLibrary);
981//#endif
982#if defined(__BSD__) || defined(__APPLE__)
983
984 void arp_a(void *p, void(*callback)(void * p, ::u32 uIp, const_char_pointer status)) override;
985
986#endif
987
988 ::string eol() override;
989
990
991 ::i32 building_core_count(bool bDedicatedBuilding) override;
992 ::i32 performance_core_count() override;
993 ::i32 efficiency_core_count() override;
994
995 bool defer_component_factory(const ::scoped_string & scopedstrComponent) override;
996
997 void detached_command(const ::scoped_string & scopedstrCommand, const ::file::path & pathLog) override;
998
999// virtual void * fetch_windowing_system_display();
1000// virtual void windowing_system_async(const ::procedure & procedure);
1001// virtual void windowing_system_display_error_trap_push(::i32 i);
1002// virtual void windowing_system_display_error_trap_pop_ignored(::i32 i);
1003
1004
1005
1006
1007 bool _get_monitor_rectangle(::collection::index iMonitor, ::i32_rectangle & rectangle) override;
1008 bool _get_workspace_rectangle(::collection::index iWorkspace, ::i32_rectangle & rectangle) override;
1009
1010 void realize(::particle_pointer pparticle) override;
1011 virtual ::string dynamic_library_prefix();
1012 virtual ::string dynamic_library_suffix();
1013
1014
1015 virtual ::file::path get_font_path_from_name(const ::scoped_string& scopedstrName);
1016 virtual ::file::path _get_font_path_from_name(const ::scoped_string& scopedstrName);
1017
1018
1019 void protocol_set_data(const ::file::path & path, const ::block & block) override;
1020 ::memory protocol_get_data(const ::file::path & path) override;
1021
1022
1023 void on_protocol_set_data(const ::scoped_string & scopedstrProtocol, const ::scoped_string & scopedstrPath, const ::block & block) override;
1024 ::memory on_protocol_get_data(const ::scoped_string & scopedstrProtocol, const ::scoped_string & scopedstrPath) override;
1025
1026
1027
1028
1029
1030// void media_store_set_data(const ::scoped_string & scopedstrPath, const ::block & block) override;
1031// ::memory media_store_get_data(const ::scoped_string & scopedstrPath) override;
1032
1033 virtual ::string get_current_operating_system_name();
1034 virtual ::string get_more_operating_system_version_information();
1035 virtual ::i32_size get_main_monitor_size();
1036 virtual ::string_array_base get_operating_system_information_lines();
1037
1038 virtual memsize get_current_memory_usage();
1039
1040
1041 virtual bool _windows_isVistaOrLater();
1042 virtual bool _windows_isWin7();
1043
1044 virtual void run_loop1(::task *ptask);
1045
1046 };
1047
1048
1049} // namespace linux
1050
1051
1052
Definition shell.h:15
Definition path.h:52
Definition particle.h:95
Definition node_acme.h:122
Definition node_apex.h:24
Definition node_aqua.h:18
Definition node_aura.h:22
void node_main() override
virtual void implement(::pointer<::platform::node>& pnode, ::pointer<::platform::system> & psystem);
Definition node.cpp:432
virtual void call_sync(const ::scoped_string &scopedstrPath, const ::scoped_string &scopedstrParam, const ::scoped_string &scopedstrDir, ::e_display edisplay, const class time &timeTimeout, ::property_set &set, ::i32 *piExitCode) override
Definition node.cpp:179
void on_system_main() override
Definition node.cpp:505
Definition uuid.h:20
Definition security_attributes.h:7
Definition aaa_time.h:13
Definition topic.h:17
include "thread/AutoLock.h"
Definition _forward_declaration.h:877
Definition file_time.h:7
Definition node_acme.h:26
Definition node_apex.h:12
Definition node_aqua.h:12
Definition node_aura.h:12
Definition node.h:125